Package org.opencastproject.workflow.api
Class WorkflowOperationResultImpl
java.lang.Object
org.opencastproject.workflow.api.WorkflowOperationResultImpl
- All Implemented Interfaces:
WorkflowOperationResult
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencastproject.workflow.api.WorkflowOperationResult
WorkflowOperationResult.Action -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WorkflowOperationResult.Actionprotected booleanprotected booleanprotected MediaPackageprotected longprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionNo arg constructor needed by JAXBWorkflowOperationResultImpl(MediaPackage resultingMediaPackage, Map<String, String> properties, WorkflowOperationResult.Action action, long timeInQueue) Constructs a new WorkflowOperationResultImpl from a mediapackage and an action. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif this operation can be canceled by the user from an optional hold state.booleanReturnstrueif this operation can be continued by the user from an optional hold state.Operations may optionally request that the workflow be placed in a certain state.Operations may optionally set properties on a workflow operation.longThe number of milliseconds this operation sat in a queue before finishing.voidSets the action that the workflow service should take on the workflow instancevoidsetAllowsAbort(boolean isAbortable) Specifies whether the operation should be abortable by the user.voidsetAllowsContinue(boolean isContinuable) Specifies whether the operation should be continuable by the user.voidsetMediaPackage(MediaPackage mediaPackage) Sets the resulting media package.
-
Field Details
-
resultingMediaPackage
-
properties
-
action
-
timeInQueue
protected long timeInQueue -
wait
protected boolean wait -
isContinuable
protected boolean isContinuable -
isAbortable
protected boolean isAbortable
-
-
Constructor Details
-
WorkflowOperationResultImpl
public WorkflowOperationResultImpl()No arg constructor needed by JAXB -
WorkflowOperationResultImpl
public WorkflowOperationResultImpl(MediaPackage resultingMediaPackage, Map<String, String> properties, WorkflowOperationResult.Action action, long timeInQueue) Constructs a new WorkflowOperationResultImpl from a mediapackage and an action.- Parameters:
resultingMediaPackage-action-
-
-
Method Details
-
getMediaPackage
- Specified by:
getMediaPackagein interfaceWorkflowOperationResult- Returns:
- The media package that results from the execution of a workflow operation.
- See Also:
-
setMediaPackage
Sets the resulting media package.- Parameters:
mediaPackage-
-
getAction
Operations may optionally request that the workflow be placed in a certain state.- Specified by:
getActionin interfaceWorkflowOperationResult- Returns:
- The action that the workflow service should take on this workflow instance.
- See Also:
-
setAction
Sets the action that the workflow service should take on the workflow instance- Specified by:
setActionin interfaceWorkflowOperationResult- Parameters:
action-
-
getProperties
Operations may optionally set properties on a workflow operation.- Specified by:
getPropertiesin interfaceWorkflowOperationResult- Returns:
- The properties to set
- See Also:
-
getTimeInQueue
public long getTimeInQueue()The number of milliseconds this operation sat in a queue before finishing.- Specified by:
getTimeInQueuein interfaceWorkflowOperationResult- Returns:
- The time spent in a queue
- See Also:
-
setAllowsAbort
public void setAllowsAbort(boolean isAbortable) Specifies whether the operation should be abortable by the user.- Specified by:
setAllowsAbortin interfaceWorkflowOperationResult- Parameters:
isAbortable-
-
allowsAbort
public boolean allowsAbort()Returnstrueif this operation can be canceled by the user from an optional hold state. This value is only considered if the action returned by this result equalsWorkflowOperationResult.Action.PAUSE.- Specified by:
allowsAbortin interfaceWorkflowOperationResult- Returns:
trueif a paused operation should be abortable- See Also:
-
setAllowsContinue
public void setAllowsContinue(boolean isContinuable) Specifies whether the operation should be continuable by the user.- Specified by:
setAllowsContinuein interfaceWorkflowOperationResult- Parameters:
isContinuable-
-
allowsContinue
public boolean allowsContinue()Returnstrueif this operation can be continued by the user from an optional hold state. This value is only considered if the action returned by this result equalsWorkflowOperationResult.Action.PAUSE.- Specified by:
allowsContinuein interfaceWorkflowOperationResult- Returns:
trueif a paused operation should be continuable- See Also:
-