org.apache.directory.shared.kerberos.components
Class AdAndOr

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.kerberos.components.AdAndOr
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object

public class AdAndOr
extends org.apache.directory.shared.asn1.AbstractAsn1Object

The AdAndOr structure is used to store a AD-AND-OR associated to a type. The ASN.1 grammar is :

 AD-AND-OR               ::= SEQUENCE {
         condition-count [0] Int32,
         elements        [1] 
 }
 

Author:
Apache Directory Project

Constructor Summary
AdAndOr()
          Creates a new instance of AdAndOr
 
Method Summary
 int computeLength()
          Compute the AD-AND-OR length
 ByteBuffer encode(ByteBuffer buffer)
          Encode the AD-AND-OR message to a PDU.
 int getConditionCount()
           
 AuthorizationData getElements()
           
 void setConditionCount(int conditionCount)
           
 void setElements(AuthorizationData elements)
           
 String toString()
           
 String toString(String tabs)
           
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdAndOr

public AdAndOr()
Creates a new instance of AdAndOr

Method Detail

getConditionCount

public int getConditionCount()
Returns:
the conditionCount

setConditionCount

public void setConditionCount(int conditionCount)
Parameters:
conditionCount - the conditionCount to set

getElements

public AuthorizationData getElements()
Returns:
the elements

setElements

public void setElements(AuthorizationData elements)
Parameters:
elements - the elements to set

computeLength

public int computeLength()
Compute the AD-AND-OR length
 0x30 L1 AD-AND-OR sequence
  |
  +--> 0xA1 L2 condition count tag
  |     |
  |     +--> 0x02 L2-1 condition count (int)
  |
  +--> 0xA2 L3 elements tag
        |
        +--> 0x30 L3-1 elements (AuthorizationData)
 


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException
Encode the AD-AND-OR message to a PDU.

Specified by:
encode in interface org.apache.directory.shared.asn1.Asn1Object
Overrides:
encode in class org.apache.directory.shared.asn1.AbstractAsn1Object
Parameters:
buffer - The buffer where to put the PDU. It should have been allocated before, with the right size.
Returns:
The constructed PDU.
Throws:
org.apache.directory.shared.asn1.EncoderException

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

toString

public String toString(String tabs)
See Also:
Object.toString()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.