Package org.ldaptive

Class ModifyRequest

  • All Implemented Interfaces:
    Request

    public class ModifyRequest
    extends AbstractRequestMessage
    LDAP modify request defined as:
       ModifyRequest ::= [APPLICATION 6] SEQUENCE {
         object          LDAPDN,
         changes         SEQUENCE OF change SEQUENCE {
         operation       ENUMERATED {
           add     (0),
           delete  (1),
           replace (2),
           ...  },
         modification    PartialAttribute } }
    
       PartialAttribute ::= SEQUENCE {
         type       AttributeDescription,
         vals       SET OF value AttributeValue }
    
       Attribute ::= PartialAttribute(WITH COMPONENTS {
         ...,
         vals (SIZE(1..MAX))})
     
    • Field Detail

      • EMPTY_BYTE

        private static final byte[] EMPTY_BYTE
        Empty byte.
      • ldapDn

        private String ldapDn
        LDAP DN to modify.
    • Constructor Detail

      • ModifyRequest

        private ModifyRequest()
        Default constructor.
      • ModifyRequest

        public ModifyRequest​(String entry,
                             AttributeModification... mod)
        Creates a new modify request.
        Parameters:
        entry - DN to modify
        mod - to make on the object
    • Method Detail

      • getDn

        public String getDn()
        Returns the DN.
        Returns:
        DN
      • getModifications

        public AttributeModification[] getModifications()
        Returns the attribute modifications.
        Returns:
        attributes modifications
      • getAttributeValueEncoders

        private DEREncoder[] getAttributeValueEncoders​(Collection<byte[]> values)
        Returns attribute value encoders for the supplied values.
        Parameters:
        values - to create encoders for
        Returns:
        attribute value encoders
      • builder

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