Class CleanupWorkflowOperationHandler
- java.lang.Object
-
- org.opencastproject.workflow.api.AbstractWorkflowOperationHandler
-
- org.opencastproject.workflow.handler.workflow.CleanupWorkflowOperationHandler
-
- All Implemented Interfaces:
org.opencastproject.workflow.api.WorkflowOperationHandler
public class CleanupWorkflowOperationHandler extends org.opencastproject.workflow.api.AbstractWorkflowOperationHandlerRemoves all files in the working file repository for mediapackage elements that don't match one of the "preserve-flavors" configuration value.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.opencastproject.security.api.TrustedHttpClientclientThe http client to use when connecting to remote serversstatic StringDELAYTime to wait in seconds before removing filesstatic StringDELETE_EXTERNALDeleting external URI's config keystatic StringPRESERVE_FLAVOR_PROPERTYThe element flavors to maintain in the original mediapackage.protected org.opencastproject.workspace.api.WorkspaceworkspaceThe workspace to use in retrieving and storing files.
-
Constructor Summary
Constructors Constructor Description CleanupWorkflowOperationHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUpJobArgument(org.opencastproject.workflow.api.WorkflowInstance workflowInstance)Deletes JobArguments for every finished Job of the WorkfloInstancevoidsetTrustedHttpClient(org.opencastproject.security.api.TrustedHttpClient client)Sets the trusted http clientvoidsetWorkspace(org.opencastproject.workspace.api.Workspace workspace)Sets the workspace to use.org.opencastproject.workflow.api.WorkflowOperationResultstart(org.opencastproject.workflow.api.WorkflowInstance workflowInstance, org.opencastproject.job.api.JobContext context)-
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, hashCode, setJobBarrierPollingInterval, setServiceRegistry, skip, toString, waitForStatus, waitForStatus
-
-
-
-
Field Detail
-
PRESERVE_FLAVOR_PROPERTY
public static final String PRESERVE_FLAVOR_PROPERTY
The element flavors to maintain in the original mediapackage. All others will be removed- See Also:
- Constant Field Values
-
DELETE_EXTERNAL
public static final String DELETE_EXTERNAL
Deleting external URI's config key- See Also:
- Constant Field Values
-
DELAY
public static final String DELAY
Time to wait in seconds before removing files- See Also:
- Constant Field Values
-
workspace
protected org.opencastproject.workspace.api.Workspace workspace
The workspace to use in retrieving and storing files.
-
client
protected org.opencastproject.security.api.TrustedHttpClient client
The http client to use when connecting to remote servers
-
-
Method Detail
-
setWorkspace
public void setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
Sets the workspace to use.- Parameters:
workspace- the workspace
-
setTrustedHttpClient
public void setTrustedHttpClient(org.opencastproject.security.api.TrustedHttpClient client)
Sets the trusted http client- Parameters:
client- the trusted http client
-
cleanUpJobArgument
public void cleanUpJobArgument(org.opencastproject.workflow.api.WorkflowInstance workflowInstance)
Deletes JobArguments for every finished Job of the WorkfloInstance- Parameters:
workflowInstance-
-
start
public org.opencastproject.workflow.api.WorkflowOperationResult start(org.opencastproject.workflow.api.WorkflowInstance workflowInstance, org.opencastproject.job.api.JobContext context) throws org.opencastproject.workflow.api.WorkflowOperationException- Specified by:
startin interfaceorg.opencastproject.workflow.api.WorkflowOperationHandler- Specified by:
startin classorg.opencastproject.workflow.api.AbstractWorkflowOperationHandler- Throws:
org.opencastproject.workflow.api.WorkflowOperationException- See Also:
AbstractWorkflowOperationHandler.start(org.opencastproject.workflow.api.WorkflowInstance, JobContext)
-
-