|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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.atlassian.crowd.embedded.api.User user,
Operand operand,
TerminalClause clause)
Returns the single value contained within the passed operand. |
List<QueryLiteral> |
getValues(QueryCreationContext queryCreationContext,
Operand operand,
TerminalClause terminalClause)
Return the values contained within the passed operand. |
List<QueryLiteral> |
getValues(com.atlassian.crowd.embedded.api.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.atlassian.crowd.embedded.api.User searcher,
FunctionOperand funcOperand)
Sanitise a function operand for the specified user, so that information is not leaked. |
MessageSet |
validate(com.atlassian.crowd.embedded.api.User user,
Operand operand,
TerminalClause terminalClause)
Validates the operand against its handler. |
MessageSet |
validate(com.atlassian.crowd.embedded.api.User searcher,
Operand operand,
WasClause clause)
|
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 List<QueryLiteral> getValues(com.atlassian.crowd.embedded.api.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 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.atlassian.crowd.embedded.api.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 MessageSet validate(com.atlassian.crowd.embedded.api.User searcher, Operand operand, WasClause clause)
validate
in interface JqlOperandResolver
public FunctionOperand sanitiseFunctionOperand(com.atlassian.crowd.embedded.api.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.atlassian.crowd.embedded.api.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 |