mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
14.25.2015 d7d14231d2e1e44b0e6207b30083dc0a95aaef67
AbstractOperation.java:
Removed setResults(), used the more complete setResponseData() instead

*.java:
Called AbstractOperation.setResponseData().
Removed useless @inheritDoc javadocs.
Ran UCDetector
Grouped relevant fields together.
Cleaned up constructors.
4 files modified
279 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/core/AddOperationBasis.java 47 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/DeleteOperationBasis.java 31 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/SearchOperationBasis.java 60 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/types/AbstractOperation.java 141 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/AddOperationBasis.java
@@ -61,17 +61,12 @@
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The set of response controls to send to the client. */
  private ArrayList<Control> responseControls;
  private final ArrayList<Control> responseControls = new ArrayList<>();
  /**
   * The raw, unprocessed entry DN as provided in the request. This may or may
   * not be a valid DN.
   */
  /** The raw, unprocessed entry DN as provided in the request. This may or may not be a valid DN. */
  private ByteString rawEntryDN;
  /** The processed DN of the entry to add. */
  private DN entryDN;
  /** The proxied authorization target DN for this operation. */
  private DN proxiedAuthorizationDN;
@@ -81,13 +76,10 @@
   * attributes may be invalid.
   */
  private List<RawAttribute> rawAttributes;
  /** The set of operational attributes for the entry to add. */
  private Map<AttributeType,List<Attribute>> operationalAttributes;
  /** The set of user attributes for the entry to add. */
  private Map<AttributeType,List<Attribute>> userAttributes;
  /** The set of objectclasses for the entry to add. */
  private Map<ObjectClass,String> objectClasses;
@@ -119,13 +111,10 @@
    this.rawEntryDN    = rawEntryDN;
    this.rawAttributes = rawAttributes;
    responseControls      = new ArrayList<>();
    cancelRequest         = null;
    entryDN               = null;
    userAttributes        = null;
    operationalAttributes = null;
    objectClasses         = null;
    proxiedAuthorizationDN = null;
  }
@@ -166,10 +155,6 @@
    rawAttributes.add(new LDAPAttribute(ATTR_OBJECTCLASS, values));
    addAll(rawAttributes, userAttributes);
    addAll(rawAttributes, operationalAttributes);
    responseControls = new ArrayList<>();
    proxiedAuthorizationDN = null;
    cancelRequest    = null;
  }
  private void addAll(List<RawAttribute> rawAttributes, Map<AttributeType, List<Attribute>> attributesToAdd)
@@ -183,14 +168,12 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final ByteString getRawEntryDN()
  {
    return rawEntryDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void setRawEntryDN(ByteString rawEntryDN)
  {
@@ -199,7 +182,6 @@
    entryDN = null;
  }
  /** {@inheritDoc} */
  @Override
  public final DN getEntryDN()
  {
@@ -213,19 +195,17 @@
    catch (DirectoryException de)
    {
      logger.traceException(de);
      setResults(de);
      setResponseData(de);
    }
    return entryDN;
  }
  /** {@inheritDoc} */
  @Override
  public final List<RawAttribute> getRawAttributes()
  {
    return rawAttributes;
  }
  /** {@inheritDoc} */
  @Override
  public final void addRawAttribute(RawAttribute rawAttribute)
  {
@@ -236,7 +216,6 @@
    operationalAttributes = null;
  }
  /** {@inheritDoc} */
  @Override
  public final void setRawAttributes(List<RawAttribute> rawAttributes)
  {
@@ -247,7 +226,6 @@
    operationalAttributes = null;
  }
  /** {@inheritDoc} */
  @Override
  public final Map<ObjectClass,String> getObjectClasses()
  {
@@ -257,21 +235,18 @@
    return objectClasses;
  }
  /** {@inheritDoc} */
  @Override
  public final void addObjectClass(ObjectClass objectClass, String name)
  {
    objectClasses.put(objectClass, name);
  }
  /** {@inheritDoc} */
  @Override
  public final void removeObjectClass(ObjectClass objectClass)
  {
    objectClasses.remove(objectClass);
  }
  /** {@inheritDoc} */
  @Override
  public final Map<AttributeType,List<Attribute>> getUserAttributes()
  {
@@ -281,7 +256,6 @@
    return userAttributes;
  }
  /** {@inheritDoc} */
  @Override
  public final Map<AttributeType,List<Attribute>> getOperationalAttributes()
  {
@@ -413,7 +387,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final void setAttribute(AttributeType attributeType,
                                 List<Attribute> attributeList)
@@ -430,7 +403,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final void removeAttribute(AttributeType attributeType)
  {
@@ -446,7 +418,6 @@
    return userAttributes;
  }
  /** {@inheritDoc} */
  @Override
  public final OperationType getOperationType()
  {
@@ -456,35 +427,30 @@
    return OperationType.ADD;
  }
  /** {@inheritDoc} */
  @Override
  public DN getProxiedAuthorizationDN()
  {
    return proxiedAuthorizationDN;
  }
  /** {@inheritDoc} */
  @Override
  public final ArrayList<Control> getResponseControls()
  {
    return responseControls;
  }
  /** {@inheritDoc} */
  @Override
  public final void addResponseControl(Control control)
  {
    responseControls.add(control);
  }
  /** {@inheritDoc} */
  @Override
  public final void removeResponseControl(Control control)
  {
    responseControls.remove(control);
  }
  /** {@inheritDoc} */
  @Override
  public final void toString(StringBuilder buffer)
  {
@@ -497,14 +463,12 @@
    buffer.append(")");
  }
  /** {@inheritDoc} */
  @Override
  public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
  {
    this.proxiedAuthorizationDN = proxiedAuthorizationDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void run()
  {
@@ -619,7 +583,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public void updateOperationErrMsgAndResCode()
  {
@@ -640,8 +603,7 @@
        appendErrorMessage(ERR_ADD_CANNOT_ADD_ROOT_DSE.get());
        return;
      }
      // The entry doesn't have a parent but isn't a suffix.  This is not
      // allowed.
      // The entry doesn't have a parent but isn't a suffix. This is not allowed.
      setResultCode(ResultCode.NO_SUCH_OBJECT);
      appendErrorMessage(ERR_ADD_ENTRY_NOT_SUFFIX.get(entryDN));
      return;
@@ -662,5 +624,4 @@
  {
    return null;
  }
}
opendj-server-legacy/src/main/java/org/opends/server/core/DeleteOperationBasis.java
@@ -57,15 +57,12 @@
  /** The raw, unprocessed entry DN as included in the client request. */
  private ByteString rawEntryDN;
  /** The DN of the entry for the delete operation. */
  private DN entryDN;
  /** The proxied authorization target DN for this operation. */
  private DN proxiedAuthorizationDN;
  /** The set of response controls for this delete operation. */
  private List<Control> responseControls;
  private final List<Control> responseControls = new ArrayList<>();
  /**
   * Creates a new delete operation with the provided information.
@@ -86,12 +83,7 @@
  {
    super(clientConnection, operationID, messageID, requestControls);
    this.rawEntryDN = rawEntryDN;
    entryDN          = null;
    responseControls = new ArrayList<>();
    cancelRequest    = null;
  }
@@ -114,22 +106,16 @@
  {
    super(clientConnection, operationID, messageID, requestControls);
    this.entryDN = entryDN;
    rawEntryDN       = ByteString.valueOf(entryDN.toString());
    responseControls = new ArrayList<>();
    cancelRequest    = null;
  }
  /** {@inheritDoc} */
  @Override
  public final ByteString getRawEntryDN()
  {
    return rawEntryDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void setRawEntryDN(ByteString rawEntryDN)
  {
@@ -138,7 +124,6 @@
    entryDN = null;
  }
  /** {@inheritDoc} */
  @Override
  public final DN getEntryDN()
  {
@@ -152,13 +137,11 @@
    catch (DirectoryException de)
    {
      logger.traceException(de);
      setResults(de);
      setResponseData(de);
    }
    return entryDN;
  }
  /** {@inheritDoc} */
  @Override
  public final OperationType getOperationType()
  {
@@ -167,35 +150,30 @@
    return OperationType.DELETE;
  }
  /** {@inheritDoc} */
  @Override
  public DN getProxiedAuthorizationDN()
  {
    return proxiedAuthorizationDN;
  }
  /** {@inheritDoc} */
  @Override
  public final List<Control> getResponseControls()
  {
    return responseControls;
  }
  /** {@inheritDoc} */
  @Override
  public final void addResponseControl(Control control)
  {
    responseControls.add(control);
  }
  /** {@inheritDoc} */
  @Override
  public final void removeResponseControl(Control control)
  {
    responseControls.remove(control);
  }
  /** {@inheritDoc} */
  @Override
  public final void toString(StringBuilder buffer)
  {
@@ -208,14 +186,12 @@
    buffer.append(")");
  }
  /** {@inheritDoc} */
  @Override
  public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
  {
    this.proxiedAuthorizationDN = proxiedAuthorizationDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void run()
  {
@@ -327,7 +303,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public void updateOperationErrMsgAndResCode()
  {
@@ -335,7 +310,6 @@
    appendErrorMessage(ERR_DELETE_NO_SUCH_ENTRY.get(getEntryDN()));
  }
  /**
   * {@inheritDoc}
   *
@@ -345,5 +319,4 @@
  public Entry getEntryToDelete() {
    return null;
  }
}
opendj-server-legacy/src/main/java/org/opends/server/core/SearchOperationBasis.java
@@ -294,14 +294,12 @@
    return Math.min(timeLimit, clientConnection.getTimeLimit());
  }
  /** {@inheritDoc} */
  @Override
  public final ByteString getRawBaseDN()
  {
    return rawBaseDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void setRawBaseDN(ByteString rawBaseDN)
  {
@@ -310,7 +308,6 @@
    baseDN = null;
  }
  /** {@inheritDoc} */
  @Override
  public final DN getBaseDN()
  {
@@ -324,96 +321,83 @@
    catch (DirectoryException de)
    {
      logger.traceException(de);
      setResults(de);
      setResponseData(de);
    }
    return baseDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void setBaseDN(DN baseDN)
  {
    this.baseDN = baseDN;
  }
  /** {@inheritDoc} */
  @Override
  public final SearchScope getScope()
  {
    return scope;
  }
  /** {@inheritDoc} */
  @Override
  public final void setScope(SearchScope scope)
  {
    this.scope = scope;
  }
  /** {@inheritDoc} */
  @Override
  public final DereferenceAliasesPolicy getDerefPolicy()
  {
    return derefPolicy;
  }
  /** {@inheritDoc} */
  @Override
  public final void setDerefPolicy(DereferenceAliasesPolicy derefPolicy)
  {
    this.derefPolicy = derefPolicy;
  }
  /** {@inheritDoc} */
  @Override
  public final int getSizeLimit()
  {
    return sizeLimit;
  }
  /** {@inheritDoc} */
  @Override
  public final void setSizeLimit(int sizeLimit)
  {
    this.sizeLimit = sizeLimit;
  }
  /** {@inheritDoc} */
  @Override
  public final int getTimeLimit()
  {
    return timeLimit;
  }
  /** {@inheritDoc} */
  @Override
  public final void setTimeLimit(int timeLimit)
  {
    this.timeLimit = timeLimit;
  }
  /** {@inheritDoc} */
  @Override
  public final boolean getTypesOnly()
  {
    return typesOnly;
  }
  /** {@inheritDoc} */
  @Override
  public final void setTypesOnly(boolean typesOnly)
  {
    this.typesOnly = typesOnly;
  }
  /** {@inheritDoc} */
  @Override
  public final RawFilter getRawFilter()
  {
    return rawFilter;
  }
  /** {@inheritDoc} */
  @Override
  public final void setRawFilter(RawFilter rawFilter)
  {
@@ -422,7 +406,6 @@
    filter = null;
  }
  /** {@inheritDoc} */
  @Override
  public final SearchFilter getFilter()
  {
@@ -436,19 +419,17 @@
    catch (DirectoryException de)
    {
      logger.traceException(de);
      setResults(de);
      setResponseData(de);
    }
    return filter;
  }
  /** {@inheritDoc} */
  @Override
  public final Set<String> getAttributes()
  {
    return attributes;
  }
  /** {@inheritDoc} */
  @Override
  public final void setAttributes(Set<String> attributes)
  {
@@ -462,28 +443,24 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final int getEntriesSent()
  {
    return entriesSent;
  }
  /** {@inheritDoc} */
  @Override
  public final int getReferencesSent()
  {
    return referencesSent;
  }
  /** {@inheritDoc} */
  @Override
  public final boolean returnEntry(Entry entry, List<Control> controls)
  {
    return returnEntry(entry, controls, true);
  }
  /** {@inheritDoc} */
  @Override
  public final boolean returnEntry(Entry entry, List<Control> controls,
                                   boolean evaluateAci)
@@ -727,14 +704,12 @@
    return AccessControlConfigManager.getInstance().getAccessControlHandler();
  }
  /** {@inheritDoc} */
  @Override
  public final boolean returnReference(DN dn, SearchResultReference reference)
  {
    return returnReference(dn, reference, true);
  }
  /** {@inheritDoc} */
  @Override
  public final boolean returnReference(DN dn, SearchResultReference reference,
                                       boolean evaluateAci)
@@ -802,7 +777,6 @@
    return pluginResult.continueProcessing();
  }
  /** {@inheritDoc} */
  @Override
  public final void sendSearchResultDone()
  {
@@ -819,7 +793,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final OperationType getOperationType()
  {
@@ -828,35 +801,30 @@
    return OperationType.SEARCH;
  }
  /** {@inheritDoc} */
  @Override
  public DN getProxiedAuthorizationDN()
  {
    return proxiedAuthorizationDN;
  }
  /** {@inheritDoc} */
  @Override
  public final List<Control> getResponseControls()
  {
    return responseControls;
  }
  /** {@inheritDoc} */
  @Override
  public final void addResponseControl(Control control)
  {
    responseControls.add(control);
  }
  /** {@inheritDoc} */
  @Override
  public final void removeResponseControl(Control control)
  {
    responseControls.remove(control);
  }
  /** {@inheritDoc} */
  @Override
  public void abort(CancelRequest cancelRequest)
  {
@@ -866,7 +834,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final void toString(StringBuilder buffer)
  {
@@ -883,119 +850,102 @@
    buffer.append(")");
  }
  /** {@inheritDoc} */
  @Override
  public void setTimeLimitExpiration(long timeLimitExpiration)
  {
    this.timeLimitExpiration = timeLimitExpiration;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isReturnSubentriesOnly()
  {
    return returnSubentriesOnly;
  }
  /** {@inheritDoc} */
  @Override
  public void setReturnSubentriesOnly(boolean returnLDAPSubentries)
  {
    this.returnSubentriesOnly = returnLDAPSubentries;
  }
  /** {@inheritDoc} */
  @Override
  public MatchedValuesControl getMatchedValuesControl()
  {
    return matchedValuesControl;
  }
  /** {@inheritDoc} */
  @Override
  public void setMatchedValuesControl(MatchedValuesControl controls)
  {
    this.matchedValuesControl = controls;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isIncludeUsableControl()
  {
    return includeUsableControl;
  }
  /** {@inheritDoc} */
  @Override
  public void setIncludeUsableControl(boolean includeUsableControl)
  {
    this.includeUsableControl = includeUsableControl;
  }
  /** {@inheritDoc} */
  @Override
  public long getTimeLimitExpiration()
  {
    return timeLimitExpiration;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isClientAcceptsReferrals()
  {
    return clientAcceptsReferrals;
  }
  /** {@inheritDoc} */
  @Override
  public void setClientAcceptsReferrals(boolean clientAcceptReferrals)
  {
    this.clientAcceptsReferrals = clientAcceptReferrals;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isSendResponse()
  {
    return sendResponse;
  }
  /** {@inheritDoc} */
  @Override
  public void setSendResponse(boolean sendResponse)
  {
    this.sendResponse = sendResponse;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isRealAttributesOnly()
  {
    return this.realAttributesOnly;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isVirtualAttributesOnly()
  {
    return this.virtualAttributesOnly;
  }
  /** {@inheritDoc} */
  @Override
  public void setRealAttributesOnly(boolean realAttributesOnly)
  {
    this.realAttributesOnly = realAttributesOnly;
  }
  /** {@inheritDoc} */
  @Override
  public void setVirtualAttributesOnly(boolean virtualAttributesOnly)
  {
    this.virtualAttributesOnly = virtualAttributesOnly;
  }
  /** {@inheritDoc} */
  @Override
  public void sendSearchEntry(SearchResultEntry searchEntry)
      throws DirectoryException
@@ -1003,7 +953,6 @@
    getClientConnection().sendSearchEntry(this, searchEntry);
  }
  /** {@inheritDoc} */
  @Override
  public boolean sendSearchReference(SearchResultReference searchReference)
      throws DirectoryException
@@ -1011,14 +960,12 @@
    return getClientConnection().sendSearchReference(this, searchReference);
  }
  /** {@inheritDoc} */
  @Override
  public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
  {
    this.proxiedAuthorizationDN = proxiedAuthorizationDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void run()
  {
@@ -1122,7 +1069,6 @@
    getPluginConfigManager().invokePostResponseSearchPlugins(this);
  }
  /** {@inheritDoc} */
  @Override
  public void updateOperationErrMsgAndResCode()
  {
@@ -1130,8 +1076,6 @@
    appendErrorMessage(ERR_SEARCH_BASE_DOESNT_EXIST.get(getBaseDN()));
  }
  /**
   * Checks if the filter contains an equality element with the objectclass
   * attribute type and a value of "ldapSubentry" and if so sets
opendj-server-legacy/src/main/java/org/opends/server/types/AbstractOperation.java
@@ -66,27 +66,21 @@
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
   * The set of response controls that will always be returned for
   * an abandon operation.
   */
  /** The set of response controls that will always be returned for an abandon operation. */
  protected static final List<Control> NO_RESPONSE_CONTROLS = new ArrayList<>(0);
  /** The client connection with which this operation is associated. */
  protected final ClientConnection clientConnection;
  /** The message ID for this operation. */
  protected final int messageID;
  /** The operation ID for this operation. */
  protected final long operationID;
  /** Whether nanotime was used for this operation. */
  protected final boolean useNanoTime;
  private final boolean useNanoTime;
  /** The cancel request for this operation. */
  protected CancelRequest cancelRequest;
  /** The cancel result for this operation. */
  protected CancelResult cancelResult;
@@ -97,15 +91,9 @@
  private boolean isInternalOperation;
  private Boolean isInnerOperation;
  /**
   * Indicates whether this operation is involved in data synchronization
   * processing.
   */
  /** Indicates whether this operation is involved in data synchronization processing. */
  private boolean isSynchronizationOperation;
  /** The matched DN for this operation. */
  private DN matchedDN;
  /** The entry for the authorization identify for this operation. */
  private Entry authorizationEntry;
@@ -113,56 +101,46 @@
   * A set of attachments associated with this operation that might be used by
   * various components during its processing.
   */
  private Map<String,Object> attachments;
  private Map<String, Object> attachments = new HashMap<>();
  /** The set of controls included in the request from the client. */
  private List<Control> requestControls;
  /** The set of referral URLs for this operation. */
  private List<String> referralURLs;
  private final List<Control> requestControls;
  /** The result code for this operation. */
  private ResultCode resultCode;
  private ResultCode resultCode = ResultCode.UNDEFINED;
  /**
   * The error message for this operation that should be included in the log and in the response to
   * the client.
   */
  private LocalizableMessageBuilder errorMessage = new LocalizableMessageBuilder();
  /** The matched DN for this operation. */
  private DN matchedDN;
  /** The set of referral URLs for this operation. */
  private List<String> referralURLs;
  /**
   * The real, masked result code  for this operation that will not be included
   * in the response to the client, but will be logged.
   */
  private ResultCode maskedResultCode;
  /**
   * Additional information that should be included in the log but not sent to
   * the client.
   */
  private List<AdditionalLogItem> additionalLogItems;
  /**
   * The error message for this operation that should be included in the log and
   * in the response to the client.
   */
  private LocalizableMessageBuilder errorMessage;
  /**
   * The real, masked error message for this operation that will not be included
   * in the response to the client, but will be logged.
   */
  private LocalizableMessageBuilder maskedErrorMessage;
  /**
   * Indicates whether this operation needs to be synchronized to other copies
   * of the data.
   */
  /** Additional information that should be included in the log but not sent to the client. */
  private List<AdditionalLogItem> additionalLogItems;
  /** Indicates whether this operation needs to be synchronized to other copies of the data. */
  private boolean dontSynchronizeFlag;
  /** The time that processing started on this operation in milliseconds. */
  private long processingStartTime;
  /** The time that processing ended on this operation in milliseconds. */
  private long processingStopTime;
  /** The time that processing started on this operation in nanoseconds. */
  private long processingStartNanoTime;
  /** The time that processing ended on this operation in nanoseconds. */
  private long processingStopNanoTime;
@@ -199,22 +177,10 @@
      this.requestControls  = requestControls;
    }
    resultCode                 = ResultCode.UNDEFINED;
    additionalLogItems         = null;
    errorMessage               = new LocalizableMessageBuilder();
    attachments                = new HashMap<>();
    matchedDN                  = null;
    referralURLs               = null;
    cancelResult               = null;
    isInternalOperation        = false;
    isSynchronizationOperation = false;
    authorizationEntry         =
         clientConnection.getAuthenticationInfo().
          getAuthorizationEntry();
    authorizationEntry = clientConnection.getAuthenticationInfo().getAuthorizationEntry();
  }
  /** {@inheritDoc} */
  @Override
  public void disconnectClient(DisconnectReason disconnectReason,
                               boolean sendNotification,
@@ -223,42 +189,36 @@
    clientConnection.disconnect(disconnectReason, sendNotification, message);
  }
  /** {@inheritDoc} */
  @Override
  public final ClientConnection getClientConnection()
  {
    return clientConnection;
  }
  /** {@inheritDoc} */
  @Override
  public final long getConnectionID()
  {
    return clientConnection.getConnectionID();
  }
  /** {@inheritDoc} */
  @Override
  public final long getOperationID()
  {
    return operationID;
  }
  /** {@inheritDoc} */
  @Override
  public final int getMessageID()
  {
    return messageID;
  }
  /** {@inheritDoc} */
  @Override
  public final List<Control> getRequestControls()
  {
    return requestControls;
  }
  /** {@inheritDoc} */
  @Override
  @SuppressWarnings("unchecked")
  public final <T extends Control> T getRequestControl(
@@ -286,56 +246,48 @@
    return null;
  }
  /** {@inheritDoc} */
  @Override
  public final void addRequestControl(Control control)
  {
    requestControls.add(control);
  }
  /** {@inheritDoc} */
  @Override
  public final ResultCode getResultCode()
  {
    return resultCode;
  }
  /** {@inheritDoc} */
  @Override
  public final void setResultCode(ResultCode resultCode)
  {
    this.resultCode = resultCode;
  }
  /** {@inheritDoc} */
  @Override
  public final ResultCode getMaskedResultCode()
  {
    return maskedResultCode;
  }
  /** {@inheritDoc} */
  @Override
  public final void setMaskedResultCode(ResultCode maskedResultCode)
  {
    this.maskedResultCode = maskedResultCode;
  }
  /** {@inheritDoc} */
  @Override
  public final LocalizableMessageBuilder getErrorMessage()
  {
    return errorMessage;
  }
  /** {@inheritDoc} */
  @Override
  public final void setErrorMessage(LocalizableMessageBuilder errorMessage)
  {
    this.errorMessage = errorMessage;
  }
  /** {@inheritDoc} */
  @Override
  public final void appendErrorMessage(LocalizableMessage message)
  {
@@ -353,21 +305,18 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final LocalizableMessageBuilder getMaskedErrorMessage()
  {
    return maskedErrorMessage;
  }
  /** {@inheritDoc} */
  @Override
  public final void setMaskedErrorMessage(LocalizableMessageBuilder maskedErrorMessage)
  {
    this.maskedErrorMessage = maskedErrorMessage;
  }
  /** {@inheritDoc} */
  @Override
  public final void appendMaskedErrorMessage(LocalizableMessage maskedMessage)
  {
@@ -383,7 +332,6 @@
    maskedErrorMessage.append(maskedMessage);
  }
  /** {@inheritDoc} */
  @Override
  public List<AdditionalLogItem> getAdditionalLogItems()
  {
@@ -394,7 +342,6 @@
    return Collections.emptyList();
  }
  /** {@inheritDoc} */
  @Override
  public void addAdditionalLogItem(AdditionalLogItem item)
  {
@@ -406,35 +353,30 @@
    additionalLogItems.add(item);
  }
  /** {@inheritDoc} */
  @Override
  public final DN getMatchedDN()
  {
    return matchedDN;
  }
  /** {@inheritDoc} */
  @Override
  public final void setMatchedDN(DN matchedDN)
  {
    this.matchedDN = matchedDN;
  }
  /** {@inheritDoc} */
  @Override
  public final List<String> getReferralURLs()
  {
    return referralURLs;
  }
  /** {@inheritDoc} */
  @Override
  public final void setReferralURLs(List<String> referralURLs)
  {
    this.referralURLs = referralURLs;
  }
  /** {@inheritDoc} */
  @Override
  public final void setResponseData(
                         DirectoryException directoryException)
@@ -451,21 +393,18 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final boolean isInternalOperation()
  {
    return isInternalOperation;
  }
  /** {@inheritDoc} */
  @Override
  public final void setInternalOperation(boolean isInternalOperation)
  {
    this.isInternalOperation = isInternalOperation;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isInnerOperation()
  {
@@ -476,7 +415,6 @@
    return isInternalOperation();
  }
  /** {@inheritDoc} */
  @Override
  public void setInnerOperation(boolean isInnerOperation)
  {
@@ -484,14 +422,12 @@
  }
  /** {@inheritDoc} */
  @Override
  public final boolean isSynchronizationOperation()
  {
    return isSynchronizationOperation;
  }
  /** {@inheritDoc} */
  @Override
  public final void setSynchronizationOperation(
                         boolean isSynchronizationOperation)
@@ -499,35 +435,30 @@
    this.isSynchronizationOperation = isSynchronizationOperation;
  }
  /** {@inheritDoc} */
  @Override
  public boolean dontSynchronize()
  {
    return dontSynchronizeFlag;
  }
  /** {@inheritDoc} */
  @Override
  public final void setDontSynchronize(boolean dontSynchronize)
  {
    this.dontSynchronizeFlag = dontSynchronize;
  }
  /** {@inheritDoc} */
  @Override
  public final Entry getAuthorizationEntry()
  {
    return authorizationEntry;
  }
  /** {@inheritDoc} */
  @Override
  public final void setAuthorizationEntry(Entry authorizationEntry)
  {
    this.authorizationEntry = authorizationEntry;
  }
  /** {@inheritDoc} */
  @Override
  public final DN getAuthorizationDN()
  {
@@ -538,21 +469,18 @@
    return DN.rootDN();
  }
  /** {@inheritDoc} */
  @Override
  public final Map<String,Object> getAttachments()
  {
    return attachments;
  }
  /** {@inheritDoc} */
  @Override
  public final void setAttachments(Map<String, Object> attachments)
  {
    this.attachments = attachments;
  }
  /** {@inheritDoc} */
  @Override
  @SuppressWarnings("unchecked")
  public final <T> T getAttachment(String name)
@@ -560,7 +488,6 @@
    return (T) attachments.get(name);
  }
  /** {@inheritDoc} */
  @Override
  @SuppressWarnings("unchecked")
  public final <T> T removeAttachment(String name)
@@ -568,7 +495,6 @@
    return (T) attachments.remove(name);
  }
  /** {@inheritDoc} */
  @Override
  @SuppressWarnings("unchecked")
  public final <T> T setAttachment(String name, Object value)
@@ -576,7 +502,6 @@
    return (T) attachments.put(name, value);
  }
  /** {@inheritDoc} */
  @Override
  public final void operationCompleted()
  {
@@ -585,7 +510,6 @@
    clientConnection.removeOperationInProgress(messageID);
  }
  /** {@inheritDoc} */
  @Override
  public CancelResult cancel(CancelRequest cancelRequest)
  {
@@ -616,7 +540,6 @@
    return cancelResult;
  }
  /** {@inheritDoc} */
  @Override
  public synchronized void abort(CancelRequest cancelRequest)
  {
@@ -626,7 +549,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final synchronized void checkIfCanceled(boolean signalTooLate)
      throws CanceledOperationException
@@ -642,21 +564,18 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final CancelRequest getCancelRequest()
  {
    return cancelRequest;
  }
  /** {@inheritDoc} */
  @Override
  public final CancelResult getCancelResult()
  {
    return cancelResult;
  }
  /** {@inheritDoc} */
  @Override
  public final String toString()
  {
@@ -665,7 +584,6 @@
    return buffer.toString();
  }
  /** {@inheritDoc} */
  @Override
  public final long getProcessingStartTime()
  {
@@ -684,7 +602,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final long getProcessingStopTime()
  {
@@ -705,14 +622,12 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public final long getProcessingTime()
  {
    return processingStopTime - processingStartTime;
  }
  /** {@inheritDoc} */
  @Override
  public final long getProcessingNanoTime()
  {
@@ -723,7 +638,6 @@
    return -1;
  }
  /** {@inheritDoc} */
  @Override
  public final void registerPostResponseCallback(Runnable callback)
  {
@@ -734,14 +648,12 @@
    postResponseCallbacks.add(callback);
  }
  /** {@inheritDoc} */
  @Override
  public final int hashCode()
  {
    return clientConnection.hashCode() * (int) operationID;
  }
  /** {@inheritDoc} */
  @Override
  public final boolean equals(Object obj)
  {
@@ -824,17 +736,4 @@
    }
    return true;
  }
  /**
   * Sets the results from the provided directory exception on the current operation.
   *
   * @param de the directory exception
   */
  public void setResults(DirectoryException de)
  {
    setResultCode(de.getResultCode());
    appendErrorMessage(de.getMessageObject());
    setMatchedDN(de.getMatchedDN());
    setReferralURLs(de.getReferralURLs());
  }
}