Class IngestServiceImpl

java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.ingest.impl.IngestServiceImpl
All Implemented Interfaces:
org.opencastproject.ingest.api.IngestService, org.opencastproject.job.api.JobProducer, org.osgi.service.cm.ManagedService

public class IngestServiceImpl extends org.opencastproject.job.api.AbstractJobProducer implements org.opencastproject.ingest.api.IngestService, org.osgi.service.cm.ManagedService
Creates and augments Opencast MediaPackages. Stores media into the Working File Repository.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Managed Property key to allow new flavors of ingested attachments and catalogs to be added to the existing Opencast mediapackage.
    static final boolean
    The default is to preserve existing Opencast flavors during ingest.
    static final boolean
    By default, do not allow event ingest to modify existing series metadata
    static final boolean
    The default for force basic authentication even if download host does not ask for it
    static final float
    The approximate load placed on the system by ingesting a file
    static final float
    The approximate load placed on the system by ingesting a zip file
    static final boolean
    The default is not to automatically skip attachments and catalogs from capture agent
    protected String
    The default workflow identifier, if one is configured
    static final String
    Force basic authentication even if download host does not ask for it
    static final String
    The authentication method for download from external sources
    static final String
    The password for download from external sources
    static final String
    The source to download from
    static final String
    The user for download from external sources
    static final String
    The key to look for in the service configuration file to override the DEFAULT_INGEST_FILE_JOB_LOAD
    static final int
    The maximum length of filenames ingested by Opencast
    static final String
    Methods that ingest attachments directly create jobs with this operation type
    static final String
    Methods that ingest attachments from a URI create jobs with this operation type
    static final String
    Methods that ingest catalogs directly create jobs with this operation type
    static final String
    Methods that ingest catalogs from a URI create jobs with this operation type
    static final String
    Methods that ingest tracks directly create jobs with this operation type
    static final String
    Methods that ingest tracks from a URI create jobs with this operation type
    static final String
    Methods that ingest zips create jobs with this operation type
    protected boolean
    Option to overwrite matching flavors (e.g. series and episode metadata) on ingest, tracks are always taken on ingest
    protected boolean
     
    static final String
     
    static final String
    The key for the legacy mediapackage identifier
    static final String
    Deprecated.
    protected org.opencastproject.security.api.OrganizationDirectoryService
    The organization directory service
    protected org.opencastproject.security.api.SecurityService
    The security service
    static final String
    Control if attachments sent by capture agents for scheduled events are skipped.
    static final String
    Control if catalogs sent by capture agents for scheduled events are skipped.
    protected boolean
     
    protected org.opencastproject.security.api.UserDirectoryService
    The user directory service
    protected static final String
    The workflow configuration property prefix
    protected static final String
    The configuration key that defines the default workflow definition
    static final String
    The key to look for in the service configuration file to override the DEFAULT_INGEST_ZIP_JOB_LOAD

    Fields inherited from class org.opencastproject.job.api.AbstractJobProducer

    ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobType

    Fields inherited from interface org.opencastproject.ingest.api.IngestService

    START_DATE_KEY, UTC_DATE_FORMAT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new ingest service instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    OSGI callback for activating this component
    org.opencastproject.mediapackage.MediaPackage
    addAttachment(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.mediapackage.MediaPackage
    addAttachment(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.mediapackage.MediaPackage
    addAttachment(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.mediapackage.MediaPackage
    addCatalog(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.mediapackage.MediaPackage
    addCatalog(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.mediapackage.MediaPackage
    addCatalog(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    protected URI
    addContentToRepo(org.opencastproject.mediapackage.MediaPackage mp, String elementId, URI uri)
     
    org.opencastproject.mediapackage.MediaPackage
    addPartialTrack(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage)
     
    org.opencastproject.mediapackage.MediaPackage
    addPartialTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage)
     
    org.opencastproject.mediapackage.MediaPackage
    addTrack(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.mediapackage.MediaPackage
    addTrack(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.mediapackage.MediaPackage
    addTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage)
    org.opencastproject.workflow.api.WorkflowInstance
     
    org.opencastproject.workflow.api.WorkflowInstance
    addZippedMediaPackage(InputStream zipStream, String wd, Map<String,String> workflowConfig)
     
    org.opencastproject.workflow.api.WorkflowInstance
    addZippedMediaPackage(InputStream zipStream, String workflowDefinitionId, Map<String,String> workflowConfig, Long workflowInstanceId)
    org.opencastproject.mediapackage.MediaPackage
    org.opencastproject.mediapackage.MediaPackage
    createMediaPackage(String mediaPackageId)
    void
    Callback from OSGi on service deactivation.
    void
    discardMediaPackage(org.opencastproject.mediapackage.MediaPackage mp)
    protected org.apache.http.impl.client.CloseableHttpClient
     
    protected org.opencastproject.security.api.OrganizationDirectoryService
    protected org.opencastproject.security.api.SecurityService
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    protected org.opencastproject.security.api.UserDirectoryService
    org.opencastproject.workflow.api.WorkflowInstance
    ingest(org.opencastproject.mediapackage.MediaPackage mp)
    org.opencastproject.workflow.api.WorkflowInstance
    ingest(org.opencastproject.mediapackage.MediaPackage mp, String wd, Map<String,String> properties)
    org.opencastproject.workflow.api.WorkflowInstance
    ingest(org.opencastproject.mediapackage.MediaPackage mp, String workflowDefinitionId, Map<String,String> properties, Long workflowInstanceId)
    protected String
    process(org.opencastproject.job.api.Job job)
    void
    schedule(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String,String> properties)
     
    void
    setDublinCoreService(org.opencastproject.metadata.dublincore.DublinCoreCatalogService dublinCoreService)
     
    void
    setHttpClient(org.opencastproject.security.api.TrustedHttpClient httpClient)
    Sets the trusted http client
    void
    setMediaInspectionService(org.opencastproject.inspection.api.MediaInspectionService mediaInspectionService)
    Sets the media inspection service
    void
    setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
    Sets a reference to the organization directory service.
    void
    setSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService)
    Callback for setting the scheduler service.
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    Callback for setting the security service.
    void
    setSeriesService(org.opencastproject.series.api.SeriesService seriesService)
     
    void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Sets the service registry
    void
    setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
    Callback for setting the user directory service.
    void
    setWorkflowService(org.opencastproject.workflow.api.WorkflowService workflowService)
     
    void
    setWorkingFileRepository(org.opencastproject.workingfilerepository.api.WorkingFileRepository workingFileRepository)
     
    void
    unsetSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService)
     
    void
    updated(Dictionary<String,?> properties)
    protected boolean
    updateSeries(org.opencastproject.mediapackage.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, isReadyToAcceptJobs

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opencastproject.job.api.JobProducer

    acceptJob, countJobs, getJobType, isReadyToAccept, isReadyToAcceptJobs
  • Field Details

    • WORKFLOW_DEFINITION_DEFAULT

      protected static final String WORKFLOW_DEFINITION_DEFAULT
      The configuration key that defines the default workflow definition
      See Also:
    • WORKFLOW_CONFIGURATION_PREFIX

      protected static final String WORKFLOW_CONFIGURATION_PREFIX
      The workflow configuration property prefix
      See Also:
    • LEGACY_MEDIAPACKAGE_ID_KEY

      public static final String LEGACY_MEDIAPACKAGE_ID_KEY
      The key for the legacy mediapackage identifier
      See Also:
    • JOB_TYPE

      public static final String JOB_TYPE
      See Also:
    • INGEST_ZIP

      public static final String INGEST_ZIP
      Methods that ingest zips create jobs with this operation type
      See Also:
    • INGEST_TRACK

      public static final String INGEST_TRACK
      Methods that ingest tracks directly create jobs with this operation type
      See Also:
    • INGEST_TRACK_FROM_URI

      public static final String INGEST_TRACK_FROM_URI
      Methods that ingest tracks from a URI create jobs with this operation type
      See Also:
    • INGEST_ATTACHMENT

      public static final String INGEST_ATTACHMENT
      Methods that ingest attachments directly create jobs with this operation type
      See Also:
    • INGEST_ATTACHMENT_FROM_URI

      public static final String INGEST_ATTACHMENT_FROM_URI
      Methods that ingest attachments from a URI create jobs with this operation type
      See Also:
    • INGEST_CATALOG

      public static final String INGEST_CATALOG
      Methods that ingest catalogs directly create jobs with this operation type
      See Also:
    • INGEST_CATALOG_FROM_URI

      public static final String 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_LOAD
      The 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_LOAD
      The approximate load placed on the system by ingesting a zip file
      See Also:
    • FILE_JOB_LOAD_KEY

      public static final String FILE_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_INGEST_FILE_JOB_LOAD
      See Also:
    • ZIP_JOB_LOAD_KEY

      public static final String ZIP_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_INGEST_ZIP_JOB_LOAD
      See Also:
    • DOWNLOAD_SOURCE

      public static final String DOWNLOAD_SOURCE
      The source to download from
      See Also:
    • DOWNLOAD_USER

      public static final String DOWNLOAD_USER
      The user for download from external sources
      See Also:
    • DOWNLOAD_PASSWORD

      public static final String DOWNLOAD_PASSWORD
      The password for download from external sources
      See Also:
    • DOWNLOAD_AUTH_METHOD

      public static final String DOWNLOAD_AUTH_METHOD
      The authentication method for download from external sources
      See Also:
    • DOWNLOAD_AUTH_FORCE_BASIC

      public static final String 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_MODIFICATIONS
      By 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_FLAVORS
      The default is to preserve existing Opencast flavors during ingest.
      See Also:
    • DEFAULT_SKIP

      public static final boolean DEFAULT_SKIP
      The 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_BASIC
      The 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_MAX
      The maximum length of filenames ingested by Opencast
      See Also:
    • MODIFY_OPENCAST_SERIES_KEY

      @Deprecated public static final String 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

      public static final String 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

      public static final String SKIP_CATALOGS_KEY
      Control if catalogs sent by capture agents for scheduled events are skipped.
      See Also:
    • SKIP_ATTACHMENTS_KEY

      public static final String SKIP_ATTACHMENTS_KEY
      Control if attachments sent by capture agents for scheduled events are skipped.
      See Also:
    • securityService

      protected org.opencastproject.security.api.SecurityService securityService
      The security service
    • userDirectoryService

      protected org.opencastproject.security.api.UserDirectoryService userDirectoryService
      The user directory service
    • organizationDirectoryService

      protected org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryService
      The organization directory service
    • defaultWorkflowDefinionId

      protected String defaultWorkflowDefinionId
      The default workflow identifier, if one is configured
    • isAddOnlyNew

      protected boolean isAddOnlyNew
      Option 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:
      activate in class org.opencastproject.job.api.AbstractJobProducer
      Parameters:
      cc - the osgi component context
    • deactivate

      public void deactivate()
      Callback from OSGi on service deactivation.
    • updated

      public void updated(Dictionary<String,?> properties) throws org.opencastproject.util.ConfigurationException
      Specified by:
      updated in interface org.osgi.service.cm.ManagedService
      Throws:
      org.opencastproject.util.ConfigurationException
      See Also:
      • Retrieve ManagedService configuration, including option to overwrite series
    • setHttpClient

      public void setHttpClient(org.opencastproject.security.api.TrustedHttpClient httpClient)
      Sets the trusted http client
      Parameters:
      httpClient - the http client
    • setServiceRegistry

      public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
      Sets the service registry
      Parameters:
      serviceRegistry - the serviceRegistry to set
    • setMediaInspectionService

      public void setMediaInspectionService(org.opencastproject.inspection.api.MediaInspectionService mediaInspectionService)
      Sets the media inspection service
      Parameters:
      mediaInspectionService - the media inspection service to set
    • addZippedMediaPackage

      public org.opencastproject.workflow.api.WorkflowInstance addZippedMediaPackage(InputStream zipStream) throws org.opencastproject.ingest.api.IngestException, IOException, org.opencastproject.mediapackage.MediaPackageException
      Throws:
      org.opencastproject.ingest.api.IngestException
      IOException
      org.opencastproject.mediapackage.MediaPackageException
    • addZippedMediaPackage

      public org.opencastproject.workflow.api.WorkflowInstance addZippedMediaPackage(InputStream zipStream, String wd, Map<String,String> workflowConfig) throws org.opencastproject.mediapackage.MediaPackageException, IOException, org.opencastproject.ingest.api.IngestException, org.opencastproject.util.NotFoundException
      Specified by:
      addZippedMediaPackage in interface org.opencastproject.ingest.api.IngestService
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      org.opencastproject.ingest.api.IngestException
      org.opencastproject.util.NotFoundException
    • addZippedMediaPackage

      public org.opencastproject.workflow.api.WorkflowInstance addZippedMediaPackage(InputStream zipStream, String workflowDefinitionId, Map<String,String> workflowConfig, Long workflowInstanceId) throws org.opencastproject.mediapackage.MediaPackageException, IOException, org.opencastproject.ingest.api.IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException
      Specified by:
      addZippedMediaPackage in interface org.opencastproject.ingest.api.IngestService
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      IOException
      org.opencastproject.ingest.api.IngestException
      org.opencastproject.util.NotFoundException
      org.opencastproject.security.api.UnauthorizedException
      See Also:
      • IngestService.addZippedMediaPackage(java.io.InputStream, java.lang.String, java.util.Map, java.lang.Long)
    • createMediaPackage

      public org.opencastproject.mediapackage.MediaPackage createMediaPackage() throws org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.util.ConfigurationException
      Specified by:
      createMediaPackage in interface org.opencastproject.ingest.api.IngestService
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      org.opencastproject.util.ConfigurationException
      See Also:
      • IngestService.createMediaPackage()
    • createMediaPackage

      public org.opencastproject.mediapackage.MediaPackage createMediaPackage(String mediaPackageId) throws org.opencastproject.mediapackage.MediaPackageException, org.opencastproject.util.ConfigurationException
      Specified by:
      createMediaPackage in interface org.opencastproject.ingest.api.IngestService
      Throws:
      org.opencastproject.mediapackage.MediaPackageException
      org.opencastproject.util.ConfigurationException
      See Also:
      • IngestService.createMediaPackage()
    • addTrack

      public org.opencastproject.mediapackage.MediaPackage addTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addTrack in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addTrack(java.net.URI, org.opencastproject.mediapackage.MediaPackageElementFlavor, String[], org.opencastproject.mediapackage.MediaPackage)
    • addTrack

      public org.opencastproject.mediapackage.MediaPackage addTrack(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addTrack in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addTrack(java.io.InputStream, java.lang.String, org.opencastproject.mediapackage.MediaPackageElementFlavor, org.opencastproject.mediapackage.MediaPackage)
    • addTrack

      public org.opencastproject.mediapackage.MediaPackage addTrack(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addTrack in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addTrack(java.io.InputStream, java.lang.String, org.opencastproject.mediapackage.MediaPackageElementFlavor, org.opencastproject.mediapackage.MediaPackage)
    • addPartialTrack

      public org.opencastproject.mediapackage.MediaPackage addPartialTrack(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addPartialTrack in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
    • addPartialTrack

      public org.opencastproject.mediapackage.MediaPackage addPartialTrack(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, long startTime, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addPartialTrack in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
    • addCatalog

      public org.opencastproject.mediapackage.MediaPackage addCatalog(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addCatalog in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addCatalog(java.net.URI, org.opencastproject.mediapackage.MediaPackageElementFlavor, String[], org.opencastproject.mediapackage.MediaPackage)
    • updateSeries

      protected boolean updateSeries(org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      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 found
      org.opencastproject.ingest.api.IngestException - if any other exception was encountered
    • addCatalog

      public org.opencastproject.mediapackage.MediaPackage addCatalog(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addCatalog in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addCatalog(java.io.InputStream, java.lang.String, org.opencastproject.mediapackage.MediaPackageElementFlavor, org.opencastproject.mediapackage.MediaPackage)
    • addCatalog

      public org.opencastproject.mediapackage.MediaPackage addCatalog(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException, IllegalArgumentException
      Specified by:
      addCatalog in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      IllegalArgumentException
      See Also:
      • IngestService.addCatalog(java.io.InputStream, java.lang.String, org.opencastproject.mediapackage.MediaPackageElementFlavor, org.opencastproject.mediapackage.MediaPackage)
    • addAttachment

      public org.opencastproject.mediapackage.MediaPackage addAttachment(URI uri, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addAttachment in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addAttachment(java.net.URI, org.opencastproject.mediapackage.MediaPackageElementFlavor, String[], org.opencastproject.mediapackage.MediaPackage)
    • addAttachment

      public org.opencastproject.mediapackage.MediaPackage addAttachment(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, String[] tags, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addAttachment in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addAttachment(java.io.InputStream, java.lang.String, org.opencastproject.mediapackage.MediaPackageElementFlavor, org.opencastproject.mediapackage.MediaPackage)
    • addAttachment

      public org.opencastproject.mediapackage.MediaPackage addAttachment(InputStream in, String fileName, org.opencastproject.mediapackage.MediaPackageElementFlavor flavor, org.opencastproject.mediapackage.MediaPackage mediaPackage) throws IOException, org.opencastproject.ingest.api.IngestException
      Specified by:
      addAttachment in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.addAttachment(java.io.InputStream, java.lang.String, org.opencastproject.mediapackage.MediaPackageElementFlavor, org.opencastproject.mediapackage.MediaPackage)
    • ingest

      public org.opencastproject.workflow.api.WorkflowInstance ingest(org.opencastproject.mediapackage.MediaPackage mp) throws org.opencastproject.ingest.api.IngestException
      Specified by:
      ingest in interface org.opencastproject.ingest.api.IngestService
      Throws:
      org.opencastproject.ingest.api.IngestException
      See Also:
      • IngestService.ingest(org.opencastproject.mediapackage.MediaPackage)
    • ingest

      public org.opencastproject.workflow.api.WorkflowInstance ingest(org.opencastproject.mediapackage.MediaPackage mp, String wd, Map<String,String> properties) throws org.opencastproject.ingest.api.IngestException, org.opencastproject.util.NotFoundException
      Specified by:
      ingest in interface org.opencastproject.ingest.api.IngestService
      Throws:
      org.opencastproject.ingest.api.IngestException
      org.opencastproject.util.NotFoundException
      See Also:
      • IngestService.ingest(org.opencastproject.mediapackage.MediaPackage, java.lang.String, java.util.Map)
    • ingest

      public org.opencastproject.workflow.api.WorkflowInstance ingest(org.opencastproject.mediapackage.MediaPackage mp, String workflowDefinitionId, Map<String,String> properties, Long workflowInstanceId) throws org.opencastproject.ingest.api.IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException
      Specified by:
      ingest in interface org.opencastproject.ingest.api.IngestService
      Throws:
      org.opencastproject.ingest.api.IngestException
      org.opencastproject.util.NotFoundException
      org.opencastproject.security.api.UnauthorizedException
      See Also:
      • IngestService.ingest(org.opencastproject.mediapackage.MediaPackage, java.lang.String, java.util.Map, java.lang.Long)
    • schedule

      public void schedule(org.opencastproject.mediapackage.MediaPackage mediaPackage, String workflowDefinitionID, Map<String,String> properties) throws IllegalStateException, org.opencastproject.ingest.api.IngestException, org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.scheduler.api.SchedulerException
      Specified by:
      schedule in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IllegalStateException
      org.opencastproject.ingest.api.IngestException
      org.opencastproject.util.NotFoundException
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.scheduler.api.SchedulerException
    • discardMediaPackage

      public void discardMediaPackage(org.opencastproject.mediapackage.MediaPackage mp) throws IOException
      Specified by:
      discardMediaPackage in interface org.opencastproject.ingest.api.IngestService
      Throws:
      IOException
      See Also:
      • IngestService.discardMediaPackage(org.opencastproject.mediapackage.MediaPackage)
    • addContentToRepo

      protected URI addContentToRepo(org.opencastproject.mediapackage.MediaPackage mp, String elementId, URI uri) throws IOException
      Throws:
      IOException
    • setWorkflowService

      public void setWorkflowService(org.opencastproject.workflow.api.WorkflowService workflowService)
    • setWorkingFileRepository

      public void setWorkingFileRepository(org.opencastproject.workingfilerepository.api.WorkingFileRepository workingFileRepository)
    • setSeriesService

      public void setSeriesService(org.opencastproject.series.api.SeriesService seriesService)
    • setDublinCoreService

      public void setDublinCoreService(org.opencastproject.metadata.dublincore.DublinCoreCatalogService dublinCoreService)
    • getServiceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
      Specified by:
      getServiceRegistry in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getServiceRegistry()
    • process

      protected String process(org.opencastproject.job.api.Job job) throws Exception
      Specified by:
      process in class org.opencastproject.job.api.AbstractJobProducer
      Throws:
      Exception
      See Also:
      • AbstractJobProducer.process(org.opencastproject.job.api.Job)
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      Callback for setting the security service.
      Parameters:
      securityService - the securityService to set
    • setUserDirectoryService

      public void setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
      Callback for setting the user directory service.
      Parameters:
      userDirectoryService - the userDirectoryService to set
    • setSchedulerService

      public void setSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService)
      Callback for setting the scheduler service.
      Parameters:
      schedulerService - the scheduler service to set
    • unsetSchedulerService

      public void unsetSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService)
    • setOrganizationDirectoryService

      public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectory)
      Sets a reference to the organization directory service.
      Parameters:
      organizationDirectory - the organization directory
    • getSecurityService

      protected org.opencastproject.security.api.SecurityService getSecurityService()
      Specified by:
      getSecurityService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getSecurityService()
    • getUserDirectoryService

      protected org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()
      Specified by:
      getUserDirectoryService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getUserDirectoryService()
    • getOrganizationDirectoryService

      protected org.opencastproject.security.api.OrganizationDirectoryService getOrganizationDirectoryService()
      Specified by:
      getOrganizationDirectoryService in class org.opencastproject.job.api.AbstractJobProducer
      See Also:
      • AbstractJobProducer.getOrganizationDirectoryService()
    • getAuthedHttpClient

      protected org.apache.http.impl.client.CloseableHttpClient getAuthedHttpClient()