public class DefaultOperandSanitisingVisitor extends Object implements OperandVisitor<Operand>
The default strategy for sanitising an arbitrary Operand
is:
EmptyOperand
s do not need sanitising;
FunctionOperand
s have their arguments sanitised by JqlOperandResolver
;
MultiValueOperand
s must have their children sanitised and potentially recombined
into a new MultiValueOperand instance.
SingleValueOperand
s 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)
OperandVisitor
EmptyOperand
.visit
in interface OperandVisitor<Operand>
empty
- the operand being visited.public Operand visit(FunctionOperand function)
OperandVisitor
FunctionOperand
.visit
in interface OperandVisitor<Operand>
function
- the operand being visited.public Operand visit(MultiValueOperand originalMulti)
OperandVisitor
MultiValueOperand
.visit
in interface OperandVisitor<Operand>
originalMulti
- the operand being visited.public Operand visit(SingleValueOperand singleValueOperand)
OperandVisitor
SingleValueOperand
.visit
in interface OperandVisitor<Operand>
singleValueOperand
- the operand being visited.Copyright © 2002-2023 Atlassian. All Rights Reserved.