Class OsgiFileSystemAssetStore

java.lang.Object
org.opencastproject.assetmanager.storage.impl.fs.AbstractFileSystemAssetStore
org.opencastproject.assetmanager.storage.impl.fs.OsgiFileSystemAssetStore
All Implemented Interfaces:
AssetStore, StorageUsage

public class OsgiFileSystemAssetStore extends AbstractFileSystemAssetStore
  • Field Details

    • CFG_OPT_STORAGE_DIR

      public static final String CFG_OPT_STORAGE_DIR
      Configuration key for the default Opencast storage directory. A value is optional.
      See Also:
    • CONFIG_STORE_ROOT_DIR

      public static final String CONFIG_STORE_ROOT_DIR
      Configuration key for the archive root directory.
      See Also:
  • Constructor Details

    • OsgiFileSystemAssetStore

      public OsgiFileSystemAssetStore()
  • Method Details

    • getWorkspace

      protected Workspace getWorkspace()
      Specified by:
      getWorkspace in class AbstractFileSystemAssetStore
    • getRootDirectory

      protected String getRootDirectory()
      Specified by:
      getRootDirectory in class AbstractFileSystemAssetStore
    • getRootDirectory

      protected String getRootDirectory(String orgId, String mpId)
      Looks for the root directory of the given mediapackage id
      Specified by:
      getRootDirectory in class AbstractFileSystemAssetStore
      Parameters:
      orgId - the organization which the mediapackage belongs to
      mpId - 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

      protected void onDeleteMediaPackage(String orgId, String mpId)
      Description copied from class: AbstractFileSystemAssetStore
      Optional 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:
      onDeleteMediaPackage in class AbstractFileSystemAssetStore
      Parameters:
      orgId - Organization ID
      mpId - Mediapackage ID
    • setWorkspace

      public void setWorkspace(Workspace workspace)
      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:
      IllegalStateException
      IOException
      ConfigurationException
    • getUsedSpace

      public Optional<Long> getUsedSpace()
      Description copied from interface: StorageUsage
      Gets the used space of storage in Bytes
      Returns:
      Number of used bytes in storage
    • getUsableSpace

      public Optional<Long> getUsableSpace()
      Description copied from interface: StorageUsage
      Gets the available space of storage in Bytes This is free storage that is not reserved
      Returns:
      Number of available bytes in storage
    • getTotalSpace

      public Optional<Long> getTotalSpace()
      Description copied from interface: StorageUsage
      Gets the total space of storage in Bytes
      Returns:
      Number of all bytes in storage
    • getStorageName

      public String getStorageName()
      Description copied from interface: StorageUsage
      Gets the name of the storage
      Returns:
      Name of the storage