Package org.opencastproject.ingest.impl
Class IngestServiceImpl
java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.ingest.impl.IngestServiceImpl
- All Implemented Interfaces:
IngestService,JobProducer,org.osgi.service.cm.ManagedService
public class IngestServiceImpl
extends AbstractJobProducer
implements IngestService, org.osgi.service.cm.ManagedService
Creates and augments Opencast MediaPackages. Stores media into the Working File Repository.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringManaged Property key to allow new flavors of ingested attachments and catalogs to be added to the existing Opencast mediapackage.static final booleanThe default is to preserve existing Opencast flavors during ingest.static final booleanBy default, do not allow event ingest to modify existing series metadatastatic final booleanThe default for force basic authentication even if download host does not ask for itstatic final floatThe approximate load placed on the system by ingesting a filestatic final floatThe approximate load placed on the system by ingesting a zip filestatic final booleanThe default is not to automatically skip attachments and catalogs from capture agentprotected StringThe default workflow identifier, if one is configuredstatic final StringForce basic authentication even if download host does not ask for itstatic final StringThe authentication method for download from external sourcesstatic final StringThe password for download from external sourcesstatic final StringThe source to download fromstatic final StringThe user for download from external sourcesstatic final StringThe key to look for in the service configuration file to override theDEFAULT_INGEST_FILE_JOB_LOADstatic final intThe maximum length of filenames ingested by Opencaststatic final StringMethods that ingest attachments directly create jobs with this operation typestatic final StringMethods that ingest attachments from a URI create jobs with this operation typestatic final StringMethods that ingest catalogs directly create jobs with this operation typestatic final StringMethods that ingest catalogs from a URI create jobs with this operation typestatic final StringMethods that ingest tracks directly create jobs with this operation typestatic final StringMethods that ingest tracks from a URI create jobs with this operation typestatic final StringMethods that ingest zips create jobs with this operation typeprotected booleanOption to overwrite matching flavors (e.g. series and episode metadata) on ingest, tracks are always taken on ingestprotected booleanstatic final Stringstatic final StringThe key for the legacy mediapackage identifierstatic final StringDeprecated.protected OrganizationDirectoryServiceThe organization directory serviceprotected SecurityServiceThe security servicestatic final StringControl if attachments sent by capture agents for scheduled events are skipped.static final StringControl if catalogs sent by capture agents for scheduled events are skipped.protected booleanprotected UserDirectoryServiceThe user directory serviceprotected static final StringThe workflow configuration property prefixprotected static final StringThe configuration key that defines the default workflow definitionstatic final StringThe key to look for in the service configuration file to override theDEFAULT_INGEST_ZIP_JOB_LOADFields 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.ingest.api.IngestService
START_DATE_KEY, UTC_DATE_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) OSGI callback for activating this componentaddAttachment(InputStream in, String fileName, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) Add an attachment to an existing MediaPackage in the repositoryaddAttachment(InputStream in, String fileName, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) Add an attachment to an existing MediaPackage in the repositoryaddAttachment(URI uri, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) Add an attachment to an existing MediaPackage in the repositoryaddCatalog(InputStream in, String fileName, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) Add a [metadata catalog] to an existing MediaPackage in the repositoryaddCatalog(InputStream in, String fileName, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) Add a [metadata catalog] to an existing MediaPackage in the repositoryaddCatalog(URI uri, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) Add a [metadata catalog] to an existing MediaPackage in the repositoryprotected URIaddContentToRepo(MediaPackage mp, String elementId, URI uri) addPartialTrack(InputStream in, String fileName, MediaPackageElementFlavor flavor, long startTime, MediaPackage mediaPackage) Adds a partial media track to the existing MediaPackage in the repositoryaddPartialTrack(URI uri, MediaPackageElementFlavor flavor, long startTime, MediaPackage mediaPackage) Adds a partial media track to the existing MediaPackage in the repositoryaddTrack(InputStream in, String fileName, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) Add a media track to an existing MediaPackage in the repositoryaddTrack(InputStream in, String fileName, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) Add a media track to an existing MediaPackage in the repositoryaddTrack(URI uri, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) Add a media track to an existing MediaPackage in the repositoryaddZippedMediaPackage(InputStream zipStream) addZippedMediaPackage(InputStream zipStream, String wd, Map<String, String> workflowConfig) Ingests the compressed mediapackage and starts the workflow as defined byworkflowDefinitionID.addZippedMediaPackage(InputStream zipStream, String workflowDefinitionId, Map<String, String> workflowConfig, Long workflowInstanceId) Ingests the compressed mediapackage and starts the workflow as defined byworkflowDefinitionID.Create a new MediaPackage in the repository.createMediaPackage(String mediaPackageId) Create a new MediaPackage in the repository.voidCallback from OSGi on service deactivation.voidDelete an existing MediaPackage and any linked files from the temporary ingest filestore.protected org.apache.http.impl.client.CloseableHttpClientprotected 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 serviceingest(MediaPackage mp) Ingests the mediapackage and starts the default workflow as defined by theorg.opencastproject.workflow.default.definitionkey, found in the system configuration.Ingests the mediapackage and starts the workflow as defined byworkflowDefinitionID.ingest(MediaPackage mp, String workflowDefinitionId, Map<String, String> properties, Long workflowInstanceId) Ingests the mediapackage and starts the workflow as defined byworkflowDefinitionID.protected StringAsks the overriding class to process the arguments using the given operation.voidSchedule an event with a given media package.voidsetDublinCoreService(DublinCoreCatalogService dublinCoreService) voidsetHttpClient(TrustedHttpClient httpClient) Sets the trusted http clientvoidsetMediaInspectionService(MediaInspectionService mediaInspectionService) Sets the media inspection servicevoidsetOrganizationDirectoryService(OrganizationDirectoryService organizationDirectory) Sets a reference to the organization directory service.voidsetSchedulerService(SchedulerService schedulerService) Callback for setting the scheduler service.voidsetSecurityService(SecurityService securityService) Callback for setting the security service.voidsetSeriesService(SeriesService seriesService) voidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the service registryvoidsetUserDirectoryService(UserDirectoryService userDirectoryService) Callback for setting the user directory service.voidsetWorkflowService(WorkflowService workflowService) voidsetWorkingFileRepository(WorkingFileRepository workingFileRepository) voidunsetSchedulerService(SchedulerService schedulerService) voidupdated(Dictionary<String, ?> properties) protected booleanupdateSeries(MediaPackage mediaPackage) Updates the persistent representation of a series based on a potentially modified dublin core document.Methods inherited from class org.opencastproject.job.api.AbstractJobProducer
acceptJob, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencastproject.job.api.JobProducer
acceptJob, countJobs, getJobType, isReadyToAccept, isReadyToAcceptJobs
-
Field Details
-
WORKFLOW_DEFINITION_DEFAULT
The configuration key that defines the default workflow definition- See Also:
-
WORKFLOW_CONFIGURATION_PREFIX
The workflow configuration property prefix- See Also:
-
LEGACY_MEDIAPACKAGE_ID_KEY
The key for the legacy mediapackage identifier- See Also:
-
JOB_TYPE
- See Also:
-
INGEST_ZIP
Methods that ingest zips create jobs with this operation type- See Also:
-
INGEST_TRACK
Methods that ingest tracks directly create jobs with this operation type- See Also:
-
INGEST_TRACK_FROM_URI
Methods that ingest tracks from a URI create jobs with this operation type- See Also:
-
INGEST_ATTACHMENT
Methods that ingest attachments directly create jobs with this operation type- See Also:
-
INGEST_ATTACHMENT_FROM_URI
Methods that ingest attachments from a URI create jobs with this operation type- See Also:
-
INGEST_CATALOG
Methods that ingest catalogs directly create jobs with this operation type- See Also:
-
INGEST_CATALOG_FROM_URI
Methods that ingest catalogs from a URI create jobs with this operation type- See Also:
-
DEFAULT_INGEST_FILE_JOB_LOAD
public static final float DEFAULT_INGEST_FILE_JOB_LOADThe approximate load placed on the system by ingesting a file- See Also:
-
DEFAULT_INGEST_ZIP_JOB_LOAD
public static final float DEFAULT_INGEST_ZIP_JOB_LOADThe approximate load placed on the system by ingesting a zip file- See Also:
-
FILE_JOB_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_INGEST_FILE_JOB_LOAD- See Also:
-
ZIP_JOB_LOAD_KEY
The key to look for in the service configuration file to override theDEFAULT_INGEST_ZIP_JOB_LOAD- See Also:
-
DOWNLOAD_SOURCE
The source to download from- See Also:
-
DOWNLOAD_USER
The user for download from external sources- See Also:
-
DOWNLOAD_PASSWORD
The password for download from external sources- See Also:
-
DOWNLOAD_AUTH_METHOD
The authentication method for download from external sources- See Also:
-
DOWNLOAD_AUTH_FORCE_BASIC
Force basic authentication even if download host does not ask for it- See Also:
-
DEFAULT_ALLOW_SERIES_MODIFICATIONS
public static final boolean DEFAULT_ALLOW_SERIES_MODIFICATIONSBy default, do not allow event ingest to modify existing series metadata- See Also:
-
DEFAULT_ALLOW_ONLY_NEW_FLAVORS
public static final boolean DEFAULT_ALLOW_ONLY_NEW_FLAVORSThe default is to preserve existing Opencast flavors during ingest.- See Also:
-
DEFAULT_SKIP
public static final boolean DEFAULT_SKIPThe default is not to automatically skip attachments and catalogs from capture agent- See Also:
-
DEFAULT_DOWNLOAD_AUTH_FORCE_BASIC
public static final boolean DEFAULT_DOWNLOAD_AUTH_FORCE_BASICThe default for force basic authentication even if download host does not ask for it- See Also:
-
FILENAME_LENGTH_MAX
public static final int FILENAME_LENGTH_MAXThe maximum length of filenames ingested by Opencast- See Also:
-
MODIFY_OPENCAST_SERIES_KEY
Deprecated.Managed Property key to allow Opencast series modification during ingest Deprecated, the param potentially causes an update chain reaction for all events associated to that series, for each ingest- See Also:
-
ADD_ONLY_NEW_FLAVORS_KEY
Managed Property key to allow new flavors of ingested attachments and catalogs to be added to the existing Opencast mediapackage. But, not catalogs and attachments that would overwrite existing ones in Opencast.- See Also:
-
SKIP_CATALOGS_KEY
Control if catalogs sent by capture agents for scheduled events are skipped.- See Also:
-
SKIP_ATTACHMENTS_KEY
Control if attachments sent by capture agents for scheduled events are skipped.- See Also:
-
securityService
The security service -
userDirectoryService
The user directory service -
organizationDirectoryService
The organization directory service -
defaultWorkflowDefinionId
The default workflow identifier, if one is configured -
isAddOnlyNew
protected boolean isAddOnlyNewOption to overwrite matching flavors (e.g. series and episode metadata) on ingest, tracks are always taken on ingest -
isAllowModifySeries
protected boolean isAllowModifySeries -
testMode
protected boolean testMode
-
-
Constructor Details
-
IngestServiceImpl
public IngestServiceImpl()Creates a new ingest service instance.
-
-
Method Details
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) OSGI callback for activating this component- Overrides:
activatein classAbstractJobProducer- Parameters:
cc- the osgi component context
-
deactivate
public void deactivate()Callback from OSGi on service deactivation. -
updated
- Specified by:
updatedin interfaceorg.osgi.service.cm.ManagedService- Throws:
ConfigurationException- See Also:
-
setHttpClient
Sets the trusted http client- Parameters:
httpClient- the http client
-
setServiceRegistry
Sets the service registry- Parameters:
serviceRegistry- the serviceRegistry to set
-
setMediaInspectionService
Sets the media inspection service- Parameters:
mediaInspectionService- the media inspection service to set
-
addZippedMediaPackage
public WorkflowInstance addZippedMediaPackage(InputStream zipStream) throws IngestException, IOException, MediaPackageException -
addZippedMediaPackage
public WorkflowInstance addZippedMediaPackage(InputStream zipStream, String wd, Map<String, String> workflowConfig) throws MediaPackageException, IOException, IngestException, NotFoundExceptionDescription copied from interface:IngestServiceIngests the compressed mediapackage and starts the workflow as defined byworkflowDefinitionID. The properties specified inpropertieswill be submitted as configuration data to the workflow.- Specified by:
addZippedMediaPackagein interfaceIngestService- Parameters:
zipStream- A zipped file containing manifest, tracks, catalogs and attachmentswd- workflow to be used with this media packageworkflowConfig- configuration parameters for the workflow- Returns:
- Workflow instance.
- Throws:
MediaPackageException- if the mediapackage contained in the zip stream is invalidIOException- if reading from the input stream failsIngestException- if an unexpected error occursNotFoundException- if the workflow definition was not found
-
addZippedMediaPackage
public WorkflowInstance addZippedMediaPackage(InputStream zipStream, String workflowDefinitionId, Map<String, String> workflowConfig, Long workflowInstanceId) throws MediaPackageException, IOException, IngestException, NotFoundException, UnauthorizedExceptionIngests the compressed mediapackage and starts the workflow as defined byworkflowDefinitionID. The properties specified inpropertieswill be submitted as configuration data to the workflow.The steps defined in that workflow will be appended to the already running workflow instance
workflowId. If that workflow can't be found, aNotFoundExceptionwill be thrown. If theworkflowIdis null, a newWorkflowInstanceis created.- Specified by:
addZippedMediaPackagein interfaceIngestService- Parameters:
zipStream- A zipped file containing manifest, tracks, catalogs and attachmentsworkflowDefinitionId- workflow to be used with this media packageworkflowConfig- configuration parameters for the workflowworkflowInstanceId- the workflow instance- Returns:
- Workflow instance.
- Throws:
MediaPackageException- if the mediapackage contained in the zip stream is invalidIOException- if reading from the input stream failsIngestException- if an unexpected error occursNotFoundException- if either one of the workflow definition or workflow instance was not foundUnauthorizedException- if the current user does not havePermissions.Action.READon the workflow instance's mediapackage.- See Also:
-
createMediaPackage
Create a new MediaPackage in the repository.- Specified by:
createMediaPackagein interfaceIngestService- Returns:
- The created MediaPackage
- Throws:
MediaPackageExceptionConfigurationException- See Also:
-
createMediaPackage
public MediaPackage createMediaPackage(String mediaPackageId) throws MediaPackageException, ConfigurationException Create a new MediaPackage in the repository.- Specified by:
createMediaPackagein interfaceIngestService- Parameters:
mediaPackageId- The Id for the new Mediapackage- Returns:
- The created MediaPackage
- Throws:
MediaPackageExceptionConfigurationException- See Also:
-
addTrack
public MediaPackage addTrack(URI uri, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) throws IOException, IngestException Add a media track to an existing MediaPackage in the repository- Specified by:
addTrackin interfaceIngestService- Parameters:
uri- The URL of the file to addflavor- The flavor of the media that is being addedtags- Tags to add to the TrackmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackageManifest The manifest of a specific Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
addTrack
public MediaPackage addTrack(InputStream in, String fileName, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) throws IOException, IngestException Add a media track to an existing MediaPackage in the repository- Specified by:
addTrackin interfaceIngestService- Parameters:
in- The media file to addflavor- The flavor of the media that is being addedmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
addTrack
public MediaPackage addTrack(InputStream in, String fileName, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) throws IOException, IngestException Add a media track to an existing MediaPackage in the repository- Specified by:
addTrackin interfaceIngestService- Parameters:
in- The media file to addflavor- The flavor of the media that is being addedtags- Tags to Add to the TrackmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
addPartialTrack
public MediaPackage addPartialTrack(URI uri, MediaPackageElementFlavor flavor, long startTime, MediaPackage mediaPackage) throws IOException, IngestException Description copied from interface:IngestServiceAdds a partial media track to the existing MediaPackage in the repository- Specified by:
addPartialTrackin interfaceIngestService- Parameters:
uri- the URL of the file to addflavor- the flavor of the media that is being addedstartTime- the start timemediaPackage- the mediapackage- Returns:
- the updated mediapackage
- Throws:
IOException- if reading or writing of the partial track failsIngestException- if an unexpected error occurs
-
addPartialTrack
public MediaPackage addPartialTrack(InputStream in, String fileName, MediaPackageElementFlavor flavor, long startTime, MediaPackage mediaPackage) throws IOException, IngestException Description copied from interface:IngestServiceAdds a partial media track to the existing MediaPackage in the repository- Specified by:
addPartialTrackin interfaceIngestService- Parameters:
in- the media file to addfileName- the file nameflavor- the flavor of the media that is being addedstartTime- the start timemediaPackage- the mediapackage- Returns:
- the updated mediapackage
- Throws:
IOException- if reading or writing of the partial track failsIngestException- if an unexpected error occurs
-
addCatalog
public MediaPackage addCatalog(URI uri, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) throws IOException, IngestException Add a [metadata catalog] to an existing MediaPackage in the repository- Specified by:
addCatalogin interfaceIngestService- Parameters:
uri- The URL of the file to addflavor- The flavor of the media that is being addedtags- Tags to add to the catalogmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
updateSeries
Updates the persistent representation of a series based on a potentially modified dublin core document.- Parameters:
mediaPackage- the media package containing series metadata and ACLs.- Returns:
- true, if the series is created or overwritten, false if the existing series remains intact.
- Throws:
IOException- if the series catalog was not foundIngestException- if any other exception was encountered
-
addCatalog
public MediaPackage addCatalog(InputStream in, String fileName, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) throws IOException, IngestException Add a [metadata catalog] to an existing MediaPackage in the repository- Specified by:
addCatalogin interfaceIngestService- Parameters:
in- The catalog file to addflavor- The flavor of the media that is being addedmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
addCatalog
public MediaPackage addCatalog(InputStream in, String fileName, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) throws IOException, IngestException, IllegalArgumentException Add a [metadata catalog] to an existing MediaPackage in the repository- Specified by:
addCatalogin interfaceIngestService- Parameters:
in- The catalog file to addflavor- The flavor of the media that is being addedtags- The tags for the media that is being added:mediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occursIllegalArgumentException- if the data passed to this method are not valid- See Also:
-
addAttachment
public MediaPackage addAttachment(URI uri, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) throws IOException, IngestException Add an attachment to an existing MediaPackage in the repository- Specified by:
addAttachmentin interfaceIngestService- Parameters:
uri- The URL of the file to addflavor- The flavor of the media that is being addedtags- Tags to add to the attachmentmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
addAttachment
public MediaPackage addAttachment(InputStream in, String fileName, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) throws IOException, IngestException Add an attachment to an existing MediaPackage in the repository- Specified by:
addAttachmentin interfaceIngestService- Parameters:
in- The file to addflavor- The flavor of the media that is being addedtags- The tags of the media thas is being addedmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
addAttachment
public MediaPackage addAttachment(InputStream in, String fileName, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) throws IOException, IngestException Add an attachment to an existing MediaPackage in the repository- Specified by:
addAttachmentin interfaceIngestService- Parameters:
in- The file to addflavor- The flavor of the media that is being addedmediaPackage- The specific Opencast MediaPackage to which Media is being added- Returns:
- MediaPackage The updated Opencast MediaPackage element
- Throws:
IOExceptionIngestException- if an unexpected error occurs- See Also:
-
ingest
Ingests the mediapackage and starts the default workflow as defined by theorg.opencastproject.workflow.default.definitionkey, found in the system configuration.- Specified by:
ingestin interfaceIngestService- Parameters:
mp- The specific Opencast MediaPackage being ingested- Returns:
- Workflow instance id.
- Throws:
IngestException- if an unexpected error occurs- See Also:
-
ingest
public WorkflowInstance ingest(MediaPackage mp, String wd, Map<String, String> properties) throws IngestException, NotFoundExceptionIngests the mediapackage and starts the workflow as defined byworkflowDefinitionID. The properties specified inpropertieswill be submitted as configuration data to the workflow.- Specified by:
ingestin interfaceIngestService- Parameters:
mp- The specific Opencast MediaPackage being ingestedwd- workflow to be used with this media packageproperties- configuration properties for the workflow- Returns:
- Workflow instance id.
- Throws:
IngestException- if an unexpected error occursNotFoundException- if the workflow defintion can't be found- See Also:
-
ingest
public WorkflowInstance ingest(MediaPackage mp, String workflowDefinitionId, Map<String, String> properties, Long workflowInstanceId) throws IngestException, NotFoundException, UnauthorizedExceptionIngests the mediapackage and starts the workflow as defined byworkflowDefinitionID. The properties specified inpropertieswill be submitted as configuration data to the workflow.The steps defined in that workflow will be appended to the already running workflow instance
workflowId. If that workflow can't be found, aNotFoundExceptionwill be thrown. If theworkflowIdis null, a newWorkflowInstanceis created.- Specified by:
ingestin interfaceIngestService- Parameters:
mp- The specific Opencast MediaPackage being ingestedworkflowDefinitionId- workflow to be used with this media packageproperties- configuration properties for the workflowworkflowInstanceId- the workflow identifier- Returns:
- Workflow instance id.
- Throws:
IngestException- if an unexpected error occursNotFoundException- if either one of the workflow definition or workflow instance was not foundUnauthorizedException- if the current user does not havePermissions.Action.READon the workflow instance's mediapackage.- See Also:
-
schedule
public void schedule(MediaPackage mediaPackage, String workflowDefinitionID, Map<String, String> properties) throws IllegalStateException, IngestException, NotFoundException, UnauthorizedException, SchedulerExceptionDescription copied from interface:IngestServiceSchedule an event with a given media package.- Specified by:
schedulein interfaceIngestService- Parameters:
mediaPackage- The specific Opencast MediaPackage being ingestedworkflowDefinitionID- workflow to be used with this media packageproperties- configuration properties for the workflow- Throws:
IngestException- if an unexpected error occursNotFoundException- if the workflow defintion can't be foundIllegalStateExceptionUnauthorizedExceptionSchedulerException
-
discardMediaPackage
Delete an existing MediaPackage and any linked files from the temporary ingest filestore.- Specified by:
discardMediaPackagein interfaceIngestService- Parameters:
mp- The specific Opencast MediaPackage- Throws:
IOException- See Also:
-
addContentToRepo
- Throws:
IOException
-
setWorkflowService
-
setWorkingFileRepository
-
setSeriesService
-
setDublinCoreService
-
getServiceRegistry
Returns a reference to the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducer- Returns:
- the service registry
- See Also:
-
process
Asks 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:
Exception- 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
-
setSchedulerService
Callback for setting the scheduler service.- Parameters:
schedulerService- the scheduler service to set
-
unsetSchedulerService
-
setOrganizationDirectoryService
Sets a reference to the organization directory service.- Parameters:
organizationDirectory- the organization directory
-
getSecurityService
Returns a reference to the security service- Specified by:
getSecurityServicein classAbstractJobProducer- Returns:
- the security service
- See Also:
-
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:
-
getAuthedHttpClient
protected org.apache.http.impl.client.CloseableHttpClient getAuthedHttpClient()
-