public final class AddOperation extends Operation implements PreParseAddOperation, PreOperationAddOperation, PostOperationAddOperation, PostResponseAddOperation, PostSynchronizationAddOperation
NO_RESPONSE_CONTROLS, requestContext
Constructor and Description |
---|
AddOperation(org.forgerock.services.context.Context context,
AddRequest request)
Creates a new add operation with the provided information.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(Attribute attribute)
Adds the provided attribute to the set of attributes for this add operation.
|
void |
addObjectClass(ObjectClass objectClass,
String name)
Adds the provided objectclass to the entry to add.
|
void |
addResponseControl(Control control)
Adds the provided control to the set of controls to include in the response to the client.
|
Iterable<Attribute> |
getAllAttributes()
Retrieves the set of attributes as read from the client request.
|
Entry |
getEntry()
Returns 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.
|
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<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the client.
|
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 |
replaceAttribute(Attribute attribute)
Adds all of the attribute values contained in
attribute to this entry, replacing any existing attribute
values (optional operation). |
void |
run()
Performs the work of actually processing this operation.
|
void |
setEntryDN(Dn entryDN)
Specifies the entry DN for the entry to add.
|
void |
setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
Set the proxied authorization DN for this operation if proxied authorization has been requested.
|
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, createLdapException, disconnectClient, dontSynchronize, equals, evaluateProxyAuthControls, filterNonDisclosableMatchedDN, findMatchedDN, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getClientConnection, getConnectionID, getContext, getErrorMessage, getLocalBackend, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, hashCode, hasPrivilege, invokePostResponseCallbacks, isHumanReadable, isInnerOperation, isInternalOperation, isProxyAuthzControl, isSynchronizationOperation, mustCheckSchema, operationCompleted, processOperationResult, processOperationResult, registerPostResponseCallback, removeAllDisallowedControls, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMatchedDN, setProcessingStartTime, setProcessingStopTime, setReferralURLs, setResponseData, setResult, setResultCode, setResultCodeAndMessageNoInfoDisclosure, setSynchronizationOperation, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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, getRequestControl, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString
public AddOperation(org.forgerock.services.context.Context context, AddRequest request)
context
- The context with which this operation is associated.request
- The add request.public void setEntryDN(Dn entryDN)
PreParseAddOperation
setEntryDN
in interface PreParseAddOperation
entryDN
- The entry DN for the entry to add.public Dn getEntryDN()
PreParseAddOperation
getEntryDN
in interface PostOperationAddOperation
getEntryDN
in interface PostResponseAddOperation
getEntryDN
in interface PostSynchronizationAddOperation
getEntryDN
in interface PreOperationAddOperation
getEntryDN
in interface PreParseAddOperation
public void addAttribute(Attribute attribute)
PreParseAddOperation
addAttribute
in interface PreParseAddOperation
attribute
- The attribute to add to the set of attributes for this add operation.public void addObjectClass(ObjectClass objectClass, String name)
addObjectClass
in interface PreOperationAddOperation
objectClass
- The objectclass to add to the entry.name
- The name to use for the objectclass.public void removeObjectClass(ObjectClass objectClass)
removeObjectClass
in interface PreOperationAddOperation
objectClass
- The objectclass to remove from the entry.public Entry getEntry()
PreOperationAddOperation
getEntry
in interface PostOperationAddOperation
getEntry
in interface PostResponseAddOperation
getEntry
in interface PostSynchronizationAddOperation
getEntry
in interface PreOperationAddOperation
public Iterable<Attribute> getAllAttributes()
PreParseAddOperation
getAllAttributes
in interface PostOperationAddOperation
getAllAttributes
in interface PostResponseAddOperation
getAllAttributes
in interface PostSynchronizationAddOperation
getAllAttributes
in interface PreOperationAddOperation
getAllAttributes
in interface PreParseAddOperation
public void replaceAttribute(Attribute attribute)
PreOperationAddOperation
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.
replaceAttribute
in interface PreOperationAddOperation
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.public void removeAttribute(AttributeType attributeType)
removeAttribute
in interface PreOperationAddOperation
attributeType
- The attribute tyep for the attribute to remove.public OperationType getOperationType()
PluginOperation
getOperationType
in interface PluginOperation
public Dn getProxiedAuthorizationDN()
Operation
getProxiedAuthorizationDN
in class Operation
null
if proxied authorization has not been requested.public List<Control> getResponseControls()
PluginOperation
getResponseControls
in interface PluginOperation
public void addResponseControl(Control control)
Operation
addResponseControl
in interface PostOperationOperation
addResponseControl
in interface PreOperationOperation
addResponseControl
in interface PreParseOperation
addResponseControl
in class Operation
control
- The control to add to the set of controls to include in the response to the client.public void removeResponseControl(Control control)
Operation
removeResponseControl
in interface PostOperationOperation
removeResponseControl
in interface PreOperationOperation
removeResponseControl
in interface PreParseOperation
removeResponseControl
in class Operation
control
- The control to remove from the set of controls to include in the response to the client.public void toString(StringBuilder buffer)
Operation
toString
in interface PluginOperation
toString
in class Operation
buffer
- The buffer into which a string representation of this operation should be appended.public void setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
Operation
setProxiedAuthorizationDN
in class 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 void run()
Operation
public void updateOperationErrMsgAndResCode()
Operation
updateOperationErrMsgAndResCode
in class Operation
public 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-2022 ForgeRock AS.