|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.ifs.MCRContentStore
org.mycore.backend.videocharger.MCRCStoreVideoCharger
public class MCRCStoreVideoCharger
This class implements the MCRContentStore interface to store the content of
MCRFile objects in IBM VideoCharger Server. This allows the content to be
streamed. This implementation uses FTP to manage the files in VideoCharger.
The FTP connection parameters are configured in mycore.properties:
MCR.IFS.ContentStore.
This class also provides a method to backup all assets stored in VideoCharger
to a directory.
MCRAVExtVideoCharger| Field Summary | |
|---|---|
protected String |
assetGroup
Asset group |
protected boolean |
debugFTP
If true, FTP debug messages are written to stdout |
protected String |
host
Hostname of VideoCharger server |
protected static String[] |
ok
FTP Return code if "quote site avs attr" is successful |
protected String |
password
Password for FTP login |
protected int |
port
Port of VideoCharger server FTP interface |
protected String |
user
User ID for FTP login |
| Fields inherited from class org.mycore.datamodel.ifs.MCRContentStore |
|---|
formatter, lastTimestamp, prefix, slotDirDepth, storeID |
| Constructor Summary | |
|---|---|
MCRCStoreVideoCharger()
|
|
| Method Summary | |
|---|---|
static void |
backupContentTo(String storeID,
String directory)
Reads all assets stored in VideoCharger server and writes the contents to a directory for backup. |
protected com.enterprisedt.net.ftp.FTPClient |
connect()
Connects to IBM VideoCharger Server via FTP |
protected void |
disconnect(com.enterprisedt.net.ftp.FTPClient connection)
Closes the FTP connection to VideoCharger server |
protected void |
doDeleteContent(String storageID)
Deletes the content of an MCRFile object that is stored under the given Storage ID in this store instance. |
protected InputStream |
doRetrieveContent(MCRFileReader file)
Retrieves the content of an MCRFile. |
protected void |
doRetrieveContent(MCRFileReader file,
OutputStream target)
Retrieves the content of an MCRFile to an OutputStream. |
protected String |
doStoreContent(MCRFileReader file,
MCRContentInputStream source)
Stores the content of an MCRFile by reading from an MCRContentInputStream. |
void |
init(String storeID)
Initializes the store and sets its unique store ID. |
protected void |
retrieveContent(String assetID,
OutputStream target)
|
| Methods inherited from class org.mycore.datamodel.ifs.MCRContentStore |
|---|
buildNextID, buildNextTimestamp, buildSlotPath, deleteContent, getID, retrieveContent, retrieveContent, storeContent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String host
protected int port
protected String user
protected String password
protected boolean debugFTP
protected String assetGroup
protected static final String[] ok
| Constructor Detail |
|---|
public MCRCStoreVideoCharger()
| Method Detail |
|---|
public void init(String storeID)
MCRContentStore
init in class MCRContentStorestoreID - the non-null unique store ID for this store instance
protected String doStoreContent(MCRFileReader file,
MCRContentInputStream source)
throws Exception
MCRContentStore
doStoreContent in class MCRContentStorefile - the MCRFile thats content is to be storedsource - the ContentInputStream where the file content is read from
Exception
protected void doDeleteContent(String storageID)
throws Exception
MCRContentStore
doDeleteContent in class MCRContentStorestorageID - the storage ID of the MCRFile object
Exception
protected void doRetrieveContent(MCRFileReader file,
OutputStream target)
throws Exception
MCRContentStore
doRetrieveContent in class MCRContentStorefile - the MCRFile thats content should be retrievedtarget - the OutputStream to write the file content to
Exception
protected InputStream doRetrieveContent(MCRFileReader file)
throws Exception
MCRContentStore
doRetrieveContent in class MCRContentStorefile - the MCRFile thats content should be retrieved
Exception
protected void retrieveContent(String assetID,
OutputStream target)
throws Exception
Exception
public static void backupContentTo(String storeID,
String directory)
throws MCRPersistenceException,
Exception
storeID - the store ID fo the VideoCharger store to be backed updirectory - the local directory to write the assets to
MCRPersistenceException
Exception
protected com.enterprisedt.net.ftp.FTPClient connect()
throws MCRPersistenceException
MCRPersistenceExceptionprotected void disconnect(com.enterprisedt.net.ftp.FTPClient connection)
connection - the FTP connection to close
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||