com.ibm.itim.dataservices.model
Class CompoundDN

java.lang.Object
  |
  +--com.ibm.itim.dataservices.model.CompoundDN
All Implemented Interfaces:
java.io.Serializable

public class CompoundDN
extends java.lang.Object
implements java.io.Serializable

The CompoundDN class represents a sequence of distinguished names that can be used to represent a series of related entities.

See Also:
DistinguishedName, Serialized Form

Constructor Summary
CompoundDN()
          Default constructor.
CompoundDN(CompoundDN compoundDN)
          Constructs with a CompoundDN object
CompoundDN(DistinguishedName baseDN)
          Constructs with an initial base distinguished name.
 
Method Summary
 void append(DistinguishedName dn)
          Adds a distinguished name to the end of the object.
 boolean contains(DistinguishedName dn)
          Returns whether the given distinguished name is contained within the object.
 DistinguishedName first()
          Returnst the first distinguished name of the object.
 DistinguishedName get(int index)
          Returns the distinguished name at the given index, or position, in the object.
 java.util.Collection getDNs()
          Returns all distinguished names in a collection.
 DistinguishedName last()
          Returnst the last distinguished name of the object.
 void prepend(DistinguishedName dn)
          Prepends a distinguished name to the front of the object.
 DistinguishedName remove(int index)
          Removes the distinguished name at the given index.
 void replace(int index, DistinguishedName dn)
          Replaces the distinguished name at the given index.
 int size()
          Returns the number of distinguished names in the object.
 java.lang.String toString()
          Return the String representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompoundDN

public CompoundDN()
Default constructor.


CompoundDN

public CompoundDN(DistinguishedName baseDN)
Constructs with an initial base distinguished name.

Parameters:
baseDN - Initial base DistinguishedName.

CompoundDN

public CompoundDN(CompoundDN compoundDN)
Constructs with a CompoundDN object

Parameters:
compoundDN - Initial CompoundDN object.
Method Detail

append

public void append(DistinguishedName dn)
Adds a distinguished name to the end of the object.

Parameters:
dn - DistinguishedName to add.

prepend

public void prepend(DistinguishedName dn)
Prepends a distinguished name to the front of the object.

Parameters:
dn - DistinguishedName to prepend.

getDNs

public java.util.Collection getDNs()
Returns all distinguished names in a collection.

Returns:
Collection of DistinguishedNames.

contains

public boolean contains(DistinguishedName dn)
Returns whether the given distinguished name is contained within the object.

Parameters:
dn - DistinguishedName to check for.
Returns:
True if found, false if not.

get

public DistinguishedName get(int index)
Returns the distinguished name at the given index, or position, in the object.

Parameters:
index - position of DistinguishedName to return
Returns:
DistinguishedName at the given index.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Thrown if index out of range (index < 0 || index >= size()).

first

public DistinguishedName first()
Returnst the first distinguished name of the object.

Returns:
First DistinguishedName in the object.
Throws:
java.util.NoSuchElementException - Thrown if object is empty.

last

public DistinguishedName last()
Returnst the last distinguished name of the object.

Returns:
Last DistinguishedName in the object.
Throws:
java.util.NoSuchElementException - Thrown if object is empty.

size

public int size()
Returns the number of distinguished names in the object.

Returns:
Number of distinguished names.

replace

public void replace(int index,
                    DistinguishedName dn)
Replaces the distinguished name at the given index.

Parameters:
index - Index of the distinguished name to replace. Indecies start at 0.
dn - Replacement DistinguishedName.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Thrown if index out of range (index < 0 || index >= size()).

remove

public DistinguishedName remove(int index)
Removes the distinguished name at the given index.

Parameters:
index - Index of the distinguished name to remove. Indecies start at 0.
Returns:
DistinguishedName that was removed.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Thrown if index out of range (index < 0 || index >= size()).

toString

public java.lang.String toString()
Return the String representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
the String object.


IBM Tivoli Identity Manager 4.6
© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.