Class CopyWorkflowOperationHandler
java.lang.Object
org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
org.opencastproject.workflow.handler.workflow.CopyWorkflowOperationHandler
- All Implemented Interfaces:
WorkflowOperationHandler
Workflow operation handler for copying video data through NFS
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
AbstractWorkflowOperationHandler.Configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration key for the \"flavor\" of the track to use as a source inputstatic final StringConfiguration key for the \"tag\" of the track to use as a source inputstatic final StringConfiguration key for the directory where the file must be deliveredstatic final StringConfiguration key for the name of the target fileprotected WorkspaceThe workspace referenceFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the service registry.protected voidsetWorkspace(Workspace workspace) Callback for the OSGi environment to set the workspace reference.start(WorkflowInstance workflowInstance, JobContext context) Runs the workflow operation on thisWorkflowInstance.Methods inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
activate, applyTargetTagsToElement, asList, createResult, createResult, createResult, createResult, destroy, equals, getCfg, getConfig, getConfig, getConfig, getDescription, getFileNameFromElements, getId, getOptConfig, getOptConfig, getTagsAndFlavors, hashCode, setJobBarrierPollingInterval, skip, toString, waitForStatus, waitForStatus
-
Field Details
-
OPT_SOURCE_TAGS
Configuration key for the \"tag\" of the track to use as a source input- See Also:
-
OPT_SOURCE_FLAVORS
Configuration key for the \"flavor\" of the track to use as a source input- See Also:
-
OPT_TARGET_DIRECTORY
Configuration key for the directory where the file must be delivered- See Also:
-
OPT_TARGET_FILENAME
Configuration key for the name of the target file- See Also:
-
workspace
The workspace reference
-
-
Constructor Details
-
CopyWorkflowOperationHandler
public CopyWorkflowOperationHandler()
-
-
Method Details
-
setWorkspace
Callback for the OSGi environment to set the workspace reference.- Parameters:
workspace- the workspace
-
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:
-
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
-