Class DefaultOperandSanitisingVisitor
java.lang.Object
com.atlassian.jira.jql.permission.DefaultOperandSanitisingVisitor
- All Implemented Interfaces:
OperandVisitor<Operand>
The default strategy for sanitising an arbitrary Operand is:
EmptyOperands do not need sanitising;FunctionOperands have their arguments sanitised byJqlOperandResolver;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.
- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOperandSanitisingVisitor(JqlOperandResolver jqlOperandResolver, ApplicationUser searcher) -
Method Summary
Modifier and TypeMethodDescriptionvisit(EmptyOperand empty) The method called when visiting anEmptyOperand.visit(FunctionOperand function) The method called when visiting aFunctionOperand.visit(MultiValueOperand originalMulti) The method called when visiting anMultiValueOperand.visit(SingleValueOperand singleValueOperand) The method called when visiting anSingleValueOperand.
-
Constructor Details
-
DefaultOperandSanitisingVisitor
public DefaultOperandSanitisingVisitor(JqlOperandResolver jqlOperandResolver, ApplicationUser searcher)
-
-
Method Details
-
visit
Description copied from interface:OperandVisitorThe method called when visiting anEmptyOperand.- Specified by:
visitin interfaceOperandVisitor<Operand>- Parameters:
empty- the operand being visited.- Returns:
- the value to return from the operand visit.
-
visit
Description copied from interface:OperandVisitorThe method called when visiting aFunctionOperand.- Specified by:
visitin interfaceOperandVisitor<Operand>- Parameters:
function- the operand being visited.- Returns:
- the value to return from the operand visit.
-
visit
Description copied from interface:OperandVisitorThe method called when visiting anMultiValueOperand.- Specified by:
visitin interfaceOperandVisitor<Operand>- Parameters:
originalMulti- the operand being visited.- Returns:
- the value to return from the operand visit.
-
visit
Description copied from interface:OperandVisitorThe method called when visiting anSingleValueOperand.- Specified by:
visitin interfaceOperandVisitor<Operand>- Parameters:
singleValueOperand- the operand being visited.- Returns:
- the value to return from the operand visit.
-