Class ConfigurablePublishWorkflowOperationHandler
java.lang.Object
org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
org.opencastproject.workflow.handler.distribution.ConfigurableWorkflowOperationHandlerBase
org.opencastproject.workflow.handler.distribution.ConfigurablePublishWorkflowOperationHandler
- All Implemented Interfaces:
WorkflowOperationHandler
- Direct Known Subclasses:
ConfigurableAWSS3PublishWorkflowOperationHandler
public class ConfigurablePublishWorkflowOperationHandler
extends ConfigurableWorkflowOperationHandlerBase
WOH that distributes selected elements to an internal distribution channel and adds reflective publication elements
to the media package.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
AbstractWorkflowOperationHandler.Configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe template key for adding the mediapackage / event id to the publication path.protected static final StringThe template key name prefix for organization keysprotected static final StringThe template key for adding the player location path to the publication path.protected static final StringThe configuration property value for the player location.protected static final StringThe template key for adding the publication id to the publication path.protected static final StringThe template key for adding the series id to the publication path.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 DownloadDistributionServiceprotected StreamingDistributionServicepopulateUrlWithVariables(String urlPattern, MediaPackage mp, String pubUUID) Replace possible variables in the url-pattern configuration for this workflow operation handler.protected voidsetSecurityService(SecurityService securityService) OSGi DIvoidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the service registry.start(WorkflowInstance workflowInstance, JobContext context) Runs the workflow operation on thisWorkflowInstance.Methods inherited from class org.opencastproject.workflow.handler.distribution.ConfigurableWorkflowOperationHandlerBase
getPublications, retractMethods 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
-
EVENT_ID_TEMPLATE_KEY
The template key for adding the mediapackage / event id to the publication path.- See Also:
-
PLAYER_PATH_TEMPLATE_KEY
The template key for adding the player location path to the publication path.- See Also:
-
PUBLICATION_ID_TEMPLATE_KEY
The template key for adding the publication id to the publication path.- See Also:
-
SERIES_ID_TEMPLATE_KEY
The template key for adding the series id to the publication path.- See Also:
-
PLAYER_PROPERTY
The configuration property value for the player location.- See Also:
-
ORG_TEMPLATE_KEY_PREFIX
The template key name prefix for organization keys- See Also:
-
-
Constructor Details
-
ConfigurablePublishWorkflowOperationHandler
public ConfigurablePublishWorkflowOperationHandler()
-
-
Method Details
-
setSecurityService
OSGi DI -
getDownloadDistributionService
-
getStreamingDistributionService
-
populateUrlWithVariables
public URI populateUrlWithVariables(String urlPattern, MediaPackage mp, String pubUUID) throws WorkflowOperationException Replace possible variables in the url-pattern configuration for this workflow operation handler.- Parameters:
urlPattern- The operation's template for replacing the variables.mp- TheMediaPackageused to get the event / mediapackage id.pubUUID- The UUID for the published element.- Returns:
- The URI of the published element with the variables replaced.
- Throws:
WorkflowOperationException- Thrown if the URI is malformed after replacing the variables.
-
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:
-
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
-