public class DefaultOperandSanitisingVisitor extends Object implements OperandVisitor<Operand>
The default strategy for sanitising an arbitrary Operand is:
EmptyOperands do not need sanitising;
FunctionOperands have their arguments sanitised by JqlOperandResolver;
MultiValueOperands must have their children sanitised and potentially recombined
into a new MultiValueOperand instance.
SingleValueOperands should be sanitised depending on the context (what field's values
we are dealing with). But we don't know about that here, so we just return the operand back.
In general, if no sanitisation is required, the input Operand should be returned.
| Constructor and Description |
|---|
DefaultOperandSanitisingVisitor(JqlOperandResolver jqlOperandResolver,
ApplicationUser searcher) |
| Modifier and Type | Method and Description |
|---|---|
Operand |
visit(EmptyOperand empty)
The method called when visiting an
EmptyOperand. |
Operand |
visit(FunctionOperand function)
The method called when visiting a
FunctionOperand. |
Operand |
visit(MultiValueOperand originalMulti)
The method called when visiting an
MultiValueOperand. |
Operand |
visit(SingleValueOperand singleValueOperand)
The method called when visiting an
SingleValueOperand. |
public DefaultOperandSanitisingVisitor(JqlOperandResolver jqlOperandResolver, ApplicationUser searcher)
public Operand visit(EmptyOperand empty)
OperandVisitorEmptyOperand.visit in interface OperandVisitor<Operand>empty - the operand being visited.public Operand visit(FunctionOperand function)
OperandVisitorFunctionOperand.visit in interface OperandVisitor<Operand>function - the operand being visited.public Operand visit(MultiValueOperand originalMulti)
OperandVisitorMultiValueOperand.visit in interface OperandVisitor<Operand>originalMulti - the operand being visited.public Operand visit(SingleValueOperand singleValueOperand)
OperandVisitorSingleValueOperand.visit in interface OperandVisitor<Operand>singleValueOperand - the operand being visited.Copyright © 2002-2017 Atlassian. All Rights Reserved.