org.opends.server.types.operation
Interface PreOperationAddOperation

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

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
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 Summary
 void addObjectClass(ObjectClass objectClass, java.lang.String name)
          Adds the provided objectclass to the entry to add.
 DN getEntryDN()
          Retrieves the DN of the entry to add.
 Entry getEntryToAdd()
          Retrieves the entry to be added to the server.
 java.util.Map<ObjectClass,java.lang.String> getObjectClasses()
          Retrieves the set of processed objectclasses for the entry to add.
 java.util.Map<AttributeType,java.util.List<Attribute>> getOperationalAttributes()
          Retrieves the set of processed operational attributes for the entry to add.
 java.util.List<RawAttribute> getRawAttributes()
          Retrieves the set of attributes in their raw, unparsed form as read from the client request.
 ByteString getRawEntryDN()
          Retrieves the DN of the entry to add in a raw, unparsed form as it was included in the request.
 java.util.Map<AttributeType,java.util.List<Attribute>> getUserAttributes()
          Retrieves the set of processed user attributes for the entry to add.
 void removeAttribute(AttributeType attributeType)
          Removes the specified attribute from the entry to add.
 void removeObjectClass(ObjectClass objectClass)
          Removes the provided objectclass from the entry to add.
 void setAttribute(AttributeType attributeType, java.util.List<Attribute> attributeList)
          Sets the specified attribute in the entry to add, overwriting any existing attribute of the specified type if necessary.
 
Methods inherited from interface org.opends.server.types.operation.PreOperationOperation
addResponseControl, appendAdditionalLogMessage, appendErrorMessage, getAdditionalLogMessage, getAuthorizationDN, getErrorMessage, removeResponseControl, setAdditionalLogMessage, setErrorMessage
 
Methods inherited from interface org.opends.server.types.operation.PluginOperation
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getOperationType, getProcessingStartTime, getRequestControls, getResponseControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString, toString
 

Method Detail

getRawEntryDN

ByteString getRawEntryDN()
Retrieves the DN of the entry to add in a raw, unparsed form as it was included in the request. This may or may not actually contain a valid DN, since no validation will have been performed on it.

Returns:
The DN of the entry in a raw, unparsed form.

getRawAttributes

java.util.List<RawAttribute> getRawAttributes()
Retrieves the set of attributes in their raw, unparsed form as read from the client request. Some of these attributes may be invalid as no validation will have been performed on them. The returned list must not be altered by the caller.

Returns:
The set of attributes in their raw, unparsed form as read from the client request.

getEntryDN

DN getEntryDN()
Retrieves the DN of the entry to add.

Returns:
The DN of the entry to add.

getObjectClasses

java.util.Map<ObjectClass,java.lang.String> getObjectClasses()
Retrieves the set of processed objectclasses for the entry to add. The contents of the returned map must not be altered by the caller.

Returns:
The set of processed objectclasses for the entry to add.

addObjectClass

void addObjectClass(ObjectClass objectClass,
                    java.lang.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.

getUserAttributes

java.util.Map<AttributeType,java.util.List<Attribute>> getUserAttributes()
Retrieves the set of processed user attributes for the entry to add. The contents of the returned map must not be altered by the caller.

Returns:
The set of processed user attributes for the entry to add.

getOperationalAttributes

java.util.Map<AttributeType,java.util.List<Attribute>> getOperationalAttributes()
Retrieves the set of processed operational attributes for the entry to add. The contents of the returned map must not be altered by the caller.

Returns:
The set of processed operational attributes for the entry to add.

setAttribute

void setAttribute(AttributeType attributeType,
                  java.util.List<Attribute> attributeList)
Sets the specified attribute in the entry to add, overwriting any existing attribute of the specified type if necessary. 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:
attributeType - The attribute type for the attribute.
attributeList - The attribute list for the provided attribute type.

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.