public class

WorkflowUserPermissionValidatorPluginFactory

extends AbstractWorkflowPermissionPluginFactory
implements WorkflowPluginValidatorFactory
java.lang.Object
   ↳ com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
     ↳ com.atlassian.jira.plugin.workflow.AbstractWorkflowPermissionPluginFactory
       ↳ com.atlassian.jira.plugin.workflow.WorkflowUserPermissionValidatorPluginFactory

Summary

Public Constructors
WorkflowUserPermissionValidatorPluginFactory(SchemePermissions schemePermissions)
Public Methods
Map<String, ?> getDescriptorParams(Map<StringObject> conditionParams)
Given a set of name:value parameters from the plugin configuration page (ie.
Protected Methods
Map<StringString> createMap(Map<StringString> extractedParams)
void getVelocityParamsForEdit(Map<StringObject> velocityParams, AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'edit-parameters' velocity template.
void getVelocityParamsForInput(Map<StringObject> velocityParams)
Get velocity parameters for 'input-parameters' velocity template.
void getVelocityParamsForView(Map<StringObject> velocityParams, AbstractDescriptor descriptor)
Populates the given map with velocity parameters for 'view' velocity template.
[Expand]
Inherited Methods
From class com.atlassian.jira.plugin.workflow.AbstractWorkflowPermissionPluginFactory
From class com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
From class java.lang.Object
From interface com.atlassian.jira.plugin.workflow.WorkflowPluginFactory

Public Constructors

public WorkflowUserPermissionValidatorPluginFactory (SchemePermissions schemePermissions)

Public Methods

public Map<String, ?> getDescriptorParams (Map<StringObject> conditionParams)

Given a set of name:value parameters from the plugin configuration page (ie. the 'input-parameters' velocity template) return a map of sanitized parameters which will be passed into workflow plugin instances. For example, the results are passed in the 'arg' parameter of post-functions' execute() or conditions' passesCondition methods. The velocity page often submits values in array form, and this method extracts just the relevant value.

Parameters
conditionParams Parameters from the velocity template, eg. {"fieldId" : ["assignee"], "fieldValue":["-1"]}
Returns
  • Parameters to be passed into workflow functions via the 'args' map. Eg. {"assignee": "-1"}

Protected Methods

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

protected 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 void getVelocityParamsForInput (Map<StringObject> velocityParams)

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

Parameters
velocityParams Map to populate.

protected 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.