public class

WorkflowFunctionUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.workflow.WorkflowFunctionUtils
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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

Summary

Constants
String ORIGINAL_ISSUE_KEY
Public Constructors
WorkflowFunctionUtils()
Public Methods
static String getCallerKey(Map transientVars, Map args)
Get the Key of user executing this condition.
static ApplicationUser getCallerUserFromArgs(Map transientVars, Map args)
Get the ApplicationUser executing this condition.
static ApplicationUser getUserByKey(String key)
static void populateParamsWithUser(Map<StringObject> 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)
static void populateParamsWithUser(Map<StringObject> 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)

Protected Methods
ApplicationUser getCaller(Map transientVars, Map args)
This method is deprecated. Use getCallerUser(java.util.Map, java.util.Map) instead. Since v6.0.
String getCallerName(Map transientVars, Map args)
This method is deprecated. Use getCallerUser(java.util.Map, java.util.Map) instead. Since v6.0.
ApplicationUser getCallerUser(Map transientVars, Map args)
Get the ApplicationUser executing this condition.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ORIGINAL_ISSUE_KEY

Constant Value: "originalissueobject"

Public Constructors

public WorkflowFunctionUtils ()

Public Methods

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.

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.

public static ApplicationUser getUserByKey (String key)

public static void populateParamsWithUser (Map<StringObject> 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

public static void populateParamsWithUser (Map<StringObject> 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)

Protected Methods

protected ApplicationUser getCaller (Map transientVars, Map args)

This method is 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.

protected String getCallerName (Map transientVars, Map args)

This method is 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.

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.