Class IngestDownloadServiceImpl
java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.ingestdownloadservice.impl.IngestDownloadServiceImpl
- All Implemented Interfaces:
IngestDownloadService,JobProducer
A simple tutorial class to learn about Opencast Services
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.opencastproject.job.api.AbstractJobProducer
ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobTypeFields inherited from interface org.opencastproject.ingestdownloadservice.api.IngestDownloadService
JOB_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new abstract job producer for jobs of the given type. -
Method Summary
Modifier and TypeMethodDescriptionprotected OrganizationDirectoryServiceReturns a reference to the organization directory service.protected SecurityServiceReturns a reference to the security serviceprotected ServiceRegistryReturns a reference to the service registry.protected UserDirectoryServiceReturns a reference to the user directory serviceingestDownload(MediaPackage mediaPackage, String sourceFlavors, String sourceTags, boolean deleteExternal, boolean tagsAndFlavor) protected StringAsks the overriding class to process the arguments using the given operation.voidsetOrganizationDirectoryService(OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.voidsetSecurityService(SecurityService securityService) Callback for setting the security service.voidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the receipt servicevoidsetUserDirectoryService(UserDirectoryService userDirectoryService) Callback for setting the user directory service.voidsetWorkspace(Workspace workspace) Sets the workspace to use.Methods inherited from class org.opencastproject.job.api.AbstractJobProducer
acceptJob, activate, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs
-
Constructor Details
-
IngestDownloadServiceImpl
public IngestDownloadServiceImpl()Creates a new abstract job producer for jobs of the given type.
-
-
Method Details
-
setWorkspace
Sets the workspace to use.- Parameters:
workspace- the workspace
-
setServiceRegistry
Sets the receipt service- Parameters:
serviceRegistry- the service registry
-
getServiceRegistry
Returns a reference to the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducer- Returns:
- the service registry
- See Also:
-
getSecurityService
Returns a reference to the security service- Specified by:
getSecurityServicein classAbstractJobProducer- Returns:
- the security service
- See Also:
-
setSecurityService
Callback for setting the security service.- Parameters:
securityService- the securityService to set
-
setUserDirectoryService
Callback for setting the user directory service.- Parameters:
userDirectoryService- the userDirectoryService to set
-
getUserDirectoryService
Returns a reference to the user directory service- Specified by:
getUserDirectoryServicein classAbstractJobProducer- Returns:
- the user directory service
- See Also:
-
getOrganizationDirectoryService
Returns a reference to the organization directory service.- Specified by:
getOrganizationDirectoryServicein classAbstractJobProducer- Returns:
- the organization directory service
- See Also:
-
setOrganizationDirectoryService
Sets a reference to the organization directory service.- Parameters:
organizationDirectory- the organization directory
-
ingestDownload
public Job ingestDownload(MediaPackage mediaPackage, String sourceFlavors, String sourceTags, boolean deleteExternal, boolean tagsAndFlavor) throws ServiceRegistryException - Specified by:
ingestDownloadin interfaceIngestDownloadService- Parameters:
mediaPackage- The media package to download elements fromsourceFlavors- Flavors identifying elements to downloadsourceTags- Tags identifying elements to downloaddeleteExternal- If the service should try to delete external elements after downloadingtagsAndFlavor- If elements are selected based on a union or an interjection of the sets selected by tags and flavors- Returns:
- The launched job
- Throws:
ServiceRegistryException- If starting the job failed
-
process
Description copied from class:AbstractJobProducerAsks the overriding class to process the arguments using the given operation. The result will be added to the associated job as the payload.- Specified by:
processin classAbstractJobProducer- Parameters:
job- the job to process- Returns:
- the operation result
- Throws:
MediaPackageExceptionIOException
-