Class AbstractWorkflowPluginFactory
java.lang.Object
com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
- All Implemented Interfaces:
WorkflowPluginFactory
- Direct Known Subclasses:
AbstractWorkflowPermissionPluginFactory
,ReferenceWorkflowModuleFactory
,TriggerWebHookFunctionPluginFactory
,UpdateIssueFieldFunctionPluginFactory
,WorkflowAlwaysFalseConditionFactoryImpl
,WorkflowChangeHistoryFunctionPluginFactory
,WorkflowFireIssueEventFunctionPluginFactory
,WorkflowIsUserInGroupCFConditionFactoryImpl
,WorkflowIsUserInGroupConditionFactoryImpl
,WorkflowIsUserInProjectRoleConditionFactoryImpl
,WorkflowNoInputPluginFactory
,WorkflowSubTaskBlockingConditionFactoryImpl
,WorkflowUberFunctionPluginFactory
A base
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractMultipleParams
(Map<String, Object> params, Collection<String> paramNames) protected String
extractSingleParam
(Map<String, Object> conditionParams, String paramName) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.jira.plugin.workflow.WorkflowPluginFactory
getDescriptorParams
-
Constructor Details
-
AbstractWorkflowPluginFactory
public AbstractWorkflowPluginFactory()
-
-
Method Details
-
getVelocityParams
public 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. configured velocity template name: one of view, input-parameters or edit-parameters) and delegates the parameter adding to the appropriate abstract method for that view.- Specified by:
getVelocityParams
in interfaceWorkflowPluginFactory
- Parameters:
resourceName
- the name of the velocitydescriptor
-- Returns:
- the populated velocity params.
-
getVelocityParamsForInput
Get velocity parameters for 'input-parameters' velocity template.- Parameters:
velocityParams
- Map to populate.- See Also:
-
getVelocityParamsForEdit
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. Typically an implementation would calldescriptor.getArgs()
to retrieve the current configuration, and populate velocityParams from that.- Parameters:
velocityParams
- Map to populate.descriptor
- Eg.FunctionDescriptor
orConditionDescriptor
describing the function/condition and its current configuration.- See Also:
-
getVelocityParamsForView
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. Eg. calldescriptor.getArgs()
to retrieve the current configuration, look up a displayable string for the value and and populate velocityParams with that.- Parameters:
velocityParams
- Map to populate.descriptor
- Eg. aFunctionDescriptor
orConditionDescriptor
describing the function/condition and its current configuration.- See Also:
-
extractMultipleParams
-
extractSingleParam
-
createMap
-