Class Entry

java.lang.Object
scriptella.driver.ldap.ldif.Entry

public class Entry extends Object
A entry to be populated by an ldif parser. We will have different kind of entries : - added entries - deleted entries - modified entries - RDN modified entries - DN modified entries
Author:
Apache Directory Project
  • Field Details

  • Constructor Details

    • Entry

      public Entry()
  • Method Details

    • setDn

      public void setDn(String dn)
      Set the Distinguished Name
      Parameters:
      dn - The Distinguished Name
    • setChangeType

      public void setChangeType(int changeType)
      Set the modification type
      Parameters:
      changeType - The change type
    • setChangeType

      public void setChangeType(String changeType)
      Set the change type
      Parameters:
      changeType - The change type
    • addModificationItem

      public void addModificationItem(int modOp, String id, Object value)
      Add a modification item
      Parameters:
      modOp - The operation. One of : DirContext.ADD_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE
      id - The attribute's ID
      value - The attribute's value
    • addAttribute

      public void addAttribute(Attribute attr)
      Add an attribute to the entry
      Parameters:
      attr - The attribute to be added
    • addAttribute

      public void addAttribute(String id, Object value)
      Add an attribute to the entry
      Parameters:
      id - The attribute ID
      value - The attribute value
    • putAttribute

      public void putAttribute(String id, Object value)
      Add an attribute value to an existing attribute
      Parameters:
      id - The attribute ID
      value - The attribute value
    • getChangeType

      public int getChangeType()
      Get the change type
      Returns:
      The change type. One of : ADD = 0; MODIFY = 1; MODDN = 2; MODRDN = 3; DELETE = 4;
    • getModificationItems

      public List<ModificationItem> getModificationItems()
      Returns:
      The list of modification items
    • getDn

      public String getDn()
      Returns:
      The entry Distinguished name
    • size

      public int size()
      Returns:
      The number of entry modifications
    • get

      public Attribute get(String attributeId)
      Returns a attribute given it's id
      Parameters:
      attributeId - The attribute Id
      Returns:
      The attribute if it exists
    • getAttributes

      public Attributes getAttributes()
      Get the entry's attributes
      Returns:
      An Attributes
    • isDeleteOldRdn

      public boolean isDeleteOldRdn()
      Returns:
      True, if the old RDN should be deleted.
    • setDeleteOldRdn

      public void setDeleteOldRdn(boolean deleteOldRdn)
      Set the flage deleteOldRdn
      Parameters:
      deleteOldRdn - True if the old RDN should be deleted
    • getNewRdn

      public String getNewRdn()
      Returns:
      The new RDN
    • setNewRdn

      public void setNewRdn(String newRdn)
      Set the new RDN
      Parameters:
      newRdn - The new RDN
    • getNewSuperior

      public String getNewSuperior()
      Returns:
      The new superior
    • setNewSuperior

      public void setNewSuperior(String newSuperior)
      Set the new superior
      Parameters:
      newSuperior - The new Superior
    • isChangeAdd

      public boolean isChangeAdd()
      Returns:
      True if the entry is an ADD entry
    • isChangeDelete

      public boolean isChangeDelete()
      Returns:
      True if the entry is a DELETE entry
    • isChangeModDn

      public boolean isChangeModDn()
      Returns:
      True if the entry is a MODDN entry
    • isChangeModRdn

      public boolean isChangeModRdn()
      Returns:
      True if the entry is a MODRDN entry
    • isChangeModify

      public boolean isChangeModify()
      Returns:
      True if the entry is a MODIFY entry
    • isEntry

      public boolean isEntry()
    • getControl

      public Control getControl()
      Returns:
      The associated control, if any
    • setControl

      public void setControl(Control control)
      Add a control to the entry
      Parameters:
      control - The control
    • toString

      public String toString()
      Return a String representing the Entry
      Overrides:
      toString in class Object