Class StaticFileServiceImpl

java.lang.Object
org.opencastproject.staticfiles.impl.StaticFileServiceImpl
All Implemented Interfaces:
org.opencastproject.staticfiles.api.StaticFileService

public class StaticFileServiceImpl extends Object implements org.opencastproject.staticfiles.api.StaticFileService
Stores and retrieves static file resources.
  • Field Details

    • STATICFILES_ROOT_DIRECTORY_KEY

      public static final String STATICFILES_ROOT_DIRECTORY_KEY
      The key to find the root directory for the static file service in the OSGi properties.
      See Also:
  • Constructor Details

    • StaticFileServiceImpl

      public StaticFileServiceImpl()
  • Method Details

    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      OSGI callback for activating this component
      Parameters:
      cc - the osgi component context
    • deactivate

      public void deactivate()
      Callback from OSGi on service deactivation.
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      OSGi DI
    • setOrganizationDirectoryService

      public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService directoryService)
      OSGi DI
    • storeFile

      public String storeFile(String filename, InputStream inputStream) throws IOException
      Specified by:
      storeFile in interface org.opencastproject.staticfiles.api.StaticFileService
      Throws:
      IOException
    • getFile

      public InputStream getFile(String uuid) throws org.opencastproject.util.NotFoundException, IOException
      Specified by:
      getFile in interface org.opencastproject.staticfiles.api.StaticFileService
      Throws:
      org.opencastproject.util.NotFoundException
      IOException
    • persistFile

      public void persistFile(String uuid) throws org.opencastproject.util.NotFoundException, IOException
      Specified by:
      persistFile in interface org.opencastproject.staticfiles.api.StaticFileService
      Throws:
      org.opencastproject.util.NotFoundException
      IOException
    • deleteFile

      public void deleteFile(String uuid) throws org.opencastproject.util.NotFoundException, IOException
      Specified by:
      deleteFile in interface org.opencastproject.staticfiles.api.StaticFileService
      Throws:
      org.opencastproject.util.NotFoundException
      IOException
    • getFileName

      public String getFileName(String uuid) throws org.opencastproject.util.NotFoundException
      Specified by:
      getFileName in interface org.opencastproject.staticfiles.api.StaticFileService
      Throws:
      org.opencastproject.util.NotFoundException
    • getContentLength

      public Long getContentLength(String uuid) throws org.opencastproject.util.NotFoundException
      Specified by:
      getContentLength in interface org.opencastproject.staticfiles.api.StaticFileService
      Throws:
      org.opencastproject.util.NotFoundException