Class AddOperationBasis

    • Constructor Detail

      • AddOperationBasis

        public AddOperationBasis​(ClientConnection clientConnection,
                                 long operationID,
                                 int messageID,
                                 List<Control> requestControls,
                                 ByteString rawEntryDN,
                                 List<RawAttribute> rawAttributes)
        Creates a new add 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 DN of the entry to add from the client request. This may or may not be a valid DN.
        rawAttributes - The raw set of attributes from the client request (including the objectclass attribute). This may contain invalid attributes.
      • AddOperationBasis

        public AddOperationBasis​(ClientConnection clientConnection,
                                 long operationID,
                                 int messageID,
                                 List<Control> requestControls,
                                 Entry entry)
        Creates a new add 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.
        entry - The entry to add.
    • Method Detail

      • getEntryDN

        public final DN getEntryDN()
        Description copied from interface: AddOperation
        Retrieves the DN of the entry to add. This method should not be called by pre-parse plugins because the parsed DN will not be available at that time.
        Specified by:
        getEntryDN in interface AddOperation
        Specified by:
        getEntryDN in interface PostResponseAddOperation
        Returns:
        The DN of the entry to add, or null if it has not yet been parsed from the raw DN.
      • getObjectClasses

        public final Map<ObjectClass,​String> getObjectClasses()
        Description copied from interface: AddOperation
        Retrieves the set of processed objectclasses for the entry to add. This should not be called by pre-parse plugins because this information will not yet be available. The contents of the returned map may not be altered by the caller.
        Specified by:
        getObjectClasses in interface AddOperation
        Specified by:
        getObjectClasses in interface PostResponseAddOperation
        Returns:
        The set of processed objectclasses for the entry to add, or null if that information is not yet available.
      • addObjectClass

        public final void addObjectClass​(ObjectClass objectClass,
                                         String name)
        Description copied from interface: AddOperation
        Adds the provided objectclass to the entry to add. This should only be called from pre-operation plugins. Note that pre-operation plugin processing is invoked after access control and schema validation, so plugins should be careful to only make changes that will not violate either schema or access control rules.
        Specified by:
        addObjectClass in interface AddOperation
        Parameters:
        objectClass - The objectclass to add to the entry.
        name - The name to use for the objectclass.
      • removeObjectClass

        public final void removeObjectClass​(ObjectClass objectClass)
        Description copied from interface: AddOperation
        Removes the provided objectclass from the entry to add. This should only be called from pre-operation plugins. Note that pre-operation plugin processing is invoked after access control and schema validation, so plugins should be careful to only make changes that will not violate either schema or access control rules.
        Specified by:
        removeObjectClass in interface AddOperation
        Parameters:
        objectClass - The objectclass to remove from the entry.
      • getUserAttributes

        public final Map<AttributeType,​List<Attribute>> getUserAttributes()
        Description copied from interface: AddOperation
        Retrieves the set of processed user attributes for the entry to add. This should not be called by pre-parse plugins because this information will not yet be available. The contents of the returned map may be altered by the caller.
        Specified by:
        getUserAttributes in interface AddOperation
        Specified by:
        getUserAttributes in interface PostResponseAddOperation
        Returns:
        The set of processed user attributes for the entry to add, or null if that information is not yet available.
      • getOperationalAttributes

        public final Map<AttributeType,​List<Attribute>> getOperationalAttributes()
        Description copied from interface: AddOperation
        Retrieves the set of processed operational attributes for the entry to add. This should not be called by pre-parse plugins because this information will not yet be available. The contents of the returned map may be altered by the caller.
        Specified by:
        getOperationalAttributes in interface AddOperation
        Specified by:
        getOperationalAttributes in interface PostResponseAddOperation
        Returns:
        The set of processed operational attributes for the entry to add, or null if that information is not yet available.
      • setAttribute

        public final void setAttribute​(AttributeType attributeType,
                                       List<Attribute> attributeList)
        Description copied from interface: AddOperation
        Sets the specified attribute in the entry to add, overwriting any existing attribute of the specified type if necessary. This should only be called from pre-operation plugins. Note that pre-operation plugin processing is invoked after access control and schema validation, so plugins should be careful to only make changes that will not violate either schema or access control rules.
        Specified by:
        setAttribute in interface AddOperation
        Parameters:
        attributeType - The attribute type for the attribute.
        attributeList - The attribute list for the provided attribute type.
      • removeAttribute

        public final void removeAttribute​(AttributeType attributeType)
        Description copied from interface: AddOperation
        Removes the specified attribute from the entry to add. This should only be called from pre-operation plugins. Note that pre-operation processing is invoked after access control and schema validation, so plugins should be careful to only make changes that will not violate either schema or access control rules.
        Specified by:
        removeAttribute in interface AddOperation
        Parameters:
        attributeType - The attribute tyep for the attribute to remove.
      • getProxiedAuthorizationDN

        public DN getProxiedAuthorizationDN()
        Description copied from interface: AddOperation
        Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.
        Specified by:
        getProxiedAuthorizationDN in interface AddOperation
        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.
      • addResponseControl

        public final void addResponseControl​(Control control)
        Description copied from interface: PreParseOperation
        Adds the provided control to the set of controls to include in the response to the client.
        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: PreParseOperation
        Removes the provided control from the set of controls to include in the response to the client.
        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: PluginOperation
        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: AddOperation
        Set the proxied authorization DN for this operation if proxied authorization has been requested.
        Specified by:
        setProxiedAuthorizationDN in interface AddOperation
        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
      • getEntryToAdd

        public Entry getEntryToAdd()
        Retrieves the entry to be added to the server. The contents of the returned entry must not be altered by the caller. This method always returns null.
        Specified by:
        getEntryToAdd in interface PostResponseAddOperation
        Returns:
        The entry to be added to the server.