Class DuplicateEventWorkflowOperationHandler

  • All Implemented Interfaces:
    org.opencastproject.workflow.api.WorkflowOperationHandler

    public class DuplicateEventWorkflowOperationHandler
    extends org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
    This WOH duplicates an input event.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String COPY_NUMBER_PREFIX_PROPERTY
      The prefix to use for the number which is appended to the original title of the event.
      protected org.opencastproject.distribution.api.DistributionService distributionService
      The distribution service
      static int MAX_NUMBER_DEFAULT
      The default maximum number of events to create.
      static String MAX_NUMBER_PROPERTY
      Name of the configuration option that provides the maximum number of events to create
      static String NO_SUFFIX
      Whether to actually use the number suffix (makes sense in conjunction with "set-series-id"
      static String NUMBER_PROPERTY
      Name of the configuration option that provides the number of events to create
      static String PROPERTY_NAMESPACES_PROPERTY
      The namespaces of the asset manager properties to copy.
      static String SET_SERIES_ID
      The series ID that should be set on the copies (if unset, uses the same series)
      static String SOURCE_FLAVORS_PROPERTY
      Name of the configuration option that provides the source flavors we are looking for
      static String SOURCE_TAGS_PROPERTY
      Name of the configuration option that provides the source tags we are looking for
      static String TARGET_TAGS_PROPERTY
      Name of the configuration option that provides the target tags we should apply
      protected org.opencastproject.workspace.api.Workspace workspace
      The workspace to use for retrieving and storing files.
      • Fields inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler

        asList, description, id, serviceRegistry
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setAssetManager​(org.opencastproject.assetmanager.api.AssetManager assetManager)
      Callback for the OSGi declarative services configuration.
      void setAuthorizationService​(org.opencastproject.security.api.AuthorizationService authorizationService)
      OSGi setter
      void setDistributionService​(org.opencastproject.distribution.api.DistributionService distributionService)
      Callback for the OSGi declarative services configuration.
      void setIngestService​(org.opencastproject.ingest.api.IngestService ingestService)
      OSGi setter
      void setSeriesService​(org.opencastproject.series.api.SeriesService seriesService)
      OSGi setter
      void setWorkspace​(org.opencastproject.workspace.api.Workspace workspace)
      Callback for the OSGi declarative services configuration.
      org.opencastproject.workflow.api.WorkflowOperationResult start​(org.opencastproject.workflow.api.WorkflowInstance workflowInstance, org.opencastproject.job.api.JobContext context)  
      • Methods inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler

        activate, asList, cfgKeyMissing, createResult, createResult, createResult, createResult, destroy, equals, getCfg, getConfig, getConfig, getConfig, getDescription, getFileNameFromElements, getId, getOptConfig, getOptConfig, hashCode, setJobBarrierPollingInterval, setServiceRegistry, skip, toString, waitForStatus, waitForStatus
    • Field Detail

      • SOURCE_FLAVORS_PROPERTY

        public static final String SOURCE_FLAVORS_PROPERTY
        Name of the configuration option that provides the source flavors we are looking for
        See Also:
        Constant Field Values
      • SOURCE_TAGS_PROPERTY

        public static final String SOURCE_TAGS_PROPERTY
        Name of the configuration option that provides the source tags we are looking for
        See Also:
        Constant Field Values
      • TARGET_TAGS_PROPERTY

        public static final String TARGET_TAGS_PROPERTY
        Name of the configuration option that provides the target tags we should apply
        See Also:
        Constant Field Values
      • NUMBER_PROPERTY

        public static final String NUMBER_PROPERTY
        Name of the configuration option that provides the number of events to create
        See Also:
        Constant Field Values
      • MAX_NUMBER_PROPERTY

        public static final String MAX_NUMBER_PROPERTY
        Name of the configuration option that provides the maximum number of events to create
        See Also:
        Constant Field Values
      • NO_SUFFIX

        public static final String NO_SUFFIX
        Whether to actually use the number suffix (makes sense in conjunction with "set-series-id"
        See Also:
        Constant Field Values
      • SET_SERIES_ID

        public static final String SET_SERIES_ID
        The series ID that should be set on the copies (if unset, uses the same series)
        See Also:
        Constant Field Values
      • MAX_NUMBER_DEFAULT

        public static final int MAX_NUMBER_DEFAULT
        The default maximum number of events to create. Can be overridden.
        See Also:
        Constant Field Values
      • PROPERTY_NAMESPACES_PROPERTY

        public static final String PROPERTY_NAMESPACES_PROPERTY
        The namespaces of the asset manager properties to copy.
        See Also:
        Constant Field Values
      • COPY_NUMBER_PREFIX_PROPERTY

        public static final String COPY_NUMBER_PREFIX_PROPERTY
        The prefix to use for the number which is appended to the original title of the event.
        See Also:
        Constant Field Values
      • workspace

        protected org.opencastproject.workspace.api.Workspace workspace
        The workspace to use for retrieving and storing files.
      • distributionService

        protected org.opencastproject.distribution.api.DistributionService distributionService
        The distribution service
    • Constructor Detail

      • DuplicateEventWorkflowOperationHandler

        public DuplicateEventWorkflowOperationHandler()
    • Method Detail

      • setAuthorizationService

        public void setAuthorizationService​(org.opencastproject.security.api.AuthorizationService authorizationService)
        OSGi setter
        Parameters:
        authorizationService -
      • setIngestService

        public void setIngestService​(org.opencastproject.ingest.api.IngestService ingestService)
        OSGi setter
        Parameters:
        ingestService -
      • setSeriesService

        public void setSeriesService​(org.opencastproject.series.api.SeriesService seriesService)
        OSGi setter
        Parameters:
        seriesService -
      • setAssetManager

        public void setAssetManager​(org.opencastproject.assetmanager.api.AssetManager assetManager)
        Callback for the OSGi declarative services configuration.
        Parameters:
        assetManager - the asset manager
      • setWorkspace

        public void setWorkspace​(org.opencastproject.workspace.api.Workspace workspace)
        Callback for the OSGi declarative services configuration.
        Parameters:
        workspace - the workspace
      • setDistributionService

        public void setDistributionService​(org.opencastproject.distribution.api.DistributionService distributionService)
        Callback for the OSGi declarative services configuration.
        Parameters:
        distributionService - the distributionService to set
      • start

        public org.opencastproject.workflow.api.WorkflowOperationResult start​(org.opencastproject.workflow.api.WorkflowInstance workflowInstance,
                                                                              org.opencastproject.job.api.JobContext context)
                                                                       throws org.opencastproject.workflow.api.WorkflowOperationException
        Specified by:
        start in interface org.opencastproject.workflow.api.WorkflowOperationHandler
        Specified by:
        start in class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
        Throws:
        org.opencastproject.workflow.api.WorkflowOperationException