Package org.opends.server.core
Class AddOperationWrapper
- java.lang.Object
-
- org.opends.server.core.OperationWrapper<AddOperation>
-
- org.opends.server.core.AddOperationWrapper
-
- All Implemented Interfaces:
Runnable,AddOperation,Operation
- Direct Known Subclasses:
LocalBackendAddOperation
public abstract class AddOperationWrapper extends OperationWrapper<AddOperation> implements AddOperation
This abstract class wraps/decorates a given add operation. This class will be extended by sub-classes to enhance the functionality of the AddOperationBasis.
-
-
Field Summary
-
Fields inherited from interface org.opends.server.types.Operation
LOCALBACKENDOPERATIONS
-
-
Constructor Summary
Constructors Constructor Description AddOperationWrapper(AddOperation add)Creates a new add operation based on the provided add operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddObjectClass(ObjectClass objectClass, String name)Adds the provided objectclass to the entry to add.voidaddRawAttribute(RawAttribute rawAttribute)Adds the provided attribute to the set of raw attributes for this add operation.DNgetEntryDN()Retrieves the DN of the entry to add.Map<ObjectClass,String>getObjectClasses()Retrieves the set of processed objectclasses for the entry to add.Map<AttributeType,List<Attribute>>getOperationalAttributes()Retrieves the set of processed operational attributes for the entry to add.List<RawAttribute>getRawAttributes()Retrieves the set of attributes in their raw, unparsed form as read from the client request.ByteStringgetRawEntryDN()Retrieves the DN of the entry to add in a raw, unparsed form as it was included in the request.Map<AttributeType,List<Attribute>>getUserAttributes()Retrieves the set of processed user attributes for the entry to add.voidremoveAttribute(AttributeType attributeType)Removes the specified attribute from the entry to add.voidremoveObjectClass(ObjectClass objectClass)Removes the provided objectclass from the entry to add.voidsetAttribute(AttributeType attributeType, List<Attribute> attributeList)Sets the specified attribute in the entry to add, overwriting any existing attribute of the specified type if necessary.voidsetRawAttributes(List<RawAttribute> rawAttributes)Replaces the set of raw attributes for this add operation.voidsetRawEntryDN(ByteString rawEntryDN)Specifies the raw entry DN for the entry to add.StringtoString()Retrieves a string representation of this operation.-
Methods inherited from class org.opends.server.core.OperationWrapper
abort, addAdditionalLogItem, addRequestControl, addResponseControl, appendErrorMessage, appendMaskedErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, equals, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getConnectionID, getErrorMessage, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperation, getOperationID, getOperationType, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getProxiedAuthorizationDN, getReferralURLs, getRequestControl, getRequestControls, getResponseControls, getResultCode, hashCode, isInnerOperation, isInternalOperation, isSynchronizationOperation, operationCompleted, registerPostResponseCallback, removeAttachment, removeResponseControl, run, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setProxiedAuthorizationDN, setReferralURLs, setResponseData, setResultCode, setSynchronizationOperation, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opends.server.core.AddOperation
getProxiedAuthorizationDN, setProxiedAuthorizationDN
-
Methods inherited from interface org.opends.server.types.Operation
abort, addAdditionalLogItem, addRequestControl, addResponseControl, appendErrorMessage, appendMaskedErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getConnectionID, getErrorMessage, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperationID, getOperationType, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResponseControls, getResultCode, isInnerOperation, isInternalOperation, isSynchronizationOperation, operationCompleted, registerPostResponseCallback, removeAttachment, removeResponseControl, run, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setReferralURLs, setResponseData, setResultCode, setSynchronizationOperation, toString
-
-
-
-
Constructor Detail
-
AddOperationWrapper
public AddOperationWrapper(AddOperation add)
Creates a new add operation based on the provided add operation.- Parameters:
add- The add operation to wrap
-
-
Method Detail
-
addObjectClass
public void addObjectClass(ObjectClass objectClass, String name)
Description copied from interface:AddOperationAdds 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:
addObjectClassin interfaceAddOperation- Parameters:
objectClass- The objectclass to add to the entry.name- The name to use for the objectclass.
-
addRawAttribute
public void addRawAttribute(RawAttribute rawAttribute)
Description copied from interface:AddOperationAdds the provided attribute to the set of raw attributes for this add operation. This should only be called by pre-parse plugins.- Specified by:
addRawAttributein interfaceAddOperation- Parameters:
rawAttribute- The attribute to add to the set of raw attributes for this add operation.
-
getEntryDN
public DN getEntryDN()
Description copied from interface:AddOperationRetrieves 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:
getEntryDNin interfaceAddOperation- Returns:
- The DN of the entry to add, or
nullif it has not yet been parsed from the raw DN.
-
getObjectClasses
public Map<ObjectClass,String> getObjectClasses()
Description copied from interface:AddOperationRetrieves 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:
getObjectClassesin interfaceAddOperation- Returns:
- The set of processed objectclasses for the entry to add, or
nullif that information is not yet available.
-
getOperationalAttributes
public Map<AttributeType,List<Attribute>> getOperationalAttributes()
Description copied from interface:AddOperationRetrieves 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:
getOperationalAttributesin interfaceAddOperation- Returns:
- The set of processed operational attributes for the entry to add,
or
nullif that information is not yet available.
-
getRawAttributes
public List<RawAttribute> getRawAttributes()
Description copied from interface:AddOperationRetrieves 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.- Specified by:
getRawAttributesin interfaceAddOperation- Returns:
- The set of attributes in their raw, unparsed form as read from the client request.
-
getRawEntryDN
public ByteString getRawEntryDN()
Description copied from interface:AddOperationRetrieves 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.- Specified by:
getRawEntryDNin interfaceAddOperation- Returns:
- The DN of the entry in a raw, unparsed form.
-
getUserAttributes
public Map<AttributeType,List<Attribute>> getUserAttributes()
Description copied from interface:AddOperationRetrieves 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:
getUserAttributesin interfaceAddOperation- Returns:
- The set of processed user attributes for the entry to add, or
nullif that information is not yet available.
-
removeAttribute
public void removeAttribute(AttributeType attributeType)
Description copied from interface:AddOperationRemoves 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:
removeAttributein interfaceAddOperation- Parameters:
attributeType- The attribute tyep for the attribute to remove.
-
removeObjectClass
public void removeObjectClass(ObjectClass objectClass)
Description copied from interface:AddOperationRemoves 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:
removeObjectClassin interfaceAddOperation- Parameters:
objectClass- The objectclass to remove from the entry.
-
setAttribute
public void setAttribute(AttributeType attributeType, List<Attribute> attributeList)
Description copied from interface:AddOperationSets 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:
setAttributein interfaceAddOperation- Parameters:
attributeType- The attribute type for the attribute.attributeList- The attribute list for the provided attribute type.
-
setRawAttributes
public void setRawAttributes(List<RawAttribute> rawAttributes)
Description copied from interface:AddOperationReplaces the set of raw attributes for this add operation. This should only be called by pre-parse plugins.- Specified by:
setRawAttributesin interfaceAddOperation- Parameters:
rawAttributes- The set of raw attributes for this add operation.
-
setRawEntryDN
public void setRawEntryDN(ByteString rawEntryDN)
Description copied from interface:AddOperationSpecifies the raw entry DN for the entry to add. This should only be called by pre-parse plugins to alter the DN before it has been processed. If the entry DN needs to be altered later in the process, then it should be done using thegetEntryDNandsetEntryDNmethods.- Specified by:
setRawEntryDNin interfaceAddOperation- Parameters:
rawEntryDN- The raw entry DN for the entry to add.
-
toString
public String toString()
Description copied from interface:OperationRetrieves a string representation of this operation.- Specified by:
toStringin interfaceOperation- Overrides:
toStringin classOperationWrapper<AddOperation>- Returns:
- A string representation of this operation.
-
-