Class DuplicateEventWorkflowOperationHandler
java.lang.Object
org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
org.opencastproject.workflow.handler.workflow.DuplicateEventWorkflowOperationHandler
- All Implemented Interfaces:
WorkflowOperationHandler
This WOH duplicates an input event.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
AbstractWorkflowOperationHandler.Configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe prefix to use for the number which is appended to the original title of the event.protected DistributionServiceThe distribution servicestatic final intThe default maximum number of events to create.static final StringName of the configuration option that provides the maximum number of events to createstatic final StringWhether to actually use the number suffix (makes sense in conjunction with "set-series-id"static final StringName of the configuration option that provides the number of events to createstatic final StringThe namespaces of the asset manager properties to copy.static final StringThe series ID that should be set on the copies (if unset, uses the same series)static final StringThe new startDate that should be set on the copies (if unset, uses the old startDate)static final StringThe new title that should be set on the copies (if unset, uses the old title (copy-number-prefix))static final StringName of the configuration option that provides the source flavors we are looking forstatic final StringName of the configuration option that provides the source tags we are looking forstatic final StringName of the configuration option that provides the target tags we should applyFields inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
description, id, serviceRegistry, SOURCE_FLAVOR, SOURCE_FLAVORS, SOURCE_TAG, SOURCE_TAGS, TARGET_FLAVOR, TARGET_FLAVORS, TARGET_TAG, TARGET_TAGS, workspace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAssetManager(AssetManager assetManager) Callback for the OSGi declarative services configuration.voidsetAuthorizationService(AuthorizationService authorizationService) OSGi settervoidsetDistributionService(DistributionService distributionService) Callback for the OSGi declarative services configuration.voidsetSeriesService(SeriesService seriesService) OSGi settervoidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the service registry.voidsetWorkspace(Workspace workspace) Callback for the OSGi declarative services configuration.start(WorkflowInstance workflowInstance, JobContext context) Runs the workflow operation on thisWorkflowInstance.Methods inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
activate, applyTargetTagsToElement, asList, createDerivedMediaPackageElementFrom, createResult, createResult, createResult, createResult, describeFailedJobs, destroy, equals, getConfig, getConfig, getConfig, getDescription, getFileNameFromElements, getId, getOptConfig, getOptConfig, getTagsAndFlavors, getTagsAndFlavors, hashCode, setJobBarrierPollingInterval, skip, toString, waitForStatus, waitForStatus
-
Field Details
-
SOURCE_FLAVORS_PROPERTY
Name of the configuration option that provides the source flavors we are looking for- See Also:
-
SOURCE_TAGS_PROPERTY
Name of the configuration option that provides the source tags we are looking for- See Also:
-
TARGET_TAGS_PROPERTY
Name of the configuration option that provides the target tags we should apply- See Also:
-
NUMBER_PROPERTY
Name of the configuration option that provides the number of events to create- See Also:
-
MAX_NUMBER_PROPERTY
Name of the configuration option that provides the maximum number of events to create- See Also:
-
NO_SUFFIX
Whether to actually use the number suffix (makes sense in conjunction with "set-series-id"- See Also:
-
SET_SERIES_ID
The series ID that should be set on the copies (if unset, uses the same series)- See Also:
-
SET_TITLE
The new title that should be set on the copies (if unset, uses the old title (copy-number-prefix))- See Also:
-
SET_START_DATE
The new startDate that should be set on the copies (if unset, uses the old startDate)- See Also:
-
MAX_NUMBER_DEFAULT
public static final int MAX_NUMBER_DEFAULTThe default maximum number of events to create. Can be overridden.- See Also:
-
PROPERTY_NAMESPACES_PROPERTY
The namespaces of the asset manager properties to copy.- See Also:
-
COPY_NUMBER_PREFIX_PROPERTY
The prefix to use for the number which is appended to the original title of the event.- See Also:
-
distributionService
The distribution service
-
-
Constructor Details
-
DuplicateEventWorkflowOperationHandler
public DuplicateEventWorkflowOperationHandler()
-
-
Method Details
-
setAuthorizationService
OSGi setter- Parameters:
authorizationService-
-
setSeriesService
OSGi setter- Parameters:
seriesService-
-
setAssetManager
Callback for the OSGi declarative services configuration.- Parameters:
assetManager- the asset manager
-
setWorkspace
Callback for the OSGi declarative services configuration.- Parameters:
workspace- the workspace
-
setDistributionService
Callback for the OSGi declarative services configuration.- Parameters:
distributionService- the distributionService to set
-
start
public WorkflowOperationResult start(WorkflowInstance workflowInstance, JobContext context) throws WorkflowOperationException Description copied from class:AbstractWorkflowOperationHandlerRuns the workflow operation on thisWorkflowInstance. If the execution fails for some reason, this must throw aWorkflowOperationExceptionin order to handle the problem gracefully. Runtime exceptions will cause the entire workflow instance to fail.- Specified by:
startin interfaceWorkflowOperationHandler- Specified by:
startin classAbstractWorkflowOperationHandler- Parameters:
workflowInstance- the workflow instancecontext- the job context- Returns:
- the
WorkflowOperationResultcontaining a potentially modified MediaPackage and whether to put the workflow instance into a wait state. - Throws:
WorkflowOperationException- If the workflow operation fails to execute properly, and the default error handling should be invoked.- See Also:
-
setServiceRegistry
Description copied from class:AbstractWorkflowOperationHandlerSets the service registry. This method is here as a convenience for developers that need the registry to do job waiting.- Overrides:
setServiceRegistryin classAbstractWorkflowOperationHandler- Parameters:
serviceRegistry- the service registry
-