Interface PreOperationAddOperation
- All Superinterfaces:
PluginOperation,PreOperationOperation
- All Known Implementing Classes:
AddOperation
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 Summary
Modifier and TypeMethodDescriptionvoidaddObjectClass(ObjectClass objectClass, String name) Adds the provided objectclass to the entry to add.Retrieves the set of attributes as read from the client request.Retrieves the DN of the entry to add.Retrieves the entry to be added to the server.voidremoveAttribute(AttributeType attributeType) Removes the specified attribute from the entry to add.voidremoveObjectClass(ObjectClass objectClass) Removes the provided objectclass from the entry to add.voidreplaceAttribute(Attribute attribute) Adds all of the attribute values contained inattributeto this entry, replacing any existing attribute values (optional operation).Methods inherited from interface org.opends.server.types.operation.PluginOperation
checkIfCanceled, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getRequest, getRequestControl, getRequestControl, getRequestControls, getResponseControls, hasPrivilege, isInternalOperation, isSynchronizationOperation, setAttachment, toString, toStringMethods inherited from interface org.opends.server.types.operation.PreOperationOperation
addAdditionalLogItem, addResponseControl, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, removeResponseControl, sendResponses, setErrorMessage
-
Method Details
-
getEntryDN
Dn getEntryDN()Retrieves the DN of the entry to add.- Returns:
- The DN of the entry to add.
-
addObjectClass
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
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
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
Adds all of the attribute values contained inattributeto this entry, replacing any existing attribute values (optional operation). Ifattributeis 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- Ifattributewasnull.
-
removeAttribute
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.
-