Class WorkflowDefinition
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workflow.definition.WorkflowDefinition
- All Implemented Interfaces:
LogEnabled
,PluginAware
,Component
,Configurable
,Serviceable
- Direct Known Subclasses:
AutomaticWorkflowDefinition
public class WorkflowDefinition
extends AbstractLogEnabled
implements Component, Serviceable, Configurable, PluginAware
Object to describe a workflow.
-
Field Summary
Modifier and TypeFieldDescriptionprotected SourceResolver
The source resolverprotected WorkflowHelper
The workflow helper -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) Get the default catalog for the workflow name.protected InputStream
Get the workflow definitioncom.opensymphony.workflow.loader.WorkflowDescriptor
getDescriptor
(boolean validate) Get or load the workflow descriptor.getLabel()
Get the workflow label.Get the location of the workflow file.void
reset()
Method to reset the workflow.void
service
(ServiceManager manager) void
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_srcResolver
The source resolver -
_workflowHelper
The workflow helper
-
-
Constructor Details
-
WorkflowDefinition
public WorkflowDefinition()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getDefaultCatalog
Get the default catalog for the workflow name.- Returns:
- the default catalog
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
getLabel
Get the workflow label.- Returns:
- The workflow label, default is plugin.[pluginName]:WORKFLOW_[workflowNameUpperCased]
-
getLocation
Get the location of the workflow file.- Returns:
- the location of the workflow file
-
getDescriptor
public com.opensymphony.workflow.loader.WorkflowDescriptor getDescriptor(boolean validate) throws Exception Get or load the workflow descriptor.- Parameters:
validate
- if the descriptor has to be valid- Returns:
- the workflow descriptor
- Throws:
Exception
- if an error occurs
-
getDefinition
Get the workflow definition- Returns:
- the workflow definition
- Throws:
IOException
- if an error occurred
-
reset
Method to reset the workflow.
-