org.opends.server.controls
Class GetEffectiveRights

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.GetEffectiveRights

public class GetEffectiveRights
extends Control

This class partially implements the geteffectiverights control as defined in draft-ietf-ldapext-acl-model-08.txt. The main differences are: - The response control is not supported. Instead the dseecompat geteffectiverights control implementation creates attributes containing right information strings and adds those attributes to the entry being returned. The attribute type names are dynamically created; see the dseecompat's AciGetEffectiveRights class for details. - The dseecompat implementation allows additional attribute types in the request control for which rights information can be returned. These are known as the specified attribute types. The dseecompat request control value is the following:

  GetRightsControl ::= SEQUENCE {
    authzId    authzId
    attributes  SEQUENCE OF AttributeType
  }

   -- Only the "dn:DN form is supported.

 


Constructor Summary
GetEffectiveRights()
          Create a new geteffectiverights control with null authzDN and null attribute list.
GetEffectiveRights(ASN1OctetString val, DN authzDN, java.util.List<AttributeType> attrs)
          Create a new geteffectiverights control with the specified raw octet string, an authzDN and an attribute list.
 
Method Summary
static GetEffectiveRights decodeControl(Control control)
          Decodes the request control's value into a GetEffectiveRights class.
 java.util.List<AttributeType> getAttributes()
          Return the requested additional attributes parsed from the control.
 DN getAuthzDN()
          Return the authzDN parsed from the control.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetEffectiveRights

public GetEffectiveRights()
Create a new geteffectiverights control with null authzDN and null attribute list.


GetEffectiveRights

public GetEffectiveRights(ASN1OctetString val,
                          DN authzDN,
                          java.util.List<AttributeType> attrs)
Create a new geteffectiverights control with the specified raw octet string, an authzDN and an attribute list.

Parameters:
val - The octet string repsentation of the control value.
authzDN - The authzDN.
attrs - The list of additional attributes to be returned.
Method Detail

getAuthzDN

public DN getAuthzDN()
Return the authzDN parsed from the control.

Returns:
The DN representing the authzId.

getAttributes

public java.util.List<AttributeType> getAttributes()
Return the requested additional attributes parsed from the control. Known as the specified attributes.

Returns:
The list containing any additional attributes to return rights about.

decodeControl

public static GetEffectiveRights decodeControl(Control control)
                                        throws LDAPException
Decodes the request control's value into a GetEffectiveRights class.

Parameters:
control - The control class representing the request control.
Returns:
A decoded GetEffectiveRights class representing the request control.
Throws:
LDAPException - If the request control's value contains errors causing a valid GetEffectiveRights class to not be created.