|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.types.AbstractOperation
org.opends.server.core.AddOperationBasis
public class AddOperationBasis
This class defines an operation that may be used to add a new entry to the Directory Server.
| Field Summary |
|---|
| Fields inherited from class org.opends.server.types.AbstractOperation |
|---|
clientConnection, messageID, NO_RESPONSE_CONTROLS, operationID, useNanoTime |
| Fields inherited from interface org.opends.server.types.Operation |
|---|
LOCALBACKENDOPERATIONS |
| Constructor Summary | |
|---|---|
AddOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
ByteString rawEntryDN,
java.util.List<RawAttribute> rawAttributes)
Creates a new add operation with the provided information. |
|
AddOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
DN entryDN,
java.util.Map<ObjectClass,java.lang.String> objectClasses,
java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes,
java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
Creates a new add operation with the provided information. |
|
| Method Summary | |
|---|---|
void |
addObjectClass(ObjectClass objectClass,
java.lang.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. |
CancelResult |
cancel(CancelRequest cancelRequest)
Attempts to cancel this operation before processing has completed. |
void |
disconnectClient(DisconnectReason disconnectReason,
boolean sendNotification,
Message message)
Terminates the client connection being used to process this operation. |
CancelRequest |
getCancelRequest()
Retrieves the cancel request that has been issued for this operation, if there is one. |
long |
getChangeNumber()
Retrieves the change number that has been assigned to this operation. |
DN |
getEntryDN()
Retrieves the DN of the entry to add. |
Entry |
getEntryToAdd()
Retrieves the entry to be added to the server. This method always returns null. |
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. |
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. |
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.lang.String[][] |
getRequestLogElements()
Retrieves a standard set of elements that should be logged in requests for this type of operation. |
java.util.ArrayList<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the client. |
java.lang.String[][] |
getResponseLogElements()
Retrieves a standard set of elements that should be logged in responses for this type of operation. |
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 |
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,
java.util.List<Attribute> attributeList)
Sets the specified attribute in the entry to add, overwriting any existing attribute of the specified type if necessary. |
boolean |
setCancelRequest(CancelRequest cancelRequest)
Sets the cancel request for this operation, if applicable. |
void |
setChangeNumber(long changeNumber)
Specifies the change number that has been assigned to this operation by the synchronization mechanism. |
void |
setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
Set the proxied authorization DN for this operation if proxied authorization has been requested. |
void |
setRawAttributes(java.util.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(java.lang.StringBuilder buffer)
Appends a string representation of this operation to the provided buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opends.server.types.operation.PreParseOperation |
|---|
addRequestControl, appendAdditionalLogMessage, appendErrorMessage, getAdditionalLogMessage, getErrorMessage, getMatchedDN, getReferralURLs, getResultCode, removeRequestControl, setAdditionalLogMessage, setErrorMessage, setMatchedDN, setReferralURLs, setResponseData, setResultCode |
| Methods inherited from interface org.opends.server.types.operation.PluginOperation |
|---|
getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString |
| Methods inherited from interface org.opends.server.types.operation.PostResponseOperation |
|---|
getAdditionalLogMessage, getAuthorizationDN, getErrorMessage, getMatchedDN, getProcessingStopTime, getProcessingTime, getReferralURLs, getResultCode |
| Methods inherited from interface org.opends.server.types.operation.PluginOperation |
|---|
getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString |
| Constructor Detail |
|---|
public AddOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
ByteString rawEntryDN,
java.util.List<RawAttribute> rawAttributes)
clientConnection - The client connection with which this operation
is associated.operationID - The operation ID for this operation.messageID - The message ID of the request with which this
operation is associated.requestControls - The set of controls included in the request.rawEntryDN - The raw DN of the entry to add from the client
request. This may or may not be a valid DN.rawAttributes - The raw set of attributes from the client
request (including the objectclass attribute).
This may contain invalid attributes.
public AddOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
DN entryDN,
java.util.Map<ObjectClass,java.lang.String> objectClasses,
java.util.Map<AttributeType,java.util.List<Attribute>> userAttributes,
java.util.Map<AttributeType,java.util.List<Attribute>> operationalAttributes)
clientConnection - The client connection with which this
operation is associated.operationID - The operation ID for this operation.messageID - The message ID of the request with which
this operation is associated.requestControls - The set of controls included in the request.entryDN - The DN for the entry.objectClasses - The set of objectclasses for the entry.userAttributes - The set of user attributes for the entry.operationalAttributes - The set of operational attributes for the
entry.| Method Detail |
|---|
public final ByteString getRawEntryDN()
getRawEntryDN in interface AddOperationgetRawEntryDN in interface PostResponseAddOperationgetRawEntryDN in interface PreParseAddOperationpublic final void setRawEntryDN(ByteString rawEntryDN)
getEntryDN and setEntryDN
methods.
setRawEntryDN in interface AddOperationsetRawEntryDN in interface PreParseAddOperationrawEntryDN - The raw entry DN for the entry to add.public final DN getEntryDN()
getEntryDN in interface AddOperationgetEntryDN in interface PostResponseAddOperationnull if it has not yet
been parsed from the raw DN.public final java.util.List<RawAttribute> getRawAttributes()
getRawAttributes in interface AddOperationgetRawAttributes in interface PostResponseAddOperationgetRawAttributes in interface PreParseAddOperationpublic final void addRawAttribute(RawAttribute rawAttribute)
addRawAttribute in interface AddOperationaddRawAttribute in interface PreParseAddOperationrawAttribute - The attribute to add to the set of raw attributes for
this add operation.public final void setRawAttributes(java.util.List<RawAttribute> rawAttributes)
setRawAttributes in interface AddOperationsetRawAttributes in interface PreParseAddOperationrawAttributes - The set of raw attributes for this add operation.public final java.util.Map<ObjectClass,java.lang.String> getObjectClasses()
getObjectClasses in interface AddOperationgetObjectClasses in interface PostResponseAddOperationnull if that information is not yet available.
public final void addObjectClass(ObjectClass objectClass,
java.lang.String name)
addObjectClass in interface AddOperationobjectClass - The objectclass to add to the entry.name - The name to use for the objectclass.public final void removeObjectClass(ObjectClass objectClass)
removeObjectClass in interface AddOperationobjectClass - The objectclass to remove from the entry.public final java.util.Map<AttributeType,java.util.List<Attribute>> getUserAttributes()
getUserAttributes in interface AddOperationgetUserAttributes in interface PostResponseAddOperationnull if that information is not yet available.public final java.util.Map<AttributeType,java.util.List<Attribute>> getOperationalAttributes()
getOperationalAttributes in interface AddOperationgetOperationalAttributes in interface PostResponseAddOperationnull if that information is not yet available.
public final void setAttribute(AttributeType attributeType,
java.util.List<Attribute> attributeList)
setAttribute in interface AddOperationattributeType - The attribute type for the attribute.attributeList - The attribute list for the provided attribute type.public final void removeAttribute(AttributeType attributeType)
removeAttribute in interface AddOperationattributeType - The attribute tyep for the attribute to remove.public final long getChangeNumber()
getChangeNumber in interface AddOperationpublic final void setChangeNumber(long changeNumber)
setChangeNumber in interface AddOperationchangeNumber - The change number that has been assigned to this
operation by the synchronization mechanism.public final OperationType getOperationType()
getOperationType in interface OperationgetOperationType in interface PluginOperationgetOperationType in class AbstractOperation
public final void disconnectClient(DisconnectReason disconnectReason,
boolean sendNotification,
Message message)
disconnectClient in interface OperationdisconnectClient in interface PluginOperationdisconnectClient in class AbstractOperationdisconnectReason - The disconnect reason that provides the
generic cause for the disconnect.sendNotification - Indicates whether to try to provide
notification
to the client that the connection will
be closed.message - The message to send to the client. It
may be null if no notification
is to be sent.public final java.lang.String[][] getRequestLogElements()
null if there is no value for that
field.
getRequestLogElements in interface OperationgetRequestLogElements in class AbstractOperationpublic final java.lang.String[][] getResponseLogElements()
null if there is no value for that
field.
getResponseLogElements in interface OperationgetResponseLogElements in class AbstractOperationpublic DN getProxiedAuthorizationDN()
getProxiedAuthorizationDN in interface AddOperationnull if proxied
authorization has not been requested.public final java.util.ArrayList<Control> getResponseControls()
getResponseControls in interface OperationgetResponseControls in interface PluginOperationgetResponseControls in class AbstractOperationpublic final void addResponseControl(Control control)
addResponseControl in interface OperationaddResponseControl in interface PreParseOperationaddResponseControl in class AbstractOperationcontrol - The control to add to the set of controls to
include in the response to the client.public final void removeResponseControl(Control control)
removeResponseControl in interface OperationremoveResponseControl in interface PreParseOperationremoveResponseControl in class AbstractOperationcontrol - The control to remove from the set of controls
to include in the response to the client.public final CancelResult cancel(CancelRequest cancelRequest)
cancel in interface Operationcancel in class AbstractOperationcancelRequest - Information about the way in which the
operation should be canceled.
public final CancelRequest getCancelRequest()
getCancelRequest in interface OperationgetCancelRequest in interface PluginOperationgetCancelRequest in class AbstractOperationnull if there has not been any
request to cancel.public boolean setCancelRequest(CancelRequest cancelRequest)
setCancelRequest in interface OperationsetCancelRequest in class AbstractOperationcancelRequest - The cancel request to set for this
operation.
true if the cancel request was set, or
false if it was not for some reason (e.g., the
specified operation cannot be cancelled).public final void toString(java.lang.StringBuilder buffer)
toString in interface OperationtoString in interface PluginOperationtoString in class AbstractOperationbuffer - The buffer into which a string representation of
this operation should be appended.public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
setProxiedAuthorizationDN in interface AddOperationproxiedAuthorizationDN - 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()
run in interface java.lang.Runnablerun in class AbstractOperationpublic Entry getEntryToAdd()
getEntryToAdd in interface PostResponseAddOperation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||