public abstract class

AbstractWorkflowPluginFactory

extends Object
implements WorkflowPluginFactory
java.lang.Object
   ↳ com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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.

Summary

Public Constructors
AbstractWorkflowPluginFactory()
Public Methods
Map<StringObject> getVelocityParams(String resourceName, AbstractDescriptor descriptor)
Creates a Map of parameters for a view-specific velocity context given the name of the resource (i.e.
Protected Methods
Map<StringString> createMap(Map<StringString> extractedParams)
Map<String, ?> extractMultipleParams(Map<StringObject> params, Collection<String> paramNames)
String extractSingleParam(Map<StringObject> conditionParams, String paramName)
abstract void getVelocityParamsForEdit(Map<StringObject> velocityParams, AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'edit-parameters' velocity template.
abstract void getVelocityParamsForInput(Map<StringObject> velocityParams)
Get velocity parameters for 'input-parameters' velocity template.
abstract void getVelocityParamsForView(Map<StringObject> velocityParams, AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'view' velocity template.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.plugin.workflow.WorkflowPluginFactory

Public Constructors

public AbstractWorkflowPluginFactory ()

Public Methods

public Map<StringObject> getVelocityParams (String resourceName, 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.

Parameters
resourceName the name of the velocity
descriptor A com.opensymphony.workflow.loader.ConditionDescriptor describing the Condition and its current configuration.
Returns
  • the populated velocity params.

Protected Methods

protected Map<StringString> createMap (Map<StringString> extractedParams)

protected Map<String, ?> extractMultipleParams (Map<StringObject> params, Collection<String> paramNames)

protected String extractSingleParam (Map<StringObject> conditionParams, String paramName)

protected abstract void getVelocityParamsForEdit (Map<StringObject> velocityParams, AbstractDescriptor descriptor)

Populates the given map with velocity parameters for 'edit-parameters' velocity template. Typically an implementation would call descriptor.getArgs() to retrieve the current configuration, and populate velocityParams from that.

Parameters
velocityParams Map to populate.
descriptor Eg. FunctionDescriptor or ConditionDescriptor describing the function/condition and its current configuration.

protected abstract void getVelocityParamsForInput (Map<StringObject> velocityParams)

Get velocity parameters for 'input-parameters' velocity template.

Parameters
velocityParams Map to populate.

protected abstract void getVelocityParamsForView (Map<StringObject> velocityParams, AbstractDescriptor descriptor)

Populates the given map with velocity parameters for 'view' velocity template. Eg. call descriptor.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. a FunctionDescriptor or ConditionDescriptor describing the function/condition and its current configuration.