com.atlassian.jira.plugin.workflow
Class UpdateIssueFieldFunctionPluginFactory

java.lang.Object
  extended by com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
      extended by com.atlassian.jira.plugin.workflow.UpdateIssueFieldFunctionPluginFactory
All Implemented Interfaces:
WorkflowPluginFactory, WorkflowPluginFunctionFactory

public class UpdateIssueFieldFunctionPluginFactory
extends AbstractWorkflowPluginFactory
implements WorkflowPluginFunctionFactory


Field Summary
static String PARAM_FIELD_ID
           
static String PARAM_FIELD_VALUE
           
static String TARGET_FIELD_NAME
           
static String TARGET_FIELD_VALUE
           
 
Constructor Summary
UpdateIssueFieldFunctionPluginFactory(FieldManager fieldManager)
           
 
Method Summary
 Map getDescriptorParams(Map conditionParams)
          Given a set of name:value parameters from the plugin configuration page (ie.
 String getEditHtml(OrderableField field, Object value)
           
protected  void getVelocityParamsForEdit(Map velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
          Populates the given map with velocity parameters for 'edit-parameters' velocity template.
protected  void getVelocityParamsForInput(Map velocityParams)
          Get velocity parameters for 'input-parameters' velocity template.
protected  void getVelocityParamsForView(Map velocityParams, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
          Populates the given map with velocity parameters for 'view' velocity template.
 boolean hasCustomEditTemplate(Field field)
           
 
Methods inherited from class com.atlassian.jira.plugin.workflow.AbstractWorkflowPluginFactory
createMap, extractMultipleParams, extractSingleParam, getVelocityParams
 
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
getVelocityParams
 

Field Detail

PARAM_FIELD_ID

public static final String PARAM_FIELD_ID
See Also:
Constant Field Values

PARAM_FIELD_VALUE

public static final String PARAM_FIELD_VALUE
See Also:
Constant Field Values

TARGET_FIELD_NAME

public static final String TARGET_FIELD_NAME
See Also:
Constant Field Values

TARGET_FIELD_VALUE

public static final String TARGET_FIELD_VALUE
See Also:
Constant Field Values
Constructor Detail

UpdateIssueFieldFunctionPluginFactory

public UpdateIssueFieldFunctionPluginFactory(FieldManager fieldManager)
Method Detail

getVelocityParamsForInput

protected void getVelocityParamsForInput(Map velocityParams)
Description copied from class: AbstractWorkflowPluginFactory
Get velocity parameters for 'input-parameters' velocity template.

Specified by:
getVelocityParamsForInput in class AbstractWorkflowPluginFactory
Parameters:
velocityParams - Map to populate.
See Also:
AbstractWorkflowPluginFactory.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)

getVelocityParamsForEdit

protected void getVelocityParamsForEdit(Map velocityParams,
                                        com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Description copied from class: AbstractWorkflowPluginFactory
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.

Specified by:
getVelocityParamsForEdit in class AbstractWorkflowPluginFactory
Parameters:
velocityParams - Map to populate.
descriptor - Eg. FunctionDescriptor or ConditionDescriptor describing the function/condition and its current configuration.
See Also:
AbstractWorkflowPluginFactory.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)

getVelocityParamsForView

protected void getVelocityParamsForView(Map velocityParams,
                                        com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Description copied from class: AbstractWorkflowPluginFactory
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.

Specified by:
getVelocityParamsForView in class AbstractWorkflowPluginFactory
Parameters:
velocityParams - Map to populate.
descriptor - Eg. a FunctionDescriptor or ConditionDescriptor describing the function/condition and its current configuration.
See Also:
AbstractWorkflowPluginFactory.getVelocityParams(String, com.opensymphony.workflow.loader.AbstractDescriptor)

getDescriptorParams

public Map getDescriptorParams(Map conditionParams)
Description copied from interface: WorkflowPluginFactory
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.

Specified by:
getDescriptorParams in interface WorkflowPluginFactory
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"}

getEditHtml

public String getEditHtml(OrderableField field,
                          Object value)

hasCustomEditTemplate

public boolean hasCustomEditTemplate(Field field)


Copyright © 2002-2012 Atlassian. All Rights Reserved.