Package org.opencastproject.ingest.api
Interface IngestService
- All Superinterfaces:
org.opencastproject.job.api.JobProducer
public interface IngestService
extends org.opencastproject.job.api.JobProducer
Generates
MediaPackages from media, metadata, and attachments.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.opencastproject.mediapackage.MediaPackageaddAttachment(InputStream file, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add an attachment to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddAttachment(InputStream file, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add an attachment to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddAttachment(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add an attachment to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddCatalog(InputStream catalog, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add a [metadata catalog] to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddCatalog(InputStream catalog, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add a [metadata catalog] to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddCatalog(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add a [metadata catalog] to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddPartialTrack(InputStream mediaFile, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage) Adds a partial media track to the existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddPartialTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage) Adds a partial media track to the existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddTrack(InputStream mediaFile, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add a media track to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddTrack(InputStream mediaFile, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add a media track to an existing MediaPackage in the repositoryorg.opencastproject.mediapackage.MediaPackageaddTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) Add a media track to an existing MediaPackage in the repositoryorg.opencastproject.workflow.api.WorkflowInstanceaddZippedMediaPackage(InputStream zippedMediaPackage, String workflowDefinitionID, Map<String, String> wfConfig) Ingests the compressed mediapackage and starts the workflow as defined byworkflowDefinitionID.org.opencastproject.workflow.api.WorkflowInstanceaddZippedMediaPackage(InputStream zippedMediaPackage, String workflowDefinitionID, Map<String, String> wfConfig, Long workflowId) Deprecated.As of release 2.4, the scheduler service is able to store a mediapackage.org.opencastproject.mediapackage.MediaPackageCreate a new MediaPackage in the repository.org.opencastproject.mediapackage.MediaPackagecreateMediaPackage(String mediaPackageID) Create a new MediaPackage in the repository.voiddiscardMediaPackage(org.opencastproject.mediapackage.MediaPackage mediaPackage) Delete an existing MediaPackage and any linked files from the temporary ingest filestore.org.opencastproject.workflow.api.WorkflowInstanceingest(org.opencastproject.mediapackage.MediaPackage mediaPackage) Ingests the mediapackage and starts the default workflow as defined by theorg.opencastproject.workflow.default.definitionkey, found in the system configuration.org.opencastproject.workflow.api.WorkflowInstanceingest(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String, String> properties) Ingests the mediapackage and starts the workflow as defined byworkflowDefinitionID.org.opencastproject.workflow.api.WorkflowInstanceingest(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String, String> properties, Long workflowId) Deprecated.As of release 2.4, the scheduler service is able to store a mediapackage.voidschedule(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String, String> properties) Schedule an event with a given media package.Methods inherited from interface org.opencastproject.job.api.JobProducer
acceptJob, countJobs, getJobType, isReadyToAccept, isReadyToAcceptJobs
-
Field Details
-
UTC_DATE_FORMAT
- See Also:
-
START_DATE_KEY
- See Also:
-
-
Method Details
-
addZippedMediaPackage
org.opencastproject.workflow.api.WorkflowInstance addZippedMediaPackage(InputStream zippedMediaPackage, String workflowDefinitionID, Map<String, String> wfConfig) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException, org.opencastproject.util.NotFoundExceptionIngests the compressed mediapackage and starts the workflow as defined byworkflowDefinitionID. The properties specified inpropertieswill be submitted as configuration data to the workflow.- Parameters:
zippedMediaPackage- A zipped file containing manifest, tracks, catalogs and attachmentsworkflowDefinitionID- workflow to be used with this media packagewfConfig- configuration parameters for the workflow- Returns:
- Workflow instance.
- Throws:
org.opencastproject.mediapackage.MediaPackageException- if the mediapackage contained in the zip stream is invalidIOException- if reading from the input stream failsIngestException- if an unexpected error occursorg.opencastproject.util.NotFoundException- if the workflow definition was not found
-
addZippedMediaPackage
@Deprecated org.opencastproject.workflow.api.WorkflowInstance addZippedMediaPackage(InputStream zippedMediaPackage, String workflowDefinitionID, Map<String, String> wfConfig, Long workflowId) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedExceptionDeprecated.As of release 2.4, the scheduler service is able to store a mediapackage. Thereby the concept of the pre-procesing workflow is obsolete and there is no more need to resume such a workflow by this method.Ingests 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.- Parameters:
zippedMediaPackage- A zipped file containing manifest, tracks, catalogs and attachmentsworkflowDefinitionID- workflow to be used with this media packagewfConfig- configuration parameters for the workflowworkflowId- the workflow instance- Returns:
- Workflow instance.
- Throws:
org.opencastproject.mediapackage.MediaPackageException- if the mediapackage contained in the zip stream is invalidIOException- if reading from the input stream failsIngestException- if an unexpected error occursorg.opencastproject.util.NotFoundException- if either one of the workflow definition or workflow instance was not foundorg.opencastproject.security.api.UnauthorizedException- if the current user does not havePermissions.Action.READon the workflow instance's mediapackage.
-
createMediaPackage
org.opencastproject.mediapackage.MediaPackage createMediaPackage() throws org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.util.ConfigurationException, IOException, IngestExceptionCreate a new MediaPackage in the repository.- Returns:
- The created MediaPackage
- Throws:
org.opencastproject.mediapackage.MediaPackageExceptionorg.opencastproject.util.ConfigurationExceptionIOExceptionIngestException- if an unexpected error occurs
-
createMediaPackage
org.opencastproject.mediapackage.MediaPackage createMediaPackage(String mediaPackageID) throws org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.util.ConfigurationException, IOException, IngestException Create a new MediaPackage in the repository.- Parameters:
mediaPackageID- The Id for the new Mediapackage- Returns:
- The created MediaPackage
- Throws:
org.opencastproject.mediapackage.MediaPackageExceptionorg.opencastproject.util.ConfigurationExceptionIOExceptionIngestException- if an unexpected error occurs
-
addTrack
org.opencastproject.mediapackage.MediaPackage addTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add a media track to an existing MediaPackage in the repository- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
addTrack
org.opencastproject.mediapackage.MediaPackage addTrack(InputStream mediaFile, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add a media track to an existing MediaPackage in the repository- Parameters:
mediaFile- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
addTrack
org.opencastproject.mediapackage.MediaPackage addTrack(InputStream mediaFile, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add a media track to an existing MediaPackage in the repository- Parameters:
mediaFile- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
addPartialTrack
org.opencastproject.mediapackage.MediaPackage addPartialTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, IngestException Adds a partial media track to the existing MediaPackage in the repository- 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
org.opencastproject.mediapackage.MediaPackage addPartialTrack(InputStream mediaFile, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, IngestException Adds a partial media track to the existing MediaPackage in the repository- Parameters:
mediaFile- 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
org.opencastproject.mediapackage.MediaPackage addCatalog(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add a [metadata catalog] to an existing MediaPackage in the repository- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
addCatalog
org.opencastproject.mediapackage.MediaPackage addCatalog(InputStream catalog, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add a [metadata catalog] to an existing MediaPackage in the repository- Parameters:
catalog- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
addCatalog
org.opencastproject.mediapackage.MediaPackage addCatalog(InputStream catalog, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IllegalArgumentException, IOException, IngestException Add a [metadata catalog] to an existing MediaPackage in the repository- Parameters:
catalog- 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:
IllegalArgumentException- if the data passed to this method are not validIOExceptionIngestException- if an unexpected error occurs
-
addAttachment
org.opencastproject.mediapackage.MediaPackage addAttachment(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add an attachment to an existing MediaPackage in the repository- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
addAttachment
org.opencastproject.mediapackage.MediaPackage addAttachment(InputStream file, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add an attachment to an existing MediaPackage in the repository- Parameters:
file- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
addAttachment
org.opencastproject.mediapackage.MediaPackage addAttachment(InputStream file, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws org.opencastproject.mediapackage.MediaPackageException, IOException, IngestException Add an attachment to an existing MediaPackage in the repository- Parameters:
file- 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:
org.opencastproject.mediapackage.MediaPackageExceptionIOExceptionIngestException- if an unexpected error occurs
-
ingest
org.opencastproject.workflow.api.WorkflowInstance ingest(org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IllegalStateException, IngestException Ingests the mediapackage and starts the default workflow as defined by theorg.opencastproject.workflow.default.definitionkey, found in the system configuration.- Parameters:
mediaPackage- The specific Opencast MediaPackage being ingested- Returns:
- Workflow instance id.
- Throws:
IngestException- if an unexpected error occursIllegalStateException
-
ingest
org.opencastproject.workflow.api.WorkflowInstance ingest(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String, String> properties) throws IllegalStateException, IngestException, org.opencastproject.util.NotFoundExceptionIngests the mediapackage and starts the workflow as defined byworkflowDefinitionID. The properties specified inpropertieswill be submitted as configuration data to the workflow.- Parameters:
mediaPackage- The specific Opencast MediaPackage being ingestedworkflowDefinitionID- workflow to be used with this media packageproperties- configuration properties for the workflow- Returns:
- Workflow instance id.
- Throws:
IngestException- if an unexpected error occursorg.opencastproject.util.NotFoundException- if the workflow defintion can't be foundIllegalStateException
-
ingest
@Deprecated org.opencastproject.workflow.api.WorkflowInstance ingest(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String, String> properties, Long workflowId) throws IllegalStateException, IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedExceptionDeprecated.As of release 2.4, the scheduler service is able to store a mediapackage. Thereby the concept of the pre-procesing workflow is obsolete and there is no more need to resume such a workflow by this method.Ingests 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.- Parameters:
mediaPackage- The specific Opencast MediaPackage being ingestedworkflowDefinitionID- workflow to be used with this media packageproperties- configuration properties for the workflowworkflowId- the workflow identifier- Returns:
- Workflow instance id.
- Throws:
IngestException- if an unexpected error occursorg.opencastproject.util.NotFoundException- if either one of the workflow definition or workflow instance was not foundorg.opencastproject.security.api.UnauthorizedException- if the current user does not havePermissions.Action.READon the workflow instance's mediapackage.IllegalStateException
-
schedule
void schedule(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String, String> properties) throws IllegalStateException, IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.scheduler.api.SchedulerExceptionSchedule an event with a given media package.- 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 occursorg.opencastproject.util.NotFoundException- if the workflow defintion can't be foundIllegalStateExceptionorg.opencastproject.security.api.UnauthorizedExceptionorg.opencastproject.scheduler.api.SchedulerException
-
discardMediaPackage
void discardMediaPackage(org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, IngestException Delete an existing MediaPackage and any linked files from the temporary ingest filestore.- Parameters:
mediaPackage- The specific Opencast MediaPackage- Throws:
IngestException- if an unexpected error occursIOException
-