Class OsgiFileSystemAssetStore
java.lang.Object
org.opencastproject.assetmanager.storage.impl.fs.AbstractFileSystemAssetStore
org.opencastproject.assetmanager.storage.impl.fs.OsgiFileSystemAssetStore
- All Implemented Interfaces:
AssetStore,StorageUsage
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration key for the default Opencast storage directory.static final StringConfiguration key for the archive root directory.Fields inherited from class org.opencastproject.assetmanager.storage.impl.fs.AbstractFileSystemAssetStore
storeTypeFields inherited from interface org.opencastproject.assetmanager.api.storage.AssetStore
STORE_TYPE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Service activator, called via declarative services configuration.protected Stringprotected StringgetRootDirectory(String orgId, String mpId) Looks for the root directory of the given mediapackage idGets the total space of storage in BytesGets the available space of storage in Bytes This is free storage that is not reservedGets the used space of storage in Bytesprotected Workspaceprotected voidonDeleteMediaPackage(String orgId, String mpId) Optional further handling of the complete deletion of mediapackage from the local store.protected voidvoidsetWorkspace(Workspace workspace) OSGi DI.Methods inherited from class org.opencastproject.assetmanager.storage.impl.fs.AbstractFileSystemAssetStore
contains, copy, delete, get, getStoreType, mkDirs, put
-
Field Details
-
CFG_OPT_STORAGE_DIR
Configuration key for the default Opencast storage directory. A value is optional.- See Also:
-
CONFIG_STORE_ROOT_DIR
Configuration key for the archive root directory.- See Also:
-
-
Constructor Details
-
OsgiFileSystemAssetStore
public OsgiFileSystemAssetStore()
-
-
Method Details
-
getWorkspace
- Specified by:
getWorkspacein classAbstractFileSystemAssetStore
-
getRootDirectory
- Specified by:
getRootDirectoryin classAbstractFileSystemAssetStore
-
getRootDirectory
Looks for the root directory of the given mediapackage id- Specified by:
getRootDirectoryin classAbstractFileSystemAssetStore- Parameters:
orgId- the organization which the mediapackage belongs tompId- the mediapackage id- Returns:
- The root directory path of the given mediapackage, or null if the mediapackage could not be found anywhere
-
setupCache
protected void setupCache() -
onDeleteMediaPackage
Description copied from class:AbstractFileSystemAssetStoreOptional further handling of the complete deletion of mediapackage from the local store. This method will be called after the deletion of the mediapackage directory.- Specified by:
onDeleteMediaPackagein classAbstractFileSystemAssetStore- Parameters:
orgId- Organization IDmpId- Mediapackage ID
-
setWorkspace
OSGi DI. -
activate
public void activate(org.osgi.service.component.ComponentContext cc) throws IllegalStateException, IOException, ConfigurationException Service activator, called via declarative services configuration.- Parameters:
cc- the component context- Throws:
IllegalStateExceptionIOExceptionConfigurationException
-
getUsedSpace
Description copied from interface:StorageUsageGets the used space of storage in Bytes- Returns:
- Number of used bytes in storage
-
getUsableSpace
Description copied from interface:StorageUsageGets the available space of storage in Bytes This is free storage that is not reserved- Returns:
- Number of available bytes in storage
-
getTotalSpace
Description copied from interface:StorageUsageGets the total space of storage in Bytes- Returns:
- Number of all bytes in storage
-