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 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.