org.opends.server.authorization.dseecompat
Class Target

java.lang.Object
  extended by org.opends.server.authorization.dseecompat.Target

public class Target
extends java.lang.Object

A class representing an ACI target keyword.


Method Summary
static Target decode(EnumTargetOperator operator, java.lang.String expr, DN aciDN)
          Decode an expression string representing a target keyword expression.
 DN getDN()
          Returns the URL DN of the expression.
 EnumTargetOperator getOperator()
          Returns the operator of this expression.
 boolean isPattern()
          Returns boolean if a pattern was seen during parsing.
 boolean matchesPattern(DN dn)
          This method tries to match a pattern against a DN.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decode

public static Target decode(EnumTargetOperator operator,
                            java.lang.String expr,
                            DN aciDN)
                     throws AciException
Decode an expression string representing a target keyword expression.

Parameters:
operator - An enumeration of the operation of this target.
expr - A string representation of the target.
aciDN - The DN of the ACI entry used for a descendant check.
Returns:
A Target class representing this target.
Throws:
AciException - If the expression string is invalid.

getOperator

public EnumTargetOperator getOperator()
Returns the operator of this expression.

Returns:
An enumeration of the operation value.

getDN

public DN getDN()
Returns the URL DN of the expression.

Returns:
A DN of the URL or null if the URL contained a DN pattern.

isPattern

public boolean isPattern()
Returns boolean if a pattern was seen during parsing.

Returns:
True if the URL contained a DN pattern.

matchesPattern

public boolean matchesPattern(DN dn)
This method tries to match a pattern against a DN.

Parameters:
dn - The DN to try an match.
Returns:
True if the pattern matches.