org.opends.server.authorization.dseecompat
Class GroupDN

java.lang.Object
  extended by org.opends.server.authorization.dseecompat.GroupDN
All Implemented Interfaces:
KeywordBindRule

public class GroupDN
extends java.lang.Object
implements KeywordBindRule

This class implements the groupdn bind rule keyword.


Field Summary
static java.lang.String LDAP_URLS
          Regular expression matching one or more LDAP URLs separated by "||".
 
Method Summary
static KeywordBindRule decode(java.lang.String expr, EnumBindRuleType type)
          Decode an string expression representing a groupdn bind rule.
 EnumEvalResult evaluate(AciEvalContext evalCtx)
          Performs the evaluation of a groupdn bind rule based on the evaluation context passed to it.
static EnumEvalResult evaluate(Entry e, AciEvalContext evalCtx, AttributeType attributeType, DN suffixDN)
          Performs an evaluation of a group that was specified in an attribute type value of the specified entry and attribute type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LDAP_URLS

public static final java.lang.String LDAP_URLS
Regular expression matching one or more LDAP URLs separated by "||".

See Also:
Constant Field Values
Method Detail

decode

public static KeywordBindRule decode(java.lang.String expr,
                                     EnumBindRuleType type)
                              throws AciException
Decode an string expression representing a groupdn bind rule.

Parameters:
expr - A string representation of the bind rule.
type - An enumeration of the type of the bind rule.
Returns:
A keyword bind rule class that can be used to evaluate this bind rule.
Throws:
AciException - If the expression string is invalid.

evaluate

public EnumEvalResult evaluate(AciEvalContext evalCtx)
Performs the evaluation of a groupdn bind rule based on the evaluation context passed to it. The evaluation stops when there are no more group DNs to evaluate, or if a group DN evaluates to true if it contains the client DN.

Specified by:
evaluate in interface KeywordBindRule
Parameters:
evalCtx - An evaluation context to use in the evaluation.
Returns:
Enumeration evaluation result.

evaluate

public static EnumEvalResult evaluate(Entry e,
                                      AciEvalContext evalCtx,
                                      AttributeType attributeType,
                                      DN suffixDN)
Performs an evaluation of a group that was specified in an attribute type value of the specified entry and attribute type. Each value of the attribute type is assumed to be a group DN and evaluation stops when there are no more values or if the group DN evaluates to true if it contains the client DN.

Parameters:
e - The entry to use in the evaluation.
evalCtx - The evaluation context to use in the evaluation.
attributeType - The attribute type of the entry to use to get the values for the groupd DNs.
suffixDN - The suffix that the groupDN must be under. If it's null, then the groupDN can be anywhere in the DIT.
Returns:
Enumeration evaluation result.