public abstract class AbstractWorkflowPluginFactory extends Object implements WorkflowPluginFactory
WorkflowPluginFactory
class that most concrete implementations should extend.
A WorkflowPluginFactory mainly exists to provide velocity parameters to the templates.
WorkflowPluginFactory implements methods used to configure a workflow plugin.
Generally there will be a WorkflowPluginFactory implementation for each workflow plugin type.Constructor and Description |
---|
AbstractWorkflowPluginFactory() |
Modifier and Type | Method and Description |
---|---|
protected Map<String,String> |
createMap(Map<String,String> extractedParams) |
protected Map<String,?> |
extractMultipleParams(Map<String,Object> params,
Collection<String> paramNames) |
protected String |
extractSingleParam(Map<String,Object> conditionParams,
String paramName) |
Map<String,Object> |
getVelocityParams(String resourceName,
com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Creates a Map of parameters for a view-specific velocity context given
the name of the resource (i.e.
|
protected abstract void |
getVelocityParamsForEdit(Map<String,Object> velocityParams,
com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'edit-parameters' velocity template.
|
protected abstract void |
getVelocityParamsForInput(Map<String,Object> velocityParams)
Get velocity parameters for 'input-parameters' velocity template.
|
protected abstract void |
getVelocityParamsForView(Map<String,Object> velocityParams,
com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'view' velocity template.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescriptorParams
public Map<String,Object> getVelocityParams(String resourceName, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
getVelocityParams
in interface WorkflowPluginFactory
resourceName
- the name of the velocitydescriptor
- protected abstract void getVelocityParamsForInput(Map<String,Object> velocityParams)
velocityParams
- Map to populate.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)
protected abstract void getVelocityParamsForEdit(Map<String,Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
descriptor.getArgs()
to retrieve the current configuration, and populate velocityParams from that.velocityParams
- Map to populate.descriptor
- Eg. FunctionDescriptor
or ConditionDescriptor
describing the function/condition and its current configuration.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)
protected abstract void getVelocityParamsForView(Map<String,Object> velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
descriptor.getArgs()
to retrieve the current
configuration, look up a displayable string for the value and and populate velocityParams with that.velocityParams
- Map to populate.descriptor
- Eg. a FunctionDescriptor
or ConditionDescriptor
describing the function/condition and its current configuration.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)
protected Map<String,?> extractMultipleParams(Map<String,Object> params, Collection<String> paramNames)
protected String extractSingleParam(Map<String,Object> conditionParams, String paramName)
Copyright © 2002-2022 Atlassian. All Rights Reserved.