org.opends.server.authorization.dseecompat
Class TargAttrFilters

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

public class TargAttrFilters
extends java.lang.Object

The TargAttrFilters class represents a targattrfilters rule of an ACI.


Field Summary
static java.lang.String secondOp
          Regular expression used to match the second operation of the filter list.
 
Constructor Summary
TargAttrFilters(EnumTargetOperator op, TargAttrFilterList firstFilterList, TargAttrFilterList secondFilterList)
          Represents an targatterfilters keyword rule.
 
Method Summary
static TargAttrFilters decode(EnumTargetOperator type, java.lang.String expression)
          Decode an targattrfilter rule.
 TargAttrFilterList getTargAttrFilterList(AciTargetMatchContext matchCtx)
          Gets the TargFilterList corresponding to the mask value.
 boolean hasMask(int mask)
          Return true if the TargAttrFilters mask contains the specified mask.
 boolean isApplicableAddDel(AciTargetMatchContext matchCtx)
          Check if this TargAttrFilters object is applicable to the specified target match context.
 boolean isApplicableMod(AciTargetMatchContext matchCtx, Aci aci)
          Check if this TargAttrFilters object is applicable to the target specified match context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

secondOp

public static final java.lang.String secondOp
Regular expression used to match the second operation of the filter list. If the first was "add" this must be "del", if the first was "del" this must be "add".

See Also:
Constant Field Values
Constructor Detail

TargAttrFilters

public TargAttrFilters(EnumTargetOperator op,
                       TargAttrFilterList firstFilterList,
                       TargAttrFilterList secondFilterList)
Represents an targatterfilters keyword rule.

Parameters:
op - The enumeration representing the operation type.
firstFilterList - The first filter list class parsed from the rule. This one is required.
secondFilterList - The second filter list class parsed from the rule. This one is optional.
Method Detail

decode

public static TargAttrFilters decode(EnumTargetOperator type,
                                     java.lang.String expression)
                              throws AciException
Decode an targattrfilter rule.

Parameters:
type - The enumeration representing the type of this rule. Defaults to equality for this target.
expression - The string expression to be decoded.
Returns:
A TargAttrFilters class representing the decode expression.
Throws:
AciException - If the expression string contains errors and cannot be decoded.

getTargAttrFilterList

public TargAttrFilterList getTargAttrFilterList(AciTargetMatchContext matchCtx)
Gets the TargFilterList corresponding to the mask value.

Parameters:
matchCtx - The target match context containing the rights to match against.
Returns:
A TargAttrFilterList matching both the rights of the target match context and the mask of the TargFilterAttrList. May return null.

isApplicableMod

public boolean isApplicableMod(AciTargetMatchContext matchCtx,
                               Aci aci)
Check if this TargAttrFilters object is applicable to the target specified match context. This check is only used for the LDAP modify operation.

Parameters:
matchCtx - The target match context containing the information needed to match.
aci - The ACI currently being evaluted for a target match.
Returns:
True if this TargAttrFitlers object is applicable to this target match context.

isApplicableAddDel

public boolean isApplicableAddDel(AciTargetMatchContext matchCtx)
Check if this TargAttrFilters object is applicable to the specified target match context. This check is only used for either LDAP add or delete operations.

Parameters:
matchCtx - The target match context containing the information needed to match.
Returns:
True if this TargAttrFilters object is applicable to this target match context.

hasMask

public boolean hasMask(int mask)
Return true if the TargAttrFilters mask contains the specified mask.

Parameters:
mask - The mask to check for.
Returns:
True if the mask matches.