org.opends.server.authorization.dseecompat
Class PermBindRulePair

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

public class PermBindRulePair
extends java.lang.Object

A class representing a permission-bind rule pair. There can be multiple of these in an ACI.


Method Summary
static PermBindRulePair decode(java.lang.String perm, java.lang.String rights, java.lang.String bRule)
          Decodes a permission bind rule pair.
 BindRule getBindRule()
          Gets the bind rule part of this pair.
 boolean hasAccessType(EnumAccessType accessType)
          Checks the permission to see if it has this access type.
 boolean hasRights(int right)
          Try and match one or more of the specified rights against a rights set of the permission class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decode

public static PermBindRulePair decode(java.lang.String perm,
                                      java.lang.String rights,
                                      java.lang.String bRule)
                               throws AciException
Decodes a permission bind rule pair.

Parameters:
perm - A string representing the permissions.
rights - A string representing the rights.
bRule - A string representing the bind rule.
Returns:
An permission bind rule pair class representing this pair.
Throws:
AciException - If any of the strings fail to decode.

getBindRule

public BindRule getBindRule()
Gets the bind rule part of this pair.

Returns:
The bind rule part of this pair.

hasAccessType

public boolean hasAccessType(EnumAccessType accessType)
Checks the permission to see if it has this access type.

Parameters:
accessType - An enumeration of the desired access type.
Returns:
True if the access type equals the permission access type.

hasRights

public boolean hasRights(int right)
Try and match one or more of the specified rights against a rights set of the permission class.

Parameters:
right - The rights to match.
Returns:
True if one or more of the specified rights match a right in the rights set of the permission class.