com.atlassian.jira.workflow
Class WorkflowFunctionUtils

java.lang.Object
  extended by com.atlassian.jira.workflow.WorkflowFunctionUtils
Direct Known Subclasses:
AbstractJiraCondition, AbstractJiraFunctionProvider

public class WorkflowFunctionUtils
extends Object

Useful methods for JIRA OSWorkflow conditions and functions. Use the subclasses for real implementations.


Field Summary
static String ORIGINAL_ISSUE_KEY
           
static String ORIGNAL_ISSUE_KEY
          Deprecated. - typo in name, please use ORIGINAL_ISSUE_KEY. Deprecated since v4.0
 
Constructor Summary
WorkflowFunctionUtils()
           
 
Method Summary
protected  com.atlassian.crowd.embedded.api.User getCaller(Map transientVars, Map args)
          Deprecated. Use getCallerUser(java.util.Map, java.util.Map) instead. Since v6.0.
static String getCallerKey(Map transientVars, Map args)
          Get the Key of user executing this condition.
protected  String getCallerName(Map transientVars, Map args)
          Deprecated. Use getCallerUser(java.util.Map, java.util.Map) instead. Since v6.0.
protected  ApplicationUser getCallerUser(Map transientVars, Map args)
          Get the ApplicationUser executing this condition.
static ApplicationUser getCallerUserFromArgs(Map transientVars, Map args)
          Get the ApplicationUser executing this condition.
static void populateParamsWithUser(Map<String,Object> params, ApplicationUser user)
          Populate given map of parameters with data which can identify user, in order to be able retrieve ApplicationUser later via getCallerUserFromArgs(java.util.Map, java.util.Map)

If you want to pass parameters explicitly, please use populateParamsWithUser(java.util.Map, String)

static void populateParamsWithUser(Map<String,Object> params, String userKey)
          Populate given map of parameters with data which can identify user, in order to be able retrieve ApplicationUser later via getCallerUserFromArgs(java.util.Map, java.util.Map)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORIGINAL_ISSUE_KEY

public static final String ORIGINAL_ISSUE_KEY
See Also:
Constant Field Values

ORIGNAL_ISSUE_KEY

public static final String ORIGNAL_ISSUE_KEY
Deprecated. - typo in name, please use ORIGINAL_ISSUE_KEY. Deprecated since v4.0
See Also:
Constant Field Values
Constructor Detail

WorkflowFunctionUtils

public WorkflowFunctionUtils()
Method Detail

getCallerName

protected String getCallerName(Map transientVars,
                               Map args)
Deprecated. Use getCallerUser(java.util.Map, java.util.Map) instead. Since v6.0.

Get the name of the user executing this condition.

Parameters:
transientVars - workflow context - parameters passed to workflow engine
args - workflow's function arguments
Returns:
Username, or null if run anonymously.

getCaller

protected com.atlassian.crowd.embedded.api.User getCaller(Map transientVars,
                                                          Map args)
Deprecated. Use getCallerUser(java.util.Map, java.util.Map) instead. Since v6.0.

Get the User executing this condition.

Parameters:
transientVars - workflow context - parameters passed to workflow engine
args - workflow's function arguments
Returns:
The User, or null if run anonymously.

getCallerUser

protected ApplicationUser getCallerUser(Map transientVars,
                                        Map args)
Get the ApplicationUser executing this condition.

Parameters:
transientVars - workflow context - parameters passed to workflow engine
args - workflow's function arguments
Returns:
The ApplicationUser, or null if run anonymously.

getCallerUserFromArgs

public static ApplicationUser getCallerUserFromArgs(Map transientVars,
                                                    Map args)
Get the ApplicationUser executing this condition.

Parameters:
transientVars - workflow context - parameters passed to workflow engine
args - workflow's function arguments
Returns:
The ApplicationUser, or null if run anonymously.

getCallerKey

public static String getCallerKey(Map transientVars,
                                  Map args)
Get the Key of user executing this condition.

Parameters:
transientVars - workflow context - parameters passed to workflow engine
args - workflow's function arguments
Returns:
The user's Key, or null if run anonymously.

populateParamsWithUser

public static void populateParamsWithUser(Map<String,Object> params,
                                          ApplicationUser user)
Populate given map of parameters with data which can identify user, in order to be able retrieve ApplicationUser later via getCallerUserFromArgs(java.util.Map, java.util.Map)

If you want to pass parameters explicitly, please use populateParamsWithUser(java.util.Map, String)

Parameters:
params - mutable map, which will be populated with user's identifier
user - user, which later should be identified by getCallerUserFromArgs(java.util.Map, java.util.Map)
Since:
6.0
See Also:
getCallerUserFromArgs(java.util.Map, java.util.Map)

populateParamsWithUser

public static void populateParamsWithUser(Map<String,Object> params,
                                          String userKey)
Populate given map of parameters with data which can identify user, in order to be able retrieve ApplicationUser later via getCallerUserFromArgs(java.util.Map, java.util.Map)

Parameters:
params - mutable map to be populated with user's identifier
userKey - user's key to be inserted into params
Since:
6.0
See Also:
getCallerUserFromArgs(java.util.Map, java.util.Map)


Copyright © 2002-2014 Atlassian. All Rights Reserved.