com.atlassian.jira.plugin.workflow
Class WorkflowAllowOnlyAssigneeConditionFactoryImpl

java.lang.Object
  extended by com.atlassian.jira.plugin.workflow.WorkflowAllowOnlyAssigneeConditionFactoryImpl
All Implemented Interfaces:
WorkflowPluginConditionFactory, WorkflowPluginFactory

public class WorkflowAllowOnlyAssigneeConditionFactoryImpl
extends Object
implements WorkflowPluginConditionFactory


Constructor Summary
WorkflowAllowOnlyAssigneeConditionFactoryImpl()
           
 
Method Summary
 Map getDescriptorParams(Map conditionParams)
          Given a set of name:value parameters from the plugin configuration page (ie.
 Map getVelocityParams(String resourceName, com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
          Given a plugin resource name, return the parameters it needs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowAllowOnlyAssigneeConditionFactoryImpl

public WorkflowAllowOnlyAssigneeConditionFactoryImpl()
Method Detail

getVelocityParams

public Map getVelocityParams(String resourceName,
                             com.opensymphony.workflow.loader.AbstractDescriptor descriptor)
Description copied from interface: WorkflowPluginFactory
Given a plugin resource name, return the parameters it needs. When workflow editor is rendering or configuring a workflow condition, this method will be called to fill in a Velocity template.

Specified by:
getVelocityParams in interface WorkflowPluginFactory
Parameters:
resourceName - Typically "view", "input-parameters" or "edit-parameters".
descriptor - A ConditionDescriptor describing the Condition and its current configuration.
Returns:
Map of params, eg. {"group": ['jira-users', 'jira-developers']}

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"}


Copyright © 2002-2009 Atlassian. All Rights Reserved.