Class CoverImageWorkflowOperationHandlerBase
java.lang.Object
org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
org.opencastproject.workflow.handler.coverimage.CoverImageWorkflowOperationHandlerBase
- All Implemented Interfaces:
WorkflowOperationHandler
- Direct Known Subclasses:
CoverImageWorkflowOperationHandler
public abstract class CoverImageWorkflowOperationHandlerBase
extends AbstractWorkflowOperationHandler
Base implementation of the cover image workflow operation handler
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
AbstractWorkflowOperationHandler.Configuration -
Field Summary
Fields 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 TypeMethodDescriptionprotected voidappendXml(StringBuilder xml, String name, String body) protected abstract CoverImageServiceReturns a cover image serviceprotected abstract DublinCoreCatalogServiceReturns a dublin core catalog serviceprotected intgetIntConfiguration(WorkflowOperationInstance operation, String key) protected abstract StringReturns value of karaf.etcprotected StringgetMetadataXml(MediaPackage mp, WorkflowOperationInstance operation) protected StringgetPosterImageFileUrl(String posterimageUrlOpt) protected StringgetPosterImageFileUrl(MediaPackage mediaPackage, String posterimageFlavor) protected abstract StaticMetadataServiceReturns a static metadata serviceprotected StringgetValuesAsString(Map.Entry<EName, List<DublinCoreValue>> entry) protected abstract WorkspaceReturns a workspace serviceprotected StringloadXsl(WorkflowOperationInstance operation) 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, setServiceRegistry, skip, toString, waitForStatus, waitForStatus
-
Constructor Details
-
CoverImageWorkflowOperationHandlerBase
public CoverImageWorkflowOperationHandlerBase()
-
-
Method Details
-
getCoverImageService
Returns a cover image service -
getWorkspace
Returns a workspace service -
getStaticMetadataService
Returns a static metadata service -
getDublinCoreCatalogService
Returns a dublin core catalog service -
getKarafEtc
Returns value of karaf.etc -
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:
-
getPosterImageFileUrl
protected String getPosterImageFileUrl(MediaPackage mediaPackage, String posterimageFlavor) throws WorkflowOperationException - Throws:
WorkflowOperationException
-
getPosterImageFileUrl
-
getIntConfiguration
protected int getIntConfiguration(WorkflowOperationInstance operation, String key) throws WorkflowOperationException - Throws:
WorkflowOperationException
-
loadXsl
- Throws:
WorkflowOperationException
-
getMetadataXml
-
getValuesAsString
-
appendXml
-