Interface PreOperationAddOperation

All Superinterfaces:
PluginOperation, PreOperationOperation
All Known Implementing Classes:
AddOperation

public interface PreOperationAddOperation extends PreOperationOperation
This class defines a set of methods that are available for use by pre-operation plugins for add operations. Note that this interface is intended only to define an API for use by plugins and is not intended to be implemented by any custom classes.
  • Method Details

    • getEntryDN

      Dn getEntryDN()
      Retrieves the DN of the entry to add.
      Returns:
      The DN of the entry to add.
    • addObjectClass

      void addObjectClass(ObjectClass objectClass, String name)
      Adds the provided objectclass to the entry to add. 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.
      Parameters:
      objectClass - The objectclass to add to the entry.
      name - The name to use for the objectclass.
    • removeObjectClass

      void removeObjectClass(ObjectClass objectClass)
      Removes the provided objectclass from the entry to add. 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.
      Parameters:
      objectClass - The objectclass to remove from the entry.
    • getAllAttributes

      Iterable<Attribute> getAllAttributes()
      Retrieves the set of attributes as read from the client request. Some of these attributes may be invalid as no validation will have been performed on them.
      Returns:
      The set of attributes as read from the client request.
    • replaceAttribute

      void replaceAttribute(Attribute attribute)
      Adds all of the attribute values contained in attribute to this entry, replacing any existing attribute values (optional operation). If attribute is empty then the entire attribute will be removed if it is present.

      NOTE: This method implements LDAP Modify replace semantics as described in RFC 4511 - Section 4.6. Modify Operation.

      Parameters:
      attribute - The attribute values to be added to this entry, replacing any existing attribute values, and which may be empty if the entire attribute is to be removed.
      Throws:
      UnsupportedOperationException - If this entry does not permit attributes or their values to be replaced.
      NullPointerException - If attribute was null.
    • removeAttribute

      void removeAttribute(AttributeType attributeType)
      Removes the specified attribute from the entry to add. 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.
      Parameters:
      attributeType - The attribute tyep for the attribute to remove.
    • getEntryToAdd

      Entry getEntryToAdd()
      Retrieves the entry to be added to the server. The contents of the returned entry must not be altered by the caller.
      Returns:
      The entry to be added to the server.