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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key to find the root directory for the static file service in the OSGi properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) OSGI callback for activating this componentvoidCallback from OSGi on service deactivation.voiddeleteFile(String uuid) getContentLength(String uuid) getFileName(String uuid) voidpersistFile(String uuid) voidsetOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService directoryService) OSGi DIvoidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) OSGi DIstoreFile(String filename, InputStream inputStream)
-
Field Details
-
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
- Specified by:
storeFilein interfaceorg.opencastproject.staticfiles.api.StaticFileService- Throws:
IOException
-
getFile
public InputStream getFile(String uuid) throws org.opencastproject.util.NotFoundException, IOException - Specified by:
getFilein interfaceorg.opencastproject.staticfiles.api.StaticFileService- Throws:
org.opencastproject.util.NotFoundExceptionIOException
-
persistFile
- Specified by:
persistFilein interfaceorg.opencastproject.staticfiles.api.StaticFileService- Throws:
org.opencastproject.util.NotFoundExceptionIOException
-
deleteFile
- Specified by:
deleteFilein interfaceorg.opencastproject.staticfiles.api.StaticFileService- Throws:
org.opencastproject.util.NotFoundExceptionIOException
-
getFileName
- Specified by:
getFileNamein interfaceorg.opencastproject.staticfiles.api.StaticFileService- Throws:
org.opencastproject.util.NotFoundException
-
getContentLength
- Specified by:
getContentLengthin interfaceorg.opencastproject.staticfiles.api.StaticFileService- Throws:
org.opencastproject.util.NotFoundException
-