From f2160f4bd1c8ac67e5a86a6710d431e8932877f9 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 28 May 2010 11:47:51 +0000
Subject: [PATCH] Synchronize SDK on java.net with internal repository.

---
 sdk/src/org/opends/sdk/requests/AbstractUnmodifiableRequestImpl.java |   66 ++++++++++-----------------------
 1 files changed, 20 insertions(+), 46 deletions(-)

diff --git a/sdk/src/org/opends/sdk/requests/AbstractUnmodifiableRequestImpl.java b/sdk/src/org/opends/sdk/requests/AbstractUnmodifiableRequestImpl.java
index b63783b..a3ecd70 100644
--- a/sdk/src/org/opends/sdk/requests/AbstractUnmodifiableRequestImpl.java
+++ b/sdk/src/org/opends/sdk/requests/AbstractUnmodifiableRequestImpl.java
@@ -29,20 +29,24 @@
 
 
 
-import org.opends.sdk.controls.Control;
+import java.util.Collections;
+import java.util.List;
 
-import com.sun.opends.sdk.util.Iterables;
+import org.opends.sdk.DecodeException;
+import org.opends.sdk.DecodeOptions;
+import org.opends.sdk.controls.Control;
+import org.opends.sdk.controls.ControlDecoder;
 
 
 
 /**
  * Unmodifiable request implementation.
- * 
+ *
  * @param <R>
  *          The type of request.
  */
-abstract class AbstractUnmodifiableRequestImpl<R extends Request>
-    implements Request
+abstract class AbstractUnmodifiableRequestImpl<R extends Request> implements
+    Request
 {
 
   private final R impl;
@@ -51,12 +55,11 @@
 
   /**
    * Creates a new unmodifiable request implementation.
-   * 
+   *
    * @param impl
-   *          The underlying request implementation to be made
-   *          unmodifiable.
+   *          The underlying request implementation to be made unmodifiable.
    */
-  AbstractUnmodifiableRequestImpl(R impl)
+  AbstractUnmodifiableRequestImpl(final R impl)
   {
     this.impl = impl;
   }
@@ -66,7 +69,7 @@
   /**
    * {@inheritDoc}
    */
-  public final R addControl(Control control)
+  public final R addControl(final Control control)
       throws UnsupportedOperationException, NullPointerException
   {
     throw new UnsupportedOperationException();
@@ -77,21 +80,12 @@
   /**
    * {@inheritDoc}
    */
-  public final R clearControls() throws UnsupportedOperationException
-  {
-    throw new UnsupportedOperationException();
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public final Control getControl(String oid)
-      throws NullPointerException
+  public final <C extends Control> C getControl(
+      final ControlDecoder<C> decoder, final DecodeOptions options)
+      throws NullPointerException, DecodeException
   {
     // FIXME: ensure that controls are immutable.
-    return impl.getControl(oid);
+    return impl.getControl(decoder, options);
   }
 
 
@@ -99,10 +93,10 @@
   /**
    * {@inheritDoc}
    */
-  public final Iterable<Control> getControls()
+  public final List<Control> getControls()
   {
     // FIXME: ensure that controls are immutable.
-    return Iterables.unmodifiable(impl.getControls());
+    return Collections.unmodifiableList(impl.getControls());
   }
 
 
@@ -110,27 +104,7 @@
   /**
    * {@inheritDoc}
    */
-  public final boolean hasControls()
-  {
-    return impl.hasControls();
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public final Control removeControl(String oid)
-      throws UnsupportedOperationException, NullPointerException
-  {
-    throw new UnsupportedOperationException();
-  }
-
-
-
-  /**
-   * {@inheritDoc}
-   */
+  @Override
   public final String toString()
   {
     return impl.toString();

--
Gitblit v1.10.0