org.ldaptive.asn1
Class RDN

java.lang.Object
  extended by org.ldaptive.asn1.RDN
All Implemented Interfaces:
DEREncoder

public class RDN
extends Object
implements DEREncoder

A set of attribute value assertions.

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Constructor Summary
RDN(AttributeValueAssertion... assertions)
          Creates a new RDN.
RDN(Collection<AttributeValueAssertion> assertions)
          Creates a new RDN.
 
Method Summary
static RDN[] decode(ByteBuffer encoded)
          Converts bytes in the buffer to RDNs by reading from the current position to the limit.
 byte[] encode()
          Encode this object into it's DER type.
 boolean equals(Object o)
          
 AttributeValueAssertion.Value getAttributeValue(String oid)
          Returns a single attribute value for the supplied oid.
<T> T
getAttributeValue(String oid, ValueTranscoder<T> transcoder)
          Returns a single attribute value for the supplied oid.
 AttributeValueAssertion[] getAttributeValueAssertions()
          Returns the attribute value assertions in this RDN.
 AttributeValueAssertion.Value[] getAttributeValues(String oid)
          Returns the attribute values for the supplied oid.
<T> T[]
getAttributeValues(String oid, ValueTranscoder<T> transcoder)
          Returns the attribute values decoded by the supplied transcoder.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RDN

public RDN(Collection<AttributeValueAssertion> assertions)
Creates a new RDN.

Parameters:
assertions - in this RDN

RDN

public RDN(AttributeValueAssertion... assertions)
Creates a new RDN.

Parameters:
assertions - in this RDN
Method Detail

getAttributeValueAssertions

public AttributeValueAssertion[] getAttributeValueAssertions()
Returns the attribute value assertions in this RDN.

Returns:
attribute value assertions

getAttributeValues

public AttributeValueAssertion.Value[] getAttributeValues(String oid)
Returns the attribute values for the supplied oid.

Parameters:
oid - to match
Returns:
attribute values

getAttributeValue

public AttributeValueAssertion.Value getAttributeValue(String oid)
Returns a single attribute value for the supplied oid. See getAttributeValues(String).

Parameters:
oid - to match
Returns:
attribute value

getAttributeValues

public <T> T[] getAttributeValues(String oid,
                                  ValueTranscoder<T> transcoder)
Returns the attribute values decoded by the supplied transcoder.

Type Parameters:
T - type of value
Parameters:
oid - to match
transcoder - to decode the binary value
Returns:
decoded attribute values

getAttributeValue

public <T> T getAttributeValue(String oid,
                               ValueTranscoder<T> transcoder)
Returns a single attribute value for the supplied oid. See getAttributeValues(String, ValueTranscoder).

Type Parameters:
T - type of value
Parameters:
oid - to match
transcoder - to decode the binary value
Returns:
decoded attribute value

encode

public byte[] encode()
Encode this object into it's DER type.

Specified by:
encode in interface DEREncoder
Returns:
DER encoded object

decode

public static RDN[] decode(ByteBuffer encoded)
Converts bytes in the buffer to RDNs by reading from the current position to the limit.

Parameters:
encoded - buffer containing DER-encoded data where the buffer is positioned at the tag of the RDN and the limit is set beyond the last byte of the RDN.
Returns:
decoded bytes as RDNs

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.