com.atlassian.jira.plugin.jql.function
Class ComponentsLeadByUserFunction

java.lang.Object
  extended by com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
      extended by com.atlassian.jira.plugin.jql.function.AbstractUserBasedFunction
          extended by com.atlassian.jira.plugin.jql.function.ComponentsLeadByUserFunction
All Implemented Interfaces:
JqlFunction

public class ComponentsLeadByUserFunction
extends AbstractUserBasedFunction

This function returns a list of components lead by a user.

This function expects zero or one argument. If zero arguments are supplied the current logged in user will be used as component lead.

Since:
v4.2

Field Summary
static String FUNCTION_COMPONENTS_LEAD_BY_USER
           
 
Fields inherited from class com.atlassian.jira.plugin.jql.function.AbstractUserBasedFunction
userUtil
 
Constructor Summary
ComponentsLeadByUserFunction(PermissionManager permissionManager, ProjectComponentManager componentManager, ProjectManager projectManager, UserUtil userUtil)
           
 
Method Summary
 JiraDataType getDataType()
          Provides the JiraDataType that this function handles and creates values for.
protected  List<QueryLiteral> getFunctionValuesList(QueryCreationContext queryCreationContext, FunctionOperand functionOperand, com.atlassian.crowd.embedded.api.User user)
          Get the function return values based on the actual user.
protected  String getUserNotFoundMessageKey()
          Get the I18n message key for the error when the passed in user does not exist.
 
Methods inherited from class com.atlassian.jira.plugin.jql.function.AbstractUserBasedFunction
getMinimumNumberOfExpectedArguments, getValues, validate
 
Methods inherited from class com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
getFunctionName, getI18n, getModuleDescriptor, init, isList, validateNumberOfArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUNCTION_COMPONENTS_LEAD_BY_USER

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

ComponentsLeadByUserFunction

public ComponentsLeadByUserFunction(PermissionManager permissionManager,
                                    ProjectComponentManager componentManager,
                                    ProjectManager projectManager,
                                    UserUtil userUtil)
Method Detail

getDataType

public JiraDataType getDataType()
Description copied from interface: JqlFunction
Provides the JiraDataType that this function handles and creates values for. This allows us to infer some information about how it will interact with other elements in the system.

For example, if this returns JiraDataTypes.DATE then we know that we can provide values for any clauses that also specify a data type of DATE.

Returns:
the JiraDataType that this function produces values for. Cannot be null.
See Also:
JiraDataTypes

getFunctionValuesList

protected List<QueryLiteral> getFunctionValuesList(QueryCreationContext queryCreationContext,
                                                   FunctionOperand functionOperand,
                                                   com.atlassian.crowd.embedded.api.User user)
Description copied from class: AbstractUserBasedFunction
Get the function return values based on the actual user. transformed into index values.

Specified by:
getFunctionValuesList in class AbstractUserBasedFunction
Parameters:
queryCreationContext - the context of query creation
functionOperand - the operand to get values from
user - the user
Returns:
a List of objects that represent this Operands raw values. Cannot be null.

getUserNotFoundMessageKey

protected String getUserNotFoundMessageKey()
Description copied from class: AbstractUserBasedFunction
Get the I18n message key for the error when the passed in user does not exist.

Specified by:
getUserNotFoundMessageKey in class AbstractUserBasedFunction
Returns:
message key.


Copyright © 2002-2012 Atlassian. All Rights Reserved.