public class

DefaultOperandSanitisingVisitor

extends Object
implements OperandVisitor<R>
java.lang.Object
   ↳ com.atlassian.jira.jql.permission.DefaultOperandSanitisingVisitor

Class Overview

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.

Summary

Public Constructors
DefaultOperandSanitisingVisitor(JqlOperandResolver jqlOperandResolver, User searcher)
Public Methods
Operand visit(MultiValueOperand originalMulti)
The method called when visiting an MultiValueOperand.
Operand visit(EmptyOperand empty)
The method called when visiting an EmptyOperand.
Operand visit(SingleValueOperand singleValueOperand)
The method called when visiting an SingleValueOperand.
Operand visit(FunctionOperand function)
The method called when visiting a FunctionOperand.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.query.operand.OperandVisitor

Public Constructors

public DefaultOperandSanitisingVisitor (JqlOperandResolver jqlOperandResolver, User searcher)

Public Methods

public Operand visit (MultiValueOperand originalMulti)

The method called when visiting an MultiValueOperand.

Parameters
originalMulti the operand being visited.
Returns
  • the value to return from the operand visit.

public Operand visit (EmptyOperand empty)

The method called when visiting an EmptyOperand.

Parameters
empty the operand being visited.
Returns
  • the value to return from the operand visit.

public Operand visit (SingleValueOperand singleValueOperand)

The method called when visiting an SingleValueOperand.

Parameters
singleValueOperand the operand being visited.
Returns
  • the value to return from the operand visit.

public Operand visit (FunctionOperand function)

The method called when visiting a FunctionOperand.

Parameters
function the operand being visited.
Returns
  • the value to return from the operand visit.