Class ImageWorkflowOperationHandler
java.lang.Object
org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
org.opencastproject.workflow.handler.composer.ImageWorkflowOperationHandler
- All Implemented Interfaces:
WorkflowOperationHandler
The workflow definition for handling "image" operations
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
AbstractWorkflowOperationHandler.Configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final doubleFields 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 TypeMethodDescriptionstatic com.entwinemedia.fn.Fn<String, EncodingProfile> fetchProfile(ComposerService composerService) Fetch a profile from the composer service.static <E extends MediaPackageElement,S extends AbstractMediaPackageElementSelector<E>>
com.entwinemedia.fn.StreamFold<MediaPackageElementFlavor, S> flavorFold(S selector) Create a fold that folds flavors into a media package element selector.protected voidsetComposerService(ComposerService composerService) Callback for the OSGi declarative services configuration.voidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the service registry.voidsetWorkspace(Workspace workspace) Callback for declarative services configuration that will introduce us to the local workspace service.start(WorkflowInstance wi, JobContext ctx) Runs the workflow operation on thisWorkflowInstance.static <E extends MediaPackageElement,S extends AbstractMediaPackageElementSelector<E>>
com.entwinemedia.fn.StreamFold<String, S> tagFold(S selector) Create a fold that folds tags into a media package element selector.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, getTagsAndFlavors, hashCode, setJobBarrierPollingInterval, skip, toString, waitForStatus, waitForStatus
-
Field Details
-
OPT_PROFILES
- See Also:
-
OPT_POSITIONS
- See Also:
-
OPT_TARGET_BASE_NAME_FORMAT_SECOND
- See Also:
-
OPT_TARGET_BASE_NAME_FORMAT_PERCENT
- See Also:
-
OPT_END_MARGIN
- See Also:
-
SINGLE_FRAME_POS
public static final double SINGLE_FRAME_POS- See Also:
-
-
Constructor Details
-
ImageWorkflowOperationHandler
public ImageWorkflowOperationHandler()
-
-
Method Details
-
setComposerService
Callback for the OSGi declarative services configuration.- Parameters:
composerService- the composer service
-
setWorkspace
Callback for declarative services configuration that will introduce us to the local workspace service. Implementation assumes that the reference is configured as being static.- Parameters:
workspace- an instance of the workspace
-
start
public WorkflowOperationResult start(WorkflowInstance wi, JobContext ctx) 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:
wi- the workflow instancectx- 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:
-
flavorFold
public static <E extends MediaPackageElement,S extends AbstractMediaPackageElementSelector<E>> com.entwinemedia.fn.StreamFold<MediaPackageElementFlavor,S> flavorFold(S selector) Create a fold that folds flavors into a media package element selector. -
tagFold
public static <E extends MediaPackageElement,S extends AbstractMediaPackageElementSelector<E>> com.entwinemedia.fn.StreamFold<String,S> tagFold(S selector) Create a fold that folds tags into a media package element selector. -
fetchProfile
public static com.entwinemedia.fn.Fn<String,EncodingProfile> fetchProfile(ComposerService composerService) Fetch a profile from the composer service. Throw a WorkflowOperationException in case the profile does not exist. -
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
-