Class ExecuteManyWorkflowOperationHandler
java.lang.Object
org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
org.opencastproject.execute.operation.handler.ExecuteManyWorkflowOperationHandler
- All Implemented Interfaces:
WorkflowOperationHandler
Runs an operation multiple times with each MediaPackageElement matching the characteristics
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
AbstractWorkflowOperationHandler.Configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty containing the command to runprotected ExecuteServiceThe text analyzerstatic final StringProperty containing the expected type of the element generated by this operationstatic final StringProperty containingn an approximation of the load imposed by running this operationstatic final StringProperty containing the filename of the elements created by this operationstatic final StringProperty containing the list of command parametersstatic final StringProperty to control whether command output will be used to set workflow propertiesstatic final StringProperty defining whether the track is required to contain or not contain an audio stream to be used an inputstatic final StringProperty containing the "flavor" that a mediapackage elements must have in order to be used as input argumentsstatic final StringProperty defining whether the track is required to contain or not contain a subtitle stream to be used an inputstatic final StringProperty containing the tags that must exist on a mediapackage element for the element to be used as an input argumentsstatic final StringProperty defining whether the track is required to contain or not contain a video stream to be used an inputstatic final StringProperty containing the flavor that the resulting mediapackage elements will be assignedstatic final StringProperty containing the tags that the resulting mediapackage elements will be assignedprotected WorkspaceThe workspace serviceFields inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
asList, description, id, serviceRegistry, SOURCE_FLAVOR, SOURCE_FLAVORS, SOURCE_TAG, SOURCE_TAGS, TARGET_FLAVOR, TARGET_FLAVORS, TARGET_TAG, TARGET_TAGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy(WorkflowInstance workflowInstance, JobContext context) Clean up after a workflow operation finishesReturns a description of what this handler does.getId()The identifier used to map a workflow operation to its handlervoidsetExecuteService(ExecuteService service) Sets the serviceprotected voidsetMediaInspectionService(MediaInspectionService mediaInspectionService) Sets the media inspection servicevoidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the service registry.voidsetWorkspace(Workspace workspace) Sets a reference to the workspace service.skip(WorkflowInstance workflowInstance, JobContext context) Skips the workflow operation on thisWorkflowInstance.start(WorkflowInstance workflowInstance, JobContext context) Runs the workflow operation on thisWorkflowInstance.Methods inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
activate, asList, cfgKeyMissing, createResult, createResult, createResult, createResult, equals, getCfg, getConfig, getConfig, getConfig, getFileNameFromElements, getOptConfig, getOptConfig, getTagsAndFlavors, hashCode, setJobBarrierPollingInterval, toString, waitForStatus, waitForStatus
-
Field Details
-
EXEC_PROPERTY
Property containing the command to run- See Also:
-
PARAMS_PROPERTY
Property containing the list of command parameters- See Also:
-
LOAD_PROPERTY
Property containingn an approximation of the load imposed by running this operation- See Also:
-
SOURCE_FLAVOR_PROPERTY
Property containing the "flavor" that a mediapackage elements must have in order to be used as input arguments- See Also:
-
OUTPUT_FILENAME_PROPERTY
Property containing the filename of the elements created by this operation- See Also:
-
EXPECTED_TYPE_PROPERTY
Property containing the expected type of the element generated by this operation- See Also:
-
SOURCE_TAGS_PROPERTY
Property containing the tags that must exist on a mediapackage element for the element to be used as an input arguments- See Also:
-
SOURCE_AUDIO_PROPERTY
Property defining whether the track is required to contain or not contain an audio stream to be used an input- See Also:
-
SOURCE_VIDEO_PROPERTY
Property defining whether the track is required to contain or not contain a video stream to be used an input- See Also:
-
SOURCE_SUBTITLE_PROPERTY
Property defining whether the track is required to contain or not contain a subtitle stream to be used an input- See Also:
-
TARGET_FLAVOR_PROPERTY
Property containing the flavor that the resulting mediapackage elements will be assigned- See Also:
-
TARGET_TAGS_PROPERTY
Property containing the tags that the resulting mediapackage elements will be assigned- See Also:
-
SET_WF_PROPS_PROPERTY
Property to control whether command output will be used to set workflow properties- See Also:
-
executeService
The text analyzer -
workspace
The workspace service
-
-
Constructor Details
-
ExecuteManyWorkflowOperationHandler
public ExecuteManyWorkflowOperationHandler()
-
-
Method Details
-
start
public WorkflowOperationResult start(WorkflowInstance workflowInstance, JobContext context) throws WorkflowOperationException Runs 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:
-
skip
public WorkflowOperationResult skip(WorkflowInstance workflowInstance, JobContext context) throws WorkflowOperationException Skips 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:
skipin interfaceWorkflowOperationHandler- Overrides:
skipin classAbstractWorkflowOperationHandler- Parameters:
workflowInstance- the workflow instancecontext- the job context- Returns:
- TODO
- Throws:
WorkflowOperationException- If the workflow operation fails to execute properly, and the default error handling should be invoked.- See Also:
-
getId
Description copied from class:AbstractWorkflowOperationHandlerThe identifier used to map a workflow operation to its handler- Specified by:
getIdin interfaceWorkflowOperationHandler- Overrides:
getIdin classAbstractWorkflowOperationHandler- Returns:
- This handler's identifier
- See Also:
-
getDescription
Description copied from class:AbstractWorkflowOperationHandlerReturns a description of what this handler does.- Specified by:
getDescriptionin interfaceWorkflowOperationHandler- Overrides:
getDescriptionin classAbstractWorkflowOperationHandler- Returns:
- The handler's description
- See Also:
-
destroy
public void destroy(WorkflowInstance workflowInstance, JobContext context) throws WorkflowOperationException Description copied from class:AbstractWorkflowOperationHandlerClean up after a workflow operation finishes- Specified by:
destroyin interfaceWorkflowOperationHandler- Overrides:
destroyin classAbstractWorkflowOperationHandler- Parameters:
workflowInstance- The workflow instancecontext- the job context- Throws:
WorkflowOperationException- If the workflow operation fails to clean up properly.- See Also:
-
setExecuteService
Sets the service- Parameters:
service-
-
setWorkspace
Sets a reference to the workspace service.- Parameters:
workspace-
-
setMediaInspectionService
Sets the media inspection service- Parameters:
mediaInspectionService- an instance of the media inspection service
-
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
-