com.atlassian.jira.jql.permission
Class IssueLiteralSanitiser

java.lang.Object
  extended by com.atlassian.jira.jql.permission.IssueLiteralSanitiser
All Implemented Interfaces:
LiteralSanitiser

@NonInjectableComponent
public class IssueLiteralSanitiser
extends Object
implements LiteralSanitiser

Sanitise the issue keys or ids stored in QueryLiterals. The strategy is to sanitise only those issues which both exist and the user does not have permission to browse. The sanitised form of the operand replaces the key representation with the id representation.

Since:
v4.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.jql.permission.LiteralSanitiser
LiteralSanitiser.Result
 
Constructor Summary
IssueLiteralSanitiser(PermissionManager permissionManager, JqlIssueSupport jqlIssueSupport, com.atlassian.crowd.embedded.api.User user)
           
 
Method Summary
 LiteralSanitiser.Result sanitiseLiterals(List<QueryLiteral> literals)
          Issue keys are not guaranteed to be 1-1, so this method might actually return more QueryLiterals than what we started with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssueLiteralSanitiser

public IssueLiteralSanitiser(PermissionManager permissionManager,
                             JqlIssueSupport jqlIssueSupport,
                             com.atlassian.crowd.embedded.api.User user)
Method Detail

sanitiseLiterals

public LiteralSanitiser.Result sanitiseLiterals(List<QueryLiteral> literals)
Issue keys are not guaranteed to be 1-1, so this method might actually return more QueryLiterals than what we started with. Therefore, callers of this method need to be aware that the type of Operand to use might need to change.

Specified by:
sanitiseLiterals in interface LiteralSanitiser
Parameters:
literals - the literals to sanitise; must not be null.
Returns:
the result object containing the modification status and the resulting literals


Copyright © 2002-2012 Atlassian. All Rights Reserved.