Class ModifyRequestDsml

    • Constructor Detail

      • ModifyRequestDsml

        public ModifyRequestDsml​(LdapApiService codec)
        Creates a new getDecoratedMessage() of ModifyRequestDsml.
        Parameters:
        codec - The LDAP Service to use
      • ModifyRequestDsml

        public ModifyRequestDsml​(LdapApiService codec,
                                 ModifyRequest ldapMessage)
        Creates a new getDecoratedMessage() of ModifyRequestDsml.
        Parameters:
        codec - The LDAP Service to use
        ldapMessage - the message to decorate
    • Method Detail

      • getCurrentAttributeType

        public String getCurrentAttributeType()
        Returns:
        the current attribute's type
      • setCurrentOperation

        public void setCurrentOperation​(int currentOperation)
        Store the current operation
        Parameters:
        currentOperation - The currentOperation to set.
      • addAttributeTypeAndValues

        public void addAttributeTypeAndValues​(String type)
        Add a new attributeTypeAndValue
        Parameters:
        type - The attribute's name
      • addAttributeValue

        public void addAttributeValue​(byte[] value)
                               throws LdapException
        Add a new value to the current attribute
        Parameters:
        value - The value to add
        Throws:
        LdapException - If we can't add a value
      • addAttributeValue

        public void addAttributeValue​(String value)
                               throws LdapException
        Add a new value to the current attribute
        Parameters:
        value - The value to add
        Throws:
        LdapException - If we can't add a value
      • getResponseType

        public MessageTypeEnum getResponseType()
        Gets the protocol response message type for this request which produces at least one response.
        Specified by:
        getResponseType in interface SingleReplyRequest
        Returns:
        the message type of the response.
      • getName

        public Dn getName()
        Gets the distinguished name of the entry to be modified by this request. This property represents the PDU's object field.
        Specified by:
        getName in interface ModifyRequest
        Returns:
        the Dn of the modified entry.
      • setName

        public ModifyRequest setName​(Dn name)
        Sets the distinguished name of the entry to be modified by this request. This property represents the PDU's object field.
        Specified by:
        setName in interface ModifyRequest
        Parameters:
        name - the Dn of the modified entry.
        Returns:
        The ModifyRequest instance
      • getModifications

        public Collection<Modification> getModifications()
        Gets an immutable Collection of modification items representing the atomic changes to perform on the candidate entry to modify.
        Specified by:
        getModifications in interface ModifyRequest
        Returns:
        an immutable Collection of Modification instances.
      • addModification

        public ModifyRequest addModification​(Modification mod)
        Adds a ModificationItem to the set of modifications composing this modify request.
        Specified by:
        addModification in interface ModifyRequest
        Parameters:
        mod - a Modification to add.
        Returns:
        The ModifyRequest instance
      • removeModification

        public ModifyRequest removeModification​(Modification mod)
        Removes a ModificationItem to the set of modifications composing this modify request.
        Specified by:
        removeModification in interface ModifyRequest
        Parameters:
        mod - a Modification to remove.
        Returns:
        The ModifyRequest instance
      • remove

        public ModifyRequest remove​(String attributeName,
                                    String... attributeValue)
        marks a given attribute for removal with the given values from the target entry.
        Specified by:
        remove in interface ModifyRequest
        Parameters:
        attributeName - name of the attribute to be removed
        attributeValue - values of the attribute
        Returns:
        The ModifyRequest instance
      • remove

        public ModifyRequest remove​(Attribute attr)
        marks a given attribute for removal from the target entry.
        Specified by:
        remove in interface ModifyRequest
        Parameters:
        attr - the attribute to be removed
        Returns:
        The ModifyRequest instance
      • remove

        public ModifyRequest remove​(String attributeName)
        marks a given attribute name for removal from the target entry.
        Specified by:
        remove in interface ModifyRequest
        Parameters:
        attributeName - the attribute to be removed
        Returns:
        The ModifyRequest instance
      • add

        public ModifyRequest add​(String attributeName,
                                 String... attributeValue)
        marks a given attribute for addition in the target entry with the given values.
        Specified by:
        add in interface ModifyRequest
        Parameters:
        attributeName - name of the attribute to be added
        attributeValue - values of the attribute
        Returns:
        The ModifyRequest instance
      • add

        public ModifyRequest add​(Attribute attr)
        marks a given attribute for addition in the target entry.
        Specified by:
        add in interface ModifyRequest
        Parameters:
        attr - the attribute to be added
        Returns:
        The ModifyRequest instance
      • replace

        public ModifyRequest replace​(String attributeName,
                                     String... attributeValue)
        marks a given attribute for replacement with the given values in the target entry.
        Specified by:
        replace in interface ModifyRequest
        Parameters:
        attributeName - name of the attribute to be added
        attributeValue - values of the attribute
        Returns:
        The ModifyRequest instance
      • replace

        public ModifyRequest replace​(Attribute attr)
        marks a given attribute for replacement in the target entry.
        Specified by:
        replace in interface ModifyRequest
        Parameters:
        attr - the attribute to be added
        Returns:
        The ModifyRequest instance
      • increment

        public ModifyRequest increment​(Attribute attributeName)
        marks a given attribute for increment by 1 in the target entry.
        Specified by:
        increment in interface ModifyRequest
        Parameters:
        attributeName - the attribute to be incremented
        Returns:
        The ModifyRequest instance
      • increment

        public ModifyRequest increment​(Attribute attributeName,
                                       int increment)
        marks a given attribute for increment in the target entry.
        Specified by:
        increment in interface ModifyRequest
        Parameters:
        attributeName - the attribute to be incremented
        increment - The increment value (>=1)
        Returns:
        The ModifyRequest instance
      • increment

        public ModifyRequest increment​(String attr)
        marks a given attribute for increment by 1 in the target entry.
        Specified by:
        increment in interface ModifyRequest
        Parameters:
        attr - the attribute to be incremented
        Returns:
        The ModifyRequest instance
      • increment

        public ModifyRequest increment​(String attr,
                                       int increment)
        marks a given attribute for increment in the target entry.
        Specified by:
        increment in interface ModifyRequest
        Parameters:
        attr - the attribute to be incremented
        increment - The increment value (>=1)
        Returns:
        The ModifyRequest instance