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
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opencastproject.mediapackage.MediaPackage
    addAttachment(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 repository
    org.opencastproject.mediapackage.MediaPackage
    addAttachment(InputStream file, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Add an attachment to an existing MediaPackage in the repository
    org.opencastproject.mediapackage.MediaPackage
    addAttachment(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Add an attachment to an existing MediaPackage in the repository
    org.opencastproject.mediapackage.MediaPackage
    addCatalog(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 repository
    org.opencastproject.mediapackage.MediaPackage
    addCatalog(InputStream catalog, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Add a [metadata catalog] to an existing MediaPackage in the repository
    org.opencastproject.mediapackage.MediaPackage
    addCatalog(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Add a [metadata catalog] to an existing MediaPackage in the repository
    org.opencastproject.mediapackage.MediaPackage
    addPartialTrack(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 repository
    org.opencastproject.mediapackage.MediaPackage
    addPartialTrack(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 repository
    org.opencastproject.mediapackage.MediaPackage
    addTrack(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 repository
    org.opencastproject.mediapackage.MediaPackage
    addTrack(InputStream mediaFile, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Add a media track to an existing MediaPackage in the repository
    org.opencastproject.mediapackage.MediaPackage
    addTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Add a media track to an existing MediaPackage in the repository
    org.opencastproject.workflow.api.WorkflowInstance
    addZippedMediaPackage(InputStream zippedMediaPackage, String workflowDefinitionID, Map<String,String> wfConfig)
    Ingests the compressed mediapackage and starts the workflow as defined by workflowDefinitionID.
    org.opencastproject.workflow.api.WorkflowInstance
    addZippedMediaPackage(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.MediaPackage
    Create a new MediaPackage in the repository.
    org.opencastproject.mediapackage.MediaPackage
    createMediaPackage(String mediaPackageID)
    Create a new MediaPackage in the repository.
    void
    discardMediaPackage(org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Delete an existing MediaPackage and any linked files from the temporary ingest filestore.
    org.opencastproject.workflow.api.WorkflowInstance
    ingest(org.opencastproject.mediapackage.MediaPackage mediaPackage)
    Ingests the mediapackage and starts the default workflow as defined by the org.opencastproject.workflow.default.definition key, found in the system configuration.
    org.opencastproject.workflow.api.WorkflowInstance
    ingest(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String,String> properties)
    Ingests the mediapackage and starts the workflow as defined by workflowDefinitionID.
    org.opencastproject.workflow.api.WorkflowInstance
    ingest(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.
    void
    schedule(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

  • 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.NotFoundException
      Ingests the compressed mediapackage and starts the workflow as defined by workflowDefinitionID. The properties specified in properties will be submitted as configuration data to the workflow.
      Parameters:
      zippedMediaPackage - A zipped file containing manifest, tracks, catalogs and attachments
      workflowDefinitionID - workflow to be used with this media package
      wfConfig - configuration parameters for the workflow
      Returns:
      Workflow instance.
      Throws:
      org.opencastproject.mediapackage.MediaPackageException - if the mediapackage contained in the zip stream is invalid
      IOException - if reading from the input stream fails
      IngestException - if an unexpected error occurs
      org.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.UnauthorizedException
      Deprecated.
      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 by workflowDefinitionID. The properties specified in properties will 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, a NotFoundException will be thrown. If the workflowId is null, a new WorkflowInstance is created.

      Parameters:
      zippedMediaPackage - A zipped file containing manifest, tracks, catalogs and attachments
      workflowDefinitionID - workflow to be used with this media package
      wfConfig - configuration parameters for the workflow
      workflowId - the workflow instance
      Returns:
      Workflow instance.
      Throws:
      org.opencastproject.mediapackage.MediaPackageException - if the mediapackage contained in the zip stream is invalid
      IOException - if reading from the input stream fails
      IngestException - if an unexpected error occurs
      org.opencastproject.util.NotFoundException - if either one of the workflow definition or workflow instance was not found
      org.opencastproject.security.api.UnauthorizedException - if the current user does not have Permissions.Action.READ on the workflow instance's mediapackage.
    • createMediaPackage

      org.opencastproject.mediapackage.MediaPackage createMediaPackage() throws org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.util.ConfigurationException, IOException, IngestException
      Create a new MediaPackage in the repository.
      Returns:
      The created MediaPackage
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      org.opencastproject.util.ConfigurationException
      IOException
      IngestException - 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.MediaPackageException
      org.opencastproject.util.ConfigurationException
      IOException
      IngestException - 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 add
      flavor - The flavor of the media that is being added
      tags - Tags to add to the Track
      mediaPackage - The specific Opencast MediaPackage to which Media is being added
      Returns:
      MediaPackageManifest The manifest of a specific Opencast MediaPackage element
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 add
      flavor - The flavor of 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:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 add
      flavor - The flavor of the media that is being added
      tags - Tags to Add to the Track
      mediaPackage - The specific Opencast MediaPackage to which Media is being added
      Returns:
      MediaPackage The updated Opencast MediaPackage element
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 add
      flavor - the flavor of the media that is being added
      startTime - the start time
      mediaPackage - the mediapackage
      Returns:
      the updated mediapackage
      Throws:
      IOException - if reading or writing of the partial track fails
      IngestException - 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 add
      fileName - the file name
      flavor - the flavor of the media that is being added
      startTime - the start time
      mediaPackage - the mediapackage
      Returns:
      the updated mediapackage
      Throws:
      IOException - if reading or writing of the partial track fails
      IngestException - 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 add
      flavor - The flavor of the media that is being added
      tags - Tags to add to the catalog
      mediaPackage - The specific Opencast MediaPackage to which Media is being added
      Returns:
      MediaPackage The updated Opencast MediaPackage element
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 add
      flavor - The flavor of 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:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 add
      flavor - The flavor of the media that is being added
      tags - 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 valid
      IOException
      IngestException - 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 add
      flavor - The flavor of the media that is being added
      tags - Tags to add to the attachment
      mediaPackage - The specific Opencast MediaPackage to which Media is being added
      Returns:
      MediaPackage The updated Opencast MediaPackage element
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 add
      flavor - The flavor of 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:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 add
      flavor - The flavor of the media that is being added
      tags - The tags of the media thas is being added
      mediaPackage - The specific Opencast MediaPackage to which Media is being added
      Returns:
      MediaPackage The updated Opencast MediaPackage element
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      IngestException - 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 the org.opencastproject.workflow.default.definition key, found in the system configuration.
      Parameters:
      mediaPackage - The specific Opencast MediaPackage being ingested
      Returns:
      Workflow instance id.
      Throws:
      IngestException - if an unexpected error occurs
      IllegalStateException
    • ingest

      org.opencastproject.workflow.api.WorkflowInstance ingest(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String,String> properties) throws IllegalStateException, IngestException, org.opencastproject.util.NotFoundException
      Ingests the mediapackage and starts the workflow as defined by workflowDefinitionID. The properties specified in properties will be submitted as configuration data to the workflow.
      Parameters:
      mediaPackage - The specific Opencast MediaPackage being ingested
      workflowDefinitionID - workflow to be used with this media package
      properties - configuration properties for the workflow
      Returns:
      Workflow instance id.
      Throws:
      IngestException - if an unexpected error occurs
      org.opencastproject.util.NotFoundException - if the workflow defintion can't be found
      IllegalStateException
    • 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.UnauthorizedException
      Deprecated.
      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 by workflowDefinitionID. The properties specified in properties will 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, a NotFoundException will be thrown. If the workflowId is null, a new WorkflowInstance is created.

      Parameters:
      mediaPackage - The specific Opencast MediaPackage being ingested
      workflowDefinitionID - workflow to be used with this media package
      properties - configuration properties for the workflow
      workflowId - the workflow identifier
      Returns:
      Workflow instance id.
      Throws:
      IngestException - if an unexpected error occurs
      org.opencastproject.util.NotFoundException - if either one of the workflow definition or workflow instance was not found
      org.opencastproject.security.api.UnauthorizedException - if the current user does not have Permissions.Action.READ on 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.SchedulerException
      Schedule an event with a given media package.
      Parameters:
      mediaPackage - The specific Opencast MediaPackage being ingested
      workflowDefinitionID - workflow to be used with this media package
      properties - configuration properties for the workflow
      Throws:
      IngestException - if an unexpected error occurs
      org.opencastproject.util.NotFoundException - if the workflow defintion can't be found
      IllegalStateException
      org.opencastproject.security.api.UnauthorizedException
      org.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 occurs
      IOException