Class WorkingFileRepositoryRestEndpoint
java.lang.Object
org.opencastproject.workingfilerepository.impl.WorkingFileRepositoryImpl
org.opencastproject.workingfilerepository.impl.WorkingFileRepositoryRestEndpoint
- All Implemented Interfaces:
StorageUsage,PathMappable,WorkingFileRepository
-
Field Summary
Fields inherited from class org.opencastproject.workingfilerepository.impl.WorkingFileRepositoryImpl
MD5_EXTENSION, remoteServiceManager, rootDirectory, securityService, serverUrl, servicePath, WORKING_FILE_REPOSITORY_CLEANUP_MAX_AGE_KEY, WORKING_FILE_REPOSITORY_CLEANUP_PERIOD_KEYFields inherited from interface org.opencastproject.workingfilerepository.api.WorkingFileRepository
CHAR_ENCODING, COLLECTION_PATH_PREFIX, MEDIAPACKAGE_PATH_PREFIX, SERVICE_TYPE, URI_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.voidCallback from OSGi that is called when this service is deactivated.javax.ws.rs.core.ResponserestCleanupOldFilesFromCollection(String collectionId, long days) javax.ws.rs.core.ResponserestCleanupOldFilesFromMediaPackage(long days) javax.ws.rs.core.ResponserestCopyTo(String fromCollection, String fromFileName, String toMediaPackage, String toMediaPackageElement, String toFileName) javax.ws.rs.core.ResponserestDelete(String mediaPackageID, String mediaPackageElementID) javax.ws.rs.core.ResponserestDeleteFromCollection(String collectionId, String fileName) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponserestGet(String mediaPackageID, String mediaPackageElementID, String fileName, String ifNoneMatch, String range) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponserestGetCollectionContents(String collectionId) javax.ws.rs.core.ResponserestGetCollectionUri(String collectionId, String fileName) javax.ws.rs.core.ResponserestGetFromCollection(String collectionId, String fileName) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponserestGetUri(String mediaPackageID, String mediaPackageElementID) javax.ws.rs.core.ResponserestGetUri(String mediaPackageID, String mediaPackageElementID, String fileName) javax.ws.rs.core.ResponserestMoveTo(String fromCollection, String fromFileName, String toMediaPackage, String toMediaPackageElement, String toFileName) javax.ws.rs.core.ResponserestPut(String mediaPackageID, String mediaPackageElementID, javax.servlet.http.HttpServletRequest request) javax.ws.rs.core.ResponserestPutInCollection(String collectionId, javax.servlet.http.HttpServletRequest request) javax.ws.rs.core.ResponserestPutURLEncoded(javax.servlet.http.HttpServletRequest request, String mediaPackageID, String mediaPackageElementID, String filename, String content) voidsetRemoteServiceManager(ServiceRegistry remoteServiceManager) Sets the remote service manager.voidsetSecurityService(SecurityService securityService) Methods inherited from class org.opencastproject.workingfilerepository.impl.WorkingFileRepositoryImpl
checkPathSafe, cleanupOldFilesFromCollection, cleanupOldFilesFromMediaPackage, copyTo, createMd5, delete, deleteFromCollection, deleteFromCollection, get, getBaseUri, getCollectionContents, getCollectionSize, getCollectionURI, getDiskSpace, getFile, getFileFromCollection, getFromCollection, getPathPrefix, getSourceFile, getTotalSpace, getURI, getURI, getUrlPrefix, getUsableSpace, getUsedSpace, moveTo, put, putInCollection, toSafeName
-
Constructor Details
-
WorkingFileRepositoryRestEndpoint
public WorkingFileRepositoryRestEndpoint()
-
-
Method Details
-
activate
Callback from OSGi that is called when this service is activated.- Overrides:
activatein classWorkingFileRepositoryImpl- Parameters:
cc- OSGi component context- Throws:
IOException
-
deactivate
public void deactivate()Callback from OSGi that is called when this service is deactivated.- Overrides:
deactivatein classWorkingFileRepositoryImpl
-
setRemoteServiceManager
Sets the remote service manager.- Overrides:
setRemoteServiceManagerin classWorkingFileRepositoryImpl- Parameters:
remoteServiceManager-
-
setSecurityService
- Overrides:
setSecurityServicein classWorkingFileRepositoryImpl
-
restPut
@POST @Produces("text/html") @Path("/mediapackage/{mediaPackageID}/{mediaPackageElementID}") public javax.ws.rs.core.Response restPut(@PathParam("mediaPackageID") String mediaPackageID, @PathParam("mediaPackageElementID") String mediaPackageElementID, @Context javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
restPutURLEncoded
@POST @Produces("text/html") @Path("/mediapackage/{mediaPackageID}/{mediaPackageElementID}/{filename}") public javax.ws.rs.core.Response restPutURLEncoded(@Context javax.servlet.http.HttpServletRequest request, @PathParam("mediaPackageID") String mediaPackageID, @PathParam("mediaPackageElementID") String mediaPackageElementID, @PathParam("filename") String filename, @FormParam("content") String content) throws Exception - Throws:
Exception
-
restPutInCollection
@POST @Produces("text/html") @Path("/collection/{collectionId}") public javax.ws.rs.core.Response restPutInCollection(@PathParam("collectionId") String collectionId, @Context javax.servlet.http.HttpServletRequest request) throws Exception - Throws:
Exception
-
restDelete
-
restDeleteFromCollection
-
restCleanupOldFilesFromCollection
@DELETE @Path("/collection/cleanup/{collectionId}/{numberOfDays}") public javax.ws.rs.core.Response restCleanupOldFilesFromCollection(@PathParam("collectionId") String collectionId, @PathParam("numberOfDays") long days) -
restCleanupOldFilesFromMediaPackage
@DELETE @Path("/collection/cleanup/mediapackage/{numberOfDays}") public javax.ws.rs.core.Response restCleanupOldFilesFromMediaPackage(@PathParam("numberOfDays") long days) -
restGet
@GET @Path("/mediapackage/{mediaPackageID}/{mediaPackageElementID}") public javax.ws.rs.core.Response restGet(@PathParam("mediaPackageID") String mediaPackageID, @PathParam("mediaPackageElementID") String mediaPackageElementID, @HeaderParam("If-None-Match") String ifNoneMatch) throws NotFoundException - Throws:
NotFoundException
-
restGet
@GET @Path("/mediapackage/{mediaPackageID}/{mediaPackageElementID}/{fileName}") public javax.ws.rs.core.Response restGet(@PathParam("mediaPackageID") String mediaPackageID, @PathParam("mediaPackageElementID") String mediaPackageElementID, @PathParam("fileName") String fileName, @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Range") String range) throws NotFoundException - Throws:
NotFoundException
-
restGetFromCollection
@GET @Path("/collection/{collectionId}/{fileName}") public javax.ws.rs.core.Response restGetFromCollection(@PathParam("collectionId") String collectionId, @PathParam("fileName") String fileName) throws NotFoundException - Throws:
NotFoundException
-
restGetCollectionUri
-
restGetUri
-
restGetUri
-
restGetCollectionContents
@GET @Produces("application/json") @Path("/list/{collectionId}.json") public javax.ws.rs.core.Response restGetCollectionContents(@PathParam("collectionId") String collectionId) throws NotFoundException - Throws:
NotFoundException
-
restCopyTo
@POST @Path("/copy/{fromCollection}/{fromFileName}/{toMediaPackage}/{toMediaPackageElement}/{toFileName}") public javax.ws.rs.core.Response restCopyTo(@PathParam("fromCollection") String fromCollection, @PathParam("fromFileName") String fromFileName, @PathParam("toMediaPackage") String toMediaPackage, @PathParam("toMediaPackageElement") String toMediaPackageElement, @PathParam("toFileName") String toFileName) throws NotFoundException - Throws:
NotFoundException
-
restMoveTo
@POST @Path("/move/{fromCollection}/{fromFileName}/{toMediaPackage}/{toMediaPackageElement}/{toFileName}") public javax.ws.rs.core.Response restMoveTo(@PathParam("fromCollection") String fromCollection, @PathParam("fromFileName") String fromFileName, @PathParam("toMediaPackage") String toMediaPackage, @PathParam("toMediaPackageElement") String toMediaPackageElement, @PathParam("toFileName") String toFileName) throws NotFoundException - Throws:
NotFoundException
-
restGetTotalStorage
@GET @Produces("application/json") @Path("storage") public javax.ws.rs.core.Response restGetTotalStorage() -
restGetBaseUri
@GET @Produces("text/plain") @Path("/baseUri") public javax.ws.rs.core.Response restGetBaseUri()
-