|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.jql.operand.DefaultJqlOperandResolver
@InjectableComponent public final class DefaultJqlOperandResolver
Default implementation of the JqlOperandResolver
interface.
Constructor Summary | |
---|---|
DefaultJqlOperandResolver(JqlFunctionHandlerRegistry registry,
I18nHelper.BeanFactory factory)
|
Method Summary | |
---|---|
QueryLiteral |
getSingleValue(com.opensymphony.user.User user,
Operand operand,
TerminalClause clause)
Returns the single value contained within the passed operand. |
java.util.List<QueryLiteral> |
getValues(QueryCreationContext queryCreationContext,
Operand operand,
TerminalClause terminalClause)
Return the values contained within the passed operand. |
java.util.List<QueryLiteral> |
getValues(com.opensymphony.user.User searcher,
Operand operand,
TerminalClause terminalClause)
Return the values contained within the passed operand. |
boolean |
isEmptyOperand(Operand operand)
Returns true if the operand represents an EMPTY operand. |
boolean |
isFunctionOperand(Operand operand)
Returns true if the passed operand is a function call. |
boolean |
isListOperand(Operand operand)
Returns true if the passed operand returns a list of values. |
boolean |
isValidOperand(Operand operand)
Returns true if the operand is one which is known about. |
FunctionOperand |
sanitiseFunctionOperand(com.opensymphony.user.User searcher,
FunctionOperand funcOperand)
Sanitise a function operand for the specified user, so that information is not leaked. |
MessageSet |
validate(com.opensymphony.user.User user,
Operand operand,
TerminalClause terminalClause)
Validates the operand against its handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultJqlOperandResolver(JqlFunctionHandlerRegistry registry, I18nHelper.BeanFactory factory)
Method Detail |
---|
public java.util.List<QueryLiteral> getValues(com.opensymphony.user.User searcher, Operand operand, TerminalClause terminalClause)
JqlOperandResolver
getValues
in interface JqlOperandResolver
searcher
- the user performing the searchoperand
- the operand whose values should be returned. Must not be null.terminalClause
- the terminal clause that contained the operand
public java.util.List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, Operand operand, TerminalClause terminalClause)
JqlOperandResolver
getValues
in interface JqlOperandResolver
queryCreationContext
- the context of query creationoperand
- the operand whose values should be returned. Must not be null.terminalClause
- the terminal clause that contained the operand
public MessageSet validate(com.opensymphony.user.User user, Operand operand, TerminalClause terminalClause)
JqlOperandResolver
validate
in interface JqlOperandResolver
user
- the user who is validating. May be null.operand
- the operand to be validated. Must not be null.terminalClause
- the terminal clause that contained the operand
MessageSet
containing any errors reported. Note: if the operand is
unknown, an error message will be added to the message set returned. Never null.public FunctionOperand sanitiseFunctionOperand(com.opensymphony.user.User searcher, FunctionOperand funcOperand)
JqlOperandResolver
sanitiseFunctionOperand
in interface JqlOperandResolver
searcher
- the user performing the searchfuncOperand
- the operand to sanitise; will only be sanitised if valid
public QueryLiteral getSingleValue(com.opensymphony.user.User user, Operand operand, TerminalClause clause)
JqlOperandResolver
getSingleValue
in interface JqlOperandResolver
user
- the user who is retrieving the values. May be null.operand
- the operand whose values should be returned. Must not be null.clause
- the terminal clause that contained the operand
public boolean isEmptyOperand(Operand operand)
JqlOperandResolver
isEmptyOperand
in interface JqlOperandResolver
operand
- the operand to check if it is a EMPTY operand
public boolean isFunctionOperand(Operand operand)
JqlOperandResolver
isFunctionOperand
in interface JqlOperandResolver
operand
- the operand to check. Cannot be null.
public boolean isListOperand(Operand operand)
JqlOperandResolver
isListOperand
in interface JqlOperandResolver
operand
- the operand to check. Cannot be null.
public boolean isValidOperand(Operand operand)
JqlOperandResolver
SingleValueOperand
s
MultiValueOperand
s
EmptyOperand
s
FunctionOperand
s registered as JqlFunction
s
isValidOperand
in interface JqlOperandResolver
operand
- the operand; cannot be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |