Class ModifyOperationBasis

    • Constructor Detail

      • ModifyOperationBasis

        public ModifyOperationBasis​(ClientConnection clientConnection,
                                    long operationID,
                                    int messageID,
                                    List<Control> requestControls,
                                    ByteString rawEntryDN,
                                    List<RawModification> rawModifications)
        Creates a new modify operation with the provided information.
        Parameters:
        clientConnection - The client connection with which this operation is associated.
        operationID - The operation ID for this operation.
        messageID - The message ID of the request with which this operation is associated.
        requestControls - The set of controls included in the request.
        rawEntryDN - The raw, unprocessed DN of the entry to modify, as included in the client request.
        rawModifications - The raw, unprocessed set of modifications for this modify operation as included in the client request.
      • ModifyOperationBasis

        public ModifyOperationBasis​(ClientConnection clientConnection,
                                    long operationID,
                                    int messageID,
                                    List<Control> requestControls,
                                    DN entryDN,
                                    List<Modification> modifications)
        Creates a new modify operation with the provided information.
        Parameters:
        clientConnection - The client connection with which this operation is associated.
        operationID - The operation ID for this operation.
        messageID - The message ID of the request with which this operation is associated.
        requestControls - The set of controls included in the request.
        entryDN - The entry DN for the modify operation.
        modifications - The set of modifications for this modify operation.
    • Method Detail

      • setRawEntryDN

        public final void setRawEntryDN​(ByteString rawEntryDN)
        Description copied from interface: ModifyOperation
        Specifies the raw, unprocessed entry DN as included in the client request. This should only be called by pre-parse plugins.
        Specified by:
        setRawEntryDN in interface ModifyOperation
        Specified by:
        setRawEntryDN in interface PreParseModifyOperation
        Parameters:
        rawEntryDN - The raw, unprocessed entry DN as included in the client request.
      • getEntryDN

        public final DN getEntryDN()
        Description copied from interface: ModifyOperation
        Retrieves the DN of the entry to modify. This should not be called by pre-parse plugins because the processed DN will not be available yet. Instead, they should call the getRawEntryDN method.
        Specified by:
        getEntryDN in interface ModifyOperation
        Specified by:
        getEntryDN in interface PostResponseModifyOperation
        Returns:
        The DN of the entry to modify, or null if the raw entry DN has not yet been processed.
      • addRawModification

        public final void addRawModification​(RawModification rawModification)
        Description copied from interface: ModifyOperation
        Adds the provided modification to the set of raw modifications for this modify operation. This must only be called by pre-parse plugins.
        Specified by:
        addRawModification in interface ModifyOperation
        Specified by:
        addRawModification in interface PreParseModifyOperation
        Parameters:
        rawModification - The modification to add to the set of raw modifications for this modify operation.
      • addModification

        public final void addModification​(Modification modification)
                                   throws DirectoryException
        Description copied from interface: ModifyOperation
        Adds the provided modification to the set of modifications to this modify operation. This may only be called by pre-operation plugins.
        Specified by:
        addModification in interface ModifyOperation
        Parameters:
        modification - The modification to add to the set of changes for this modify operation.
        Throws:
        DirectoryException - If an unexpected problem occurs while applying the modification to the entry.
      • getProxiedAuthorizationDN

        public DN getProxiedAuthorizationDN()
        Description copied from interface: ModifyOperation
        Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.
        Specified by:
        getProxiedAuthorizationDN in interface ModifyOperation
        Specified by:
        getProxiedAuthorizationDN in interface Operation
        Returns:
        The proxied authorization DN for this operation if proxied authorization has been requested, or null if proxied authorization has not been requested.
      • getResponseControls

        public final List<Control> getResponseControls()
        Description copied from interface: Operation
        Retrieves the set of controls to include in the response to the client. The contents of this list must not be altered.
        Specified by:
        getResponseControls in interface Operation
        Specified by:
        getResponseControls in interface PluginOperation
        Returns:
        The set of controls to include in the response to the client.
      • addResponseControl

        public final void addResponseControl​(Control control)
        Description copied from interface: Operation
        Adds the provided control to the set of controls to include in the response to the client. This method may not be called by post-response plugins.
        Specified by:
        addResponseControl in interface Operation
        Specified by:
        addResponseControl in interface PreParseOperation
        Parameters:
        control - The control to add to the set of controls to include in the response to the client.
      • removeResponseControl

        public final void removeResponseControl​(Control control)
        Description copied from interface: Operation
        Removes the provided control from the set of controls to include in the response to the client. This method may not be called by post-response plugins.
        Specified by:
        removeResponseControl in interface Operation
        Specified by:
        removeResponseControl in interface PreParseOperation
        Parameters:
        control - The control to remove from the set of controls to include in the response to the client.
      • toString

        public final void toString​(StringBuilder buffer)
        Description copied from interface: Operation
        Appends a string representation of this operation to the provided buffer.
        Specified by:
        toString in interface Operation
        Specified by:
        toString in interface PluginOperation
        Parameters:
        buffer - The buffer into which a string representation of this operation should be appended.
      • setProxiedAuthorizationDN

        public void setProxiedAuthorizationDN​(DN proxiedAuthorizationDN)
        Description copied from interface: ModifyOperation
        Set the proxied authorization DN for this operation if proxied authorization has been requested.
        Specified by:
        setProxiedAuthorizationDN in interface ModifyOperation
        Specified by:
        setProxiedAuthorizationDN in interface Operation
        Parameters:
        proxiedAuthorizationDN - The proxied authorization DN for this operation if proxied authorization has been requested, or null if proxied authorization has not been requested.
      • run

        public final void run()
        Description copied from interface: Operation
        Performs the work of actually processing this operation. This should include all processing for the operation, including invoking pre-parse and post-response plugins, logging messages and any other work that might need to be done in the course of processing.
        Specified by:
        run in interface Operation
        Specified by:
        run in interface Runnable
      • updateOperationErrMsgAndResCode

        public void updateOperationErrMsgAndResCode()
        Description copied from class: AbstractOperation
        Updates the error message and the result code of the operation. This method is called because no workflows were found to process the operation.
        Overrides:
        updateOperationErrMsgAndResCode in class AbstractOperation
      • getCurrentEntry

        public Entry getCurrentEntry()
        Retrieves the current entry before any modifications are applied. It should not be modified by the caller. This method always returns null.
        Specified by:
        getCurrentEntry in interface PostResponseModifyOperation
        Returns:
        The current entry before any modifications are applied.
      • getCurrentPasswords

        public List<ByteString> getCurrentPasswords()
        Retrieves the set of clear-text current passwords for the user, if available. This will only be available if the modify operation contains one or more delete elements that target the password attribute and provide the values to delete in the clear. This list should not be altered by the caller. This method always returns null.
        Specified by:
        getCurrentPasswords in interface PostResponseModifyOperation
        Returns:
        The set of clear-text current password values as provided in the modify request, or null if there were none.
      • getModifiedEntry

        public Entry getModifiedEntry()
        Retrieves the modified entry that is to be written to the backend. It should not be modified by the caller. This method always returns null.
        Specified by:
        getModifiedEntry in interface PostResponseModifyOperation
        Returns:
        The modified entry that is to be written to the backend.
      • getNewPasswords

        public List<ByteString> getNewPasswords()
        Retrieves the set of clear-text new passwords for the user, if available. This will only be available if the modify operation contains one or more add or replace elements that target the password attribute and provide the values in the clear. This list should not be altered by the caller. This method always returns null.
        Specified by:
        getNewPasswords in interface PostResponseModifyOperation
        Returns:
        The set of clear-text new passwords as provided in the modify request, or null if there were none.