Class ModifyDNMsg

    • Constructor Detail

      • ModifyDNMsg

        public ModifyDNMsg​(PostOperationModifyDNOperation operation)
        Construct a new Modify DN message.
        Parameters:
        operation - The operation to use for building the message
      • ModifyDNMsg

        public ModifyDNMsg​(Dn dn,
                           CSN csn,
                           UUID entryUUID,
                           UUID newSuperiorEntryUUID,
                           boolean deleteOldRdn,
                           Dn newSuperior,
                           Rdn newRDN)
        Construct a new Modify DN message (no mods). Note: Keep this constructor version to support already written tests, not using mods.
        Parameters:
        dn - The dn to use for building the message.
        csn - The CSN to use for building the message.
        entryUUID - The unique id to use for building the message.
        newSuperiorEntryUUID - The new parent unique id to use for building the message.
        deleteOldRdn - boolean indicating if old rdn must be deleted to use for building the message.
        newSuperior - The new Superior entry to use for building the message.
        newRDN - The new Rdn to use for building the message.
      • ModifyDNMsg

        public ModifyDNMsg​(Dn dn,
                           CSN csn,
                           UUID entryUUID,
                           UUID newSuperiorEntryUUID,
                           boolean deleteOldRdn,
                           Dn newSuperior,
                           Rdn newRDN,
                           List<Modification> mods)
        Construct a new Modify DN message (with mods).
        Parameters:
        dn - The dn to use for building the message.
        csn - The CSNto use for building the message.
        entryUUID - The unique id to use for building the message.
        newSuperiorEntryUUID - The new parent unique id to use for building the message.
        deleteOldRdn - boolean indicating if old rdn must be deleted to use for building the message.
        newSuperior - The new Superior entry to use for building the message.
        newRDN - The new Rdn to use for building the message.
        mods - The mod of the operation.
      • ModifyDNMsg

        public ModifyDNMsg​(CSN csn,
                           Dn dn,
                           UUID entryUUID,
                           Rdn newRdn,
                           Dn newSuperior,
                           UUID newSuperiorEntryUUID,
                           boolean deleteOldRdn,
                           byte[] encodedMods,
                           byte[] encodedEclIncludes)
        Creates a new ModifyDN message.
        Parameters:
        dn - The dn to use for building the message.
        csn - The CSNto use for building the message.
        entryUUID - The unique id to use for building the message.
        newRdn - The new Rdn to use for building the message.
        newSuperiorEntryUUID - The new parent unique id to use for building the message.
        deleteOldRdn - boolean indicating if old rdn must be deleted to use for building the message.
        newSuperior - The new Superior entry to use for building the message.
        encodedMods - The encodedMods of the operation.
        encodedEclIncludes - The encodedEclIncludes of the operation.
    • Method Detail

      • getBytesV1

        public byte[] getBytesV1()
        Description copied from class: LDAPUpdateMsg
        Get the byte array representation of this message.

        This uses the version 1 of the replication protocol (used for compatibility).

        Specified by:
        getBytesV1 in class LDAPUpdateMsg
        Returns:
        The byte array representation of this message.
      • getBytesV23

        public byte[] getBytesV23()
        Description copied from class: LDAPUpdateMsg
        Get the byte array representation of this message.

        This uses the version 2 of the replication protocol (used for compatibility).

        Specified by:
        getBytesV23 in class LDAPUpdateMsg
        Returns:
        The byte array representation of this message.
      • getBytesV4ToLatest

        public byte[] getBytesV4ToLatest​(short protocolVersion)
        Description copied from class: LDAPUpdateMsg
        Get the byte array representation of this message.

        This uses the provided version number which must be at least version 4.

        Specified by:
        getBytesV4ToLatest in class LDAPUpdateMsg
        Parameters:
        protocolVersion - the actual protocol version to encode into
        Returns:
        The byte array representation of this Message.
      • setNewSuperior

        public void setNewSuperior​(Dn newSuperior)
        Set the new superior.
        Parameters:
        newSuperior - the new superior.
      • getNewSuperior

        public Dn getNewSuperior()
        Get the new superior.
        Returns:
        The new superior.
      • getNewSuperiorEntryUUID

        public UUID getNewSuperiorEntryUUID()
        Get the new superior id.
        Returns:
        The new superior id.
      • deleteOldRdn

        public boolean deleteOldRdn()
        Get the delete old rdn option.
        Returns:
        The delete old rdn option.
      • setDeleteOldRdn

        public void setDeleteOldRdn​(boolean delete)
        Set the delete old rdn option.
        Parameters:
        delete - The delete old rdn option.
      • getDeleteOldRdn

        public boolean getDeleteOldRdn()
        Get the delete old rdn option.
        Returns:
        true if delete old rdn option
      • getNewRDN

        public Rdn getNewRDN()
        Get the new RDN of this operation.
        Returns:
        The new RDN of this operation.
      • setNewRDN

        public void setNewRDN​(Rdn newRDN)
        Set the new RDN of this operation.
        Parameters:
        newRDN - the new RDN of this operation.
      • size

        public int size()
        Description copied from class: UpdateMsg
        Return the number of bytes used by this message.
        Specified by:
        size in class LDAPUpdateMsg
        Returns:
        The number of bytes used by this message.