Package org.ldaptive

Class ModifyDnRequest

All Implemented Interfaces:
Request

public class ModifyDnRequest extends AbstractRequestMessage
LDAP modify DN request defined as:
   ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {
     entry           LDAPDN,
     newrdn          RelativeLDAPDN,
     deleteoldrdn    BOOLEAN,
     newSuperior     [0] LDAPDN OPTIONAL }
 
  • Field Details

    • PROTOCOL_OP

      public static final int PROTOCOL_OP
      BER protocol number.
      See Also:
    • oldModifyDn

      private String oldModifyDn
      DN to modify.
    • newModifyRDn

      private String newModifyRDn
      New DN.
    • deleteOldRDn

      private boolean deleteOldRDn
      Whether to delete the old RDN attribute.
    • newSuperiorDn

      private String newSuperiorDn
      New superior DN.
  • Constructor Details

    • ModifyDnRequest

      private ModifyDnRequest()
      Default constructor.
    • ModifyDnRequest

      public ModifyDnRequest(String oldDN, String newRDN, boolean delete)
      Creates a new modify DN request.
      Parameters:
      oldDN - old modify DN
      newRDN - new modify DN
      delete - whether to delete the old RDN attribute
    • ModifyDnRequest

      public ModifyDnRequest(String oldDN, String newRDN, boolean delete, String newSuperior)
      Creates a new modify DN request.
      Parameters:
      oldDN - old modify DN
      newRDN - new modify DN
      delete - whether to delete the old RDN attribute
      newSuperior - new superior DN
  • Method Details

    • getOldDn

      public String getOldDn()
      Returns the old DN.
      Returns:
      old DN
    • getNewRDn

      public String getNewRDn()
      Returns the new RDN.
      Returns:
      new RDN
    • isDeleteOldRDn

      public boolean isDeleteOldRDn()
      Whether to delete the old RDN.
      Returns:
      whether to delete the old RDN
    • getNewSuperiorDn

      public String getNewSuperiorDn()
      Returns the new superior DN.
      Returns:
      new superior DN
    • getRequestEncoders

      protected DEREncoder[] getRequestEncoders(int id)
      Description copied from class: AbstractRequestMessage
      Returns the request encoders for this message.
      Specified by:
      getRequestEncoders in class AbstractRequestMessage
      Parameters:
      id - message ID
      Returns:
      request encoders
    • toString

      public String toString()
      Overrides:
      toString in class AbstractRequestMessage
    • builder

      public static ModifyDnRequest.Builder builder()
      Creates a builder for this class.
      Returns:
      new builder