org.opends.server.authorization.dseecompat
Class Permission

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

public class Permission
extends java.lang.Object

A class representing the permissions of an bind rule. The permissions of an ACI look like deny(search, write).


Method Summary
static Permission decode(java.lang.String accessType, java.lang.String rights)
          Decode an string representation of bind rule permission into a Permission class.
 boolean hasAccessType(EnumAccessType accessType)
          Checks if a given access type enumeration is equal to this classes access type.
 boolean hasRights(int rights)
          Checks if the permission's rights has the specified rights.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decode

public static Permission decode(java.lang.String accessType,
                                java.lang.String rights)
                         throws AciException
Decode an string representation of bind rule permission into a Permission class.

Parameters:
accessType - A string representing the access type.
rights - A string representing the rights.
Returns:
A Permission class representing the permissions of the bind rule.
Throws:
AciException - If the accesstype or rights strings are invalid.

hasAccessType

public boolean hasAccessType(EnumAccessType accessType)
Checks if a given access type enumeration is equal to this classes access type.

Parameters:
accessType - An enumeration representing an access type.
Returns:
True if the access types are equal.

hasRights

public boolean hasRights(int rights)
Checks if the permission's rights has the specified rights.

Parameters:
rights - The rights to check for.
Returns:
True if the permission's rights has the specified rights.