com.atlassian.jira.jql.operand
Class FunctionOperandHandler

java.lang.Object
  extended by com.atlassian.jira.jql.operand.FunctionOperandHandler
All Implemented Interfaces:
OperandHandler<FunctionOperand>

public class FunctionOperandHandler
extends Object
implements OperandHandler<FunctionOperand>

Adapter to convert the plugin point JqlFunction into OperandHandler.

Since:
v4.0

Field Summary
protected  JqlFunction jqlFunction
           
 
Constructor Summary
FunctionOperandHandler(JqlFunction jqlFunction)
           
 
Method Summary
 JqlFunction getJqlFunction()
           
 List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause)
          Gets the unexpanded values provided by the user on input.
 boolean isEmpty()
           
 boolean isFunction()
           
 boolean isList()
           
 MessageSet validate(com.atlassian.crowd.embedded.api.User searcher, FunctionOperand operand, TerminalClause terminalClause)
          Will perform operand specific validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jqlFunction

protected final JqlFunction jqlFunction
Constructor Detail

FunctionOperandHandler

public FunctionOperandHandler(JqlFunction jqlFunction)
Method Detail

validate

public MessageSet validate(com.atlassian.crowd.embedded.api.User searcher,
                           FunctionOperand operand,
                           TerminalClause terminalClause)
Description copied from interface: OperandHandler
Will perform operand specific validation.

Specified by:
validate in interface OperandHandler<FunctionOperand>
Parameters:
searcher - the user performing the search
operand - the operand to validate
terminalClause - the terminal clause that contains the operand
Returns:
a MessageSet which will contain any validation errors or warnings or will be empty if there is nothing to report, must not be null.

getValues

public List<QueryLiteral> getValues(QueryCreationContext queryCreationContext,
                                    FunctionOperand operand,
                                    TerminalClause terminalClause)
Description copied from interface: OperandHandler
Gets the unexpanded values provided by the user on input. In the case of a function this is the output values that will later be transformed into index values.

Specified by:
getValues in interface OperandHandler<FunctionOperand>
Parameters:
queryCreationContext - the context of query creation
operand - the operand to get values from
terminalClause - the terminal clause that contains the operand
Returns:
a List of objects that represent this Operands raw values. This must be the values specified by the user.

isList

public boolean isList()
Specified by:
isList in interface OperandHandler<FunctionOperand>
Returns:
true if the operand represents a list of values, false otherwise.

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface OperandHandler<FunctionOperand>
Returns:
true if the operand represents the absence of a value, false otherwise. EmptyOperand

isFunction

public boolean isFunction()
Specified by:
isFunction in interface OperandHandler<FunctionOperand>
Returns:
true if the operand represents a function, false otherwise. FunctionOperand

getJqlFunction

public JqlFunction getJqlFunction()


Copyright © 2002-2012 Atlassian. All Rights Reserved.