public final class AddOperationBasis extends AbstractOperation implements AddOperation, PreParseAddOperation, PreOperationAddOperation, PostOperationAddOperation, PostResponseAddOperation, PostSynchronizationAddOperation
NO_RESPONSE_CONTROLS, requestContext
Constructor and Description |
---|
AddOperationBasis(org.forgerock.services.context.Context context,
AddRequest request)
Creates a new add operation with the provided information.
|
Modifier and Type | Method and Description |
---|---|
void |
addObjectClass(ObjectClass objectClass,
String name)
Adds the provided objectclass to the entry to add.
|
void |
addRawAttribute(RawAttribute rawAttribute)
Adds the provided attribute to the set of raw attributes for this add operation.
|
void |
addResponseControl(Control control)
Adds the provided control to the set of controls to include in the response to the client.
|
Dn |
getEntryDN()
Retrieves the DN of the entry to add.
|
Entry |
getEntryToAdd()
Retrieves the entry to be added to the server.
|
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.
|
OperationType |
getOperationType()
Retrieves the operation type for this operation.
|
Dn |
getProxiedAuthorizationDN()
Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.
|
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.
|
ArrayList<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the client.
|
Map<AttributeType,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 |
removeResponseControl(Control control)
Removes the provided control from the set of controls to include in the response to the client.
|
void |
run()
Performs the work of actually processing this operation.
|
void |
setAttribute(AttributeType attributeType,
List<Attribute> attributeList)
Sets the specified attribute in the entry to add, overwriting any existing attribute of the specified type if
necessary.
|
void |
setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
Set the proxied authorization DN for this operation if proxied authorization has been requested.
|
void |
setRawAttributes(List<RawAttribute> rawAttributes)
Replaces the set of raw attributes for this add operation.
|
void |
setRawEntryDN(ByteString rawEntryDN)
Specifies the raw entry DN for the entry to add.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this operation to the provided buffer.
|
void |
updateOperationErrMsgAndResCode()
Updates the error message and the result code of the operation.
|
addAdditionalLogItem, addPostReadResponse, addPreReadResponse, addRequestControl, appendErrorMessage, appendMaskedErrorMessage, checkAttributeConformsToSyntax, checkIfBackendIsWritable, checkIfCanceled, disconnectClient, dontSynchronize, equals, evaluateProxyAuthControls, filterNonDisclosableMatchedDN, findMatchedDN, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getClientConnection, getConnectionID, getContext, getErrorMessage, getLocalBackend, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, hashCode, invokePostResponseCallbacks, isHumanReadable, isInnerOperation, isInternalOperation, isProxyAuthzControl, isSynchronizationOperation, mustCheckSchema, newDirectoryException, operationCompleted, processOperationResult, processOperationResult, registerPostResponseCallback, removeAllDisallowedControls, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setProcessingStartTime, setProcessingStopTime, setReferralURLs, setResponseData, setResult, setResultCode, setResultCodeAndMessageNoInfoDisclosure, setSynchronizationOperation, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAdditionalLogItem, addRequestControl, appendErrorMessage, appendMaskedErrorMessage, disconnectClient, dontSynchronize, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getClientConnection, getConnectionID, getContext, getErrorMessage, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, isInnerOperation, isInternalOperation, isSynchronizationOperation, operationCompleted, registerPostResponseCallback, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setReferralURLs, setResponseData, setResult, setResultCode, setSynchronizationOperation, toString
addAdditionalLogItem, addRequestControl, appendErrorMessage, getAdditionalLogItems, getErrorMessage, setErrorMessage
addAdditionalLogItem, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, setErrorMessage
addAdditionalLogItem, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, getMatchedDN, getReferralURLs, getResultCode, setErrorMessage, setMatchedDN, setReferralURLs, setResponseData, setResultCode
getAdditionalLogItems, getAuthorizationDN, getErrorMessage, getMatchedDN, getProcessingStopTime, getProcessingTime, getReferralURLs, getResultCode
getAdditionalLogItems, getAuthorizationDN, getErrorMessage, getMatchedDN, getProcessingStopTime, getProcessingTime, getReferralURLs, getResultCode
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControl, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString
public AddOperationBasis(org.forgerock.services.context.Context context, AddRequest request)
context
- The context with which this operation is associated.request
- The add request.public final ByteString getRawEntryDN()
AddOperation
getRawEntryDN
in interface AddOperation
getRawEntryDN
in interface PostOperationAddOperation
getRawEntryDN
in interface PostResponseAddOperation
getRawEntryDN
in interface PostSynchronizationAddOperation
getRawEntryDN
in interface PreOperationAddOperation
getRawEntryDN
in interface PreParseAddOperation
public final void setRawEntryDN(ByteString rawEntryDN)
AddOperation
getEntryDN
and setEntryDN
methods.setRawEntryDN
in interface AddOperation
setRawEntryDN
in interface PreParseAddOperation
rawEntryDN
- The raw entry DN for the entry to add.public final Dn getEntryDN()
AddOperation
getEntryDN
in interface AddOperation
getEntryDN
in interface PostOperationAddOperation
getEntryDN
in interface PostResponseAddOperation
getEntryDN
in interface PostSynchronizationAddOperation
getEntryDN
in interface PreOperationAddOperation
null
if it has not yet been parsed from the raw DN.public final List<RawAttribute> getRawAttributes()
AddOperation
getRawAttributes
in interface AddOperation
getRawAttributes
in interface PostOperationAddOperation
getRawAttributes
in interface PostResponseAddOperation
getRawAttributes
in interface PostSynchronizationAddOperation
getRawAttributes
in interface PreOperationAddOperation
getRawAttributes
in interface PreParseAddOperation
public final void addRawAttribute(RawAttribute rawAttribute)
AddOperation
addRawAttribute
in interface AddOperation
addRawAttribute
in interface PreParseAddOperation
rawAttribute
- The attribute to add to the set of raw attributes for this add operation.public final void setRawAttributes(List<RawAttribute> rawAttributes)
AddOperation
setRawAttributes
in interface AddOperation
setRawAttributes
in interface PreParseAddOperation
rawAttributes
- The set of raw attributes for this add operation.public final Map<ObjectClass,String> getObjectClasses()
AddOperation
getObjectClasses
in interface AddOperation
getObjectClasses
in interface PostOperationAddOperation
getObjectClasses
in interface PostResponseAddOperation
getObjectClasses
in interface PostSynchronizationAddOperation
getObjectClasses
in interface PreOperationAddOperation
null
if that information is not
yet available.public final void addObjectClass(ObjectClass objectClass, String name)
AddOperation
addObjectClass
in interface AddOperation
addObjectClass
in interface PreOperationAddOperation
objectClass
- The objectclass to add to the entry.name
- The name to use for the objectclass.public final void removeObjectClass(ObjectClass objectClass)
AddOperation
removeObjectClass
in interface AddOperation
removeObjectClass
in interface PreOperationAddOperation
objectClass
- The objectclass to remove from the entry.public final Map<AttributeType,List<Attribute>> getUserAttributes()
AddOperation
getUserAttributes
in interface AddOperation
getUserAttributes
in interface PostOperationAddOperation
getUserAttributes
in interface PostResponseAddOperation
getUserAttributes
in interface PostSynchronizationAddOperation
getUserAttributes
in interface PreOperationAddOperation
null
if that information is
not yet available.public final Map<AttributeType,List<Attribute>> getOperationalAttributes()
AddOperation
getOperationalAttributes
in interface AddOperation
getOperationalAttributes
in interface PostOperationAddOperation
getOperationalAttributes
in interface PostResponseAddOperation
getOperationalAttributes
in interface PostSynchronizationAddOperation
getOperationalAttributes
in interface PreOperationAddOperation
null
if that
information is not yet available.public final void setAttribute(AttributeType attributeType, List<Attribute> attributeList)
AddOperation
setAttribute
in interface AddOperation
setAttribute
in interface PreOperationAddOperation
attributeType
- The attribute type for the attribute.attributeList
- The attribute list for the provided attribute type.public final void removeAttribute(AttributeType attributeType)
AddOperation
removeAttribute
in interface AddOperation
removeAttribute
in interface PreOperationAddOperation
attributeType
- The attribute tyep for the attribute to remove.public final OperationType getOperationType()
Operation
getOperationType
in interface Operation
getOperationType
in interface PluginOperation
public Dn getProxiedAuthorizationDN()
AddOperation
getProxiedAuthorizationDN
in interface AddOperation
getProxiedAuthorizationDN
in interface Operation
null
if proxied authorization has not been requested.public final ArrayList<Control> getResponseControls()
Operation
getResponseControls
in interface Operation
getResponseControls
in interface PluginOperation
public final void addResponseControl(Control control)
Operation
addResponseControl
in interface Operation
addResponseControl
in interface PostOperationOperation
addResponseControl
in interface PreOperationOperation
addResponseControl
in interface PreParseOperation
control
- The control to add to the set of controls to include in the response to the client.public final void removeResponseControl(Control control)
Operation
removeResponseControl
in interface Operation
removeResponseControl
in interface PostOperationOperation
removeResponseControl
in interface PreOperationOperation
removeResponseControl
in interface PreParseOperation
control
- The control to remove from the set of controls to include in the response to the client.public final void toString(StringBuilder buffer)
Operation
toString
in interface Operation
toString
in interface PluginOperation
buffer
- The buffer into which a string representation of this operation should be appended.public void setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
AddOperation
setProxiedAuthorizationDN
in interface AddOperation
setProxiedAuthorizationDN
in interface Operation
proxiedAuthorizationDN
- The proxied authorization DN for this operation if proxied authorization has been requested, or
null
if proxied authorization has not been requested.public final void run()
Operation
public void updateOperationErrMsgAndResCode()
AbstractOperation
updateOperationErrMsgAndResCode
in class AbstractOperation
public final Entry getEntryToAdd()
getEntryToAdd
in interface PostOperationAddOperation
getEntryToAdd
in interface PostResponseAddOperation
getEntryToAdd
in interface PostSynchronizationAddOperation
getEntryToAdd
in interface PreOperationAddOperation
null
if it is not yet available.Copyright 2010-2020 ForgeRock AS.