| | |
| | | import org.opends.server.types.operation.PreParseOperation; |
| | | |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | | |
| | | |
| | |
| | | implements PreParseOperation, PreOperationOperation, |
| | | PostOperationOperation, PostResponseOperation, Runnable |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = "org.opends.server.core.Operation"; |
| | | |
| | | |
| | | |
| | |
| | | protected Operation(ClientConnection clientConnection, long operationID, |
| | | int messageID, List<Control> requestControls) |
| | | { |
| | | assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection), |
| | | String.valueOf(messageID), |
| | | String.valueOf(requestControls)); |
| | | |
| | | this.clientConnection = clientConnection; |
| | | this.operationID = operationID; |
| | |
| | | */ |
| | | public final ClientConnection getClientConnection() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getClientConnection"); |
| | | |
| | | return clientConnection; |
| | | } |
| | |
| | | */ |
| | | public final long getConnectionID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConnectionID"); |
| | | |
| | | return clientConnection.getConnectionID(); |
| | | } |
| | |
| | | */ |
| | | public final long getOperationID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOperationID"); |
| | | |
| | | return operationID; |
| | | } |
| | |
| | | */ |
| | | public final int getMessageID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMessageID"); |
| | | |
| | | return messageID; |
| | | } |
| | |
| | | */ |
| | | public final List<Control> getRequestControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRequestControls"); |
| | | |
| | | return requestControls; |
| | | } |
| | |
| | | */ |
| | | public final void addRequestControl(Control control) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addRequestControl", String.valueOf(control)); |
| | | |
| | | requestControls.add(control); |
| | | } |
| | |
| | | */ |
| | | public final void removeRequestControl(Control control) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "removeRequestControl", |
| | | String.valueOf(control)); |
| | | |
| | | requestControls.remove(control); |
| | | } |
| | |
| | | */ |
| | | public final ResultCode getResultCode() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getResultCode"); |
| | | |
| | | return resultCode; |
| | | } |
| | |
| | | */ |
| | | public final void setResultCode(ResultCode resultCode) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode)); |
| | | |
| | | this.resultCode = resultCode; |
| | | } |
| | |
| | | */ |
| | | public final StringBuilder getErrorMessage() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getErrorMessage"); |
| | | |
| | | return errorMessage; |
| | | } |
| | |
| | | */ |
| | | public final void setErrorMessage(StringBuilder errorMessage) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setErrorMessage", |
| | | String.valueOf(errorMessage)); |
| | | |
| | | if (errorMessage == null) |
| | | { |
| | |
| | | */ |
| | | public final void appendErrorMessage(String message) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "appendErrorMessage", |
| | | String.valueOf(message)); |
| | | |
| | | if (errorMessage == null) |
| | | { |
| | |
| | | */ |
| | | public final StringBuilder getAdditionalLogMessage() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAdditionalLogMessage"); |
| | | |
| | | return additionalLogMessage; |
| | | } |
| | |
| | | */ |
| | | public final void setAdditionalLogMessage(StringBuilder additionalLogMessage) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAdditionalLogMessage", |
| | | String.valueOf(additionalLogMessage)); |
| | | |
| | | if (additionalLogMessage == null) |
| | | { |
| | |
| | | */ |
| | | public final void appendAdditionalLogMessage(String message) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "appendAdditionalLogMessage", |
| | | String.valueOf(message)); |
| | | |
| | | if (additionalLogMessage == null) |
| | | { |
| | |
| | | */ |
| | | public final DN getMatchedDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchedDN"); |
| | | |
| | | return matchedDN; |
| | | } |
| | |
| | | */ |
| | | public final void setMatchedDN(DN matchedDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN)); |
| | | |
| | | this.matchedDN = matchedDN; |
| | | } |
| | |
| | | */ |
| | | public final List<String> getReferralURLs() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getReferralURLs"); |
| | | |
| | | return referralURLs; |
| | | } |
| | |
| | | */ |
| | | public final void setReferralURLs(List<String> referralURLs) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setReferralURLs", |
| | | String.valueOf(referralURLs)); |
| | | |
| | | this.referralURLs = referralURLs; |
| | | } |
| | |
| | | */ |
| | | public final void setResponseData(DirectoryException directoryException) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setResponseData"); |
| | | |
| | | this.resultCode = directoryException.getResultCode(); |
| | | this.matchedDN = directoryException.getMatchedDN(); |
| | |
| | | */ |
| | | public final boolean isInternalOperation() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isInternalOperation"); |
| | | |
| | | return isInternalOperation; |
| | | } |
| | |
| | | */ |
| | | public final void setInternalOperation(boolean isInternalOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setInternalOperation", |
| | | String.valueOf(isInternalOperation)); |
| | | |
| | | this.isInternalOperation = isInternalOperation; |
| | | } |
| | |
| | | */ |
| | | public final boolean isSynchronizationOperation() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isSynchronizationOperation"); |
| | | |
| | | return isSynchronizationOperation; |
| | | } |
| | |
| | | public final void setSynchronizationOperation( |
| | | boolean isSynchronizationOperation) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSynchronizationOperation", |
| | | String.valueOf(isSynchronizationOperation)); |
| | | |
| | | this.isSynchronizationOperation = isSynchronizationOperation; |
| | | } |
| | |
| | | */ |
| | | public final void setDontSynchronize(boolean dontSynchronize) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setDontSynchronize", |
| | | String.valueOf(dontSynchronize)); |
| | | |
| | | this.dontSynchronizeFlag = dontSynchronize; |
| | | } |
| | |
| | | */ |
| | | public final Entry getAuthorizationEntry() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthorizationEntry"); |
| | | |
| | | return authorizationEntry; |
| | | } |
| | |
| | | */ |
| | | public final void setAuthorizationEntry(Entry authorizationEntry) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAuthorizationEntry", |
| | | String.valueOf(authorizationEntry)); |
| | | |
| | | this.authorizationEntry = authorizationEntry; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final DN getAuthorizationDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthorizationDN"); |
| | | |
| | | if (authorizationEntry == null) |
| | | { |
| | |
| | | */ |
| | | public final Map<String,Object> getAttachments() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttachments"); |
| | | |
| | | return attachments; |
| | | } |
| | |
| | | */ |
| | | public final Object getAttachment(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttachment", String.valueOf(name)); |
| | | |
| | | return attachments.get(name); |
| | | } |
| | |
| | | */ |
| | | public final Object removeAttachment(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "removeAttachment", String.valueOf(name)); |
| | | |
| | | return attachments.remove(name); |
| | | } |
| | |
| | | */ |
| | | public final Object setAttachment(String name, Object value) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "putAttachment", String.valueOf(name), |
| | | String.valueOf(value)); |
| | | |
| | | return attachments.put(name, value); |
| | | } |
| | |
| | | */ |
| | | public final void operationCompleted() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "operationCompleted"); |
| | | |
| | | |
| | | // Notify the client connection that this operation is complete and that it |
| | |
| | | */ |
| | | public final CancelResult getCancelResult() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCancelResult"); |
| | | |
| | | return cancelResult; |
| | | } |
| | |
| | | */ |
| | | public final void setCancelResult(CancelResult cancelResult) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setCancelResult", |
| | | String.valueOf(cancelResult)); |
| | | |
| | | this.cancelResult = cancelResult; |
| | | } |
| | |
| | | */ |
| | | protected final void indicateCancelled(CancelRequest cancelRequest) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "indicateCancelled", |
| | | String.valueOf(cancelRequest)); |
| | | |
| | | setCancelResult(CancelResult.CANCELED); |
| | | |
| | |
| | | */ |
| | | public final String toString() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString"); |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | toString(buffer); |
| | |
| | | */ |
| | | public boolean dontSynchronize() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "dontSynchronize"); |
| | | |
| | | return dontSynchronizeFlag; |
| | | } |
| | | } |