portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [3/5] portals-pluto git commit: Added additional wrapper classes as requested by Jira issue PORTLETSPEC3-62
Date Mon, 25 Jan 2016 12:30:30 GMT
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
index 11cf811..824bde8 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
@@ -49,18 +49,7 @@ import javax.servlet.http.Cookie;
  * @since 2.0
  * @see PortletRequest
  */
-public class PortletRequestWrapper implements PortletRequest {
-
-   PortletRequest request;
-
-   /** 
-    * Require having a request for constructing
-    * the wrapper
-    */
-   
-   @SuppressWarnings("unused")
-   private PortletRequestWrapper() {
-   }
+public class PortletRequestWrapper extends PortletStateWrapper implements PortletRequest {
 
 
    /**
@@ -71,10 +60,26 @@ public class PortletRequestWrapper implements PortletRequest {
     * @throws java.lang.IllegalArgumentException if the request is <code>null</code>
     */
    public PortletRequestWrapper(PortletRequest request) {
-      if ( request == null)
-         throw new java.lang.IllegalArgumentException("Request is null");
+      super(request);
+   }
 
-      this.request = request;
+   /**
+    * Return the wrapped request object.
+    * 
+    * @return the wrapped request
+    */
+   public PortletRequest getRequest() {
+      return (PortletRequest) super.getWrapped();
+   }
+
+   /**
+    * Sets the request object being wrapped.
+    * 
+    * @param request the request to set
+    * @throws java.lang.IllegalArgumentException   if the request is null.
+    */
+   public void setRequest(PortletRequest request) {
+      super.setWrapped(request);
    }
 
    /**
@@ -82,7 +87,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getAttribute(String name)</code> on the wrapped request object.
     */
    public Object getAttribute(String name) {
-      return request.getAttribute(name);
+      return ((PortletRequest)wrapped).getAttribute(name);
    }
 
    /**
@@ -90,7 +95,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getAttributeNames()</code> on the wrapped request object.
     */
    public Enumeration<String> getAttributeNames() {
-      return request.getAttributeNames();
+      return ((PortletRequest)wrapped).getAttributeNames();
    }
 
    /**
@@ -98,7 +103,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getAuthType()</code> on the wrapped request object.
     */
    public String getAuthType() {
-      return request.getAuthType();
+      return ((PortletRequest)wrapped).getAuthType();
    }
 
    /**
@@ -106,7 +111,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getContextPath()</code> on the wrapped request object.
     */
    public String getContextPath() {
-      return request.getContextPath();
+      return ((PortletRequest)wrapped).getContextPath();
    }
 
    /**
@@ -114,7 +119,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getLocale()</code> on the wrapped request object.
     */
    public Locale getLocale() {
-      return request.getLocale();
+      return ((PortletRequest)wrapped).getLocale();
    }
 
    /**
@@ -122,7 +127,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getLocales()</code> on the wrapped request object.
     */
    public Enumeration<Locale> getLocales() {
-      return request.getLocales();
+      return ((PortletRequest)wrapped).getLocales();
    }
 
    /**
@@ -132,7 +137,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * </div>
     */
    public RenderParameters getRenderParameters() {
-      return request.getRenderParameters();
+      return ((PortletRequest)wrapped).getRenderParameters();
    }
 
    /**
@@ -141,7 +146,7 @@ public class PortletRequestWrapper implements PortletRequest {
     */
    @Deprecated
    public String getParameter(String name) {
-      return request.getParameter(name);
+      return ((PortletRequest)wrapped).getParameter(name);
    }
 
    /**
@@ -150,7 +155,7 @@ public class PortletRequestWrapper implements PortletRequest {
     */
    @Deprecated
    public Map<String, String[]> getParameterMap() {
-      return request.getParameterMap();
+      return ((PortletRequest)wrapped).getParameterMap();
    }
 
    /**
@@ -159,7 +164,7 @@ public class PortletRequestWrapper implements PortletRequest {
     */
    @Deprecated
    public Enumeration<String> getParameterNames() {
-      return request.getParameterNames();
+      return ((PortletRequest)wrapped).getParameterNames();
    }
 
    /**
@@ -168,7 +173,7 @@ public class PortletRequestWrapper implements PortletRequest {
     */
    @Deprecated
    public String[] getParameterValues(String name) {
-      return request.getParameterValues(name);
+      return ((PortletRequest)wrapped).getParameterValues(name);
    }
 
    /**
@@ -176,7 +181,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getPortalContext()</code> on the wrapped request object.
     */
    public PortalContext getPortalContext() {
-      return request.getPortalContext();
+      return ((PortletRequest)wrapped).getPortalContext();
    }
 
    /**
@@ -184,7 +189,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getPortletMode()</code> on the wrapped request object.
     */
    public PortletMode getPortletMode() {
-      return request.getPortletMode();
+      return ((PortletRequest)wrapped).getPortletMode();
    }
 
    /**
@@ -192,7 +197,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getPortletSession()</code> on the wrapped request object.
     */
    public PortletSession getPortletSession() {
-      return request.getPortletSession();
+      return ((PortletRequest)wrapped).getPortletSession();
    }
 
    /**
@@ -200,7 +205,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getPortletSession(create)</code> on the wrapped request object.
     */
    public PortletSession getPortletSession(boolean create) {
-      return request.getPortletSession(create);
+      return ((PortletRequest)wrapped).getPortletSession(create);
    }
 
    /**
@@ -208,7 +213,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getPreferences()</code> on the wrapped request object.
     */
    public PortletPreferences getPreferences() {
-      return request.getPreferences();
+      return ((PortletRequest)wrapped).getPreferences();
    }
 
    /**
@@ -216,7 +221,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getProperteis(name)</code> on the wrapped request object.
     */
    public Enumeration<String> getProperties(String name) {
-      return request.getProperties(name);
+      return ((PortletRequest)wrapped).getProperties(name);
    }
 
    /**
@@ -224,7 +229,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getProperty(name)</code> on the wrapped request object.
     */
    public String getProperty(String name) {
-      return request.getProperty(name);
+      return ((PortletRequest)wrapped).getProperty(name);
    }
 
    /**
@@ -232,7 +237,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getPropertyNames()</code> on the wrapped request object.
     */
    public Enumeration<String> getPropertyNames() {
-      return request.getPropertyNames();
+      return ((PortletRequest)wrapped).getPropertyNames();
    }
 
    /**
@@ -240,7 +245,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getRemoteUser()</code> on the wrapped request object.
     */
    public String getRemoteUser() {
-      return request.getRemoteUser();
+      return ((PortletRequest)wrapped).getRemoteUser();
    }
 
    /**
@@ -248,7 +253,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getRequestedSessionId()</code> on the wrapped request object.
     */
    public String getRequestedSessionId() {
-      return request.getRequestedSessionId();
+      return ((PortletRequest)wrapped).getRequestedSessionId();
    }
 
    /**
@@ -256,7 +261,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getResponseContentType()</code> on the wrapped request object.
     */
    public String getResponseContentType() {
-      return request.getResponseContentType();
+      return ((PortletRequest)wrapped).getResponseContentType();
    }
 
    /**
@@ -264,7 +269,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getResponseContentTypes()</code> on the wrapped request object.
     */
    public Enumeration<String> getResponseContentTypes() {
-      return request.getResponseContentTypes();
+      return ((PortletRequest)wrapped).getResponseContentTypes();
    }
 
    /**
@@ -272,7 +277,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getScheme()</code> on the wrapped request object.
     */
    public String getScheme() {
-      return request.getScheme();
+      return ((PortletRequest)wrapped).getScheme();
    }
 
    /**
@@ -280,7 +285,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getServerName()</code> on the wrapped request object.
     */
    public String getServerName() {
-      return request.getServerName();
+      return ((PortletRequest)wrapped).getServerName();
    }
 
    /**
@@ -288,7 +293,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getServerPort()</code> on the wrapped request object.
     */
    public int getServerPort() {
-      return request.getServerPort();
+      return ((PortletRequest)wrapped).getServerPort();
    }
 
    /**
@@ -296,7 +301,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getUserPrincipal()</code> on the wrapped request object.
     */
    public Principal getUserPrincipal() {
-      return request.getUserPrincipal();
+      return ((PortletRequest)wrapped).getUserPrincipal();
    }
 
    /**
@@ -304,7 +309,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getWindowId()</code> on the wrapped request object.
     */
    public String getWindowID() {
-      return request.getWindowID();
+      return ((PortletRequest)wrapped).getWindowID();
    }
 
    /**
@@ -312,7 +317,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getWindowState()</code> on the wrapped request object.
     */
    public WindowState getWindowState() {
-      return request.getWindowState();
+      return ((PortletRequest)wrapped).getWindowState();
    }
 
    /**
@@ -320,7 +325,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>isPortletModeAllowed(mode)</code> on the wrapped request object.
     */
    public boolean isPortletModeAllowed(PortletMode mode) {
-      return request.isPortletModeAllowed(mode);
+      return ((PortletRequest)wrapped).isPortletModeAllowed(mode);
    }
 
    /**
@@ -328,7 +333,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>isRequestedSessionIdValid()</code> on the wrapped request object.
     */
    public boolean isRequestedSessionIdValid() {
-      return request.isRequestedSessionIdValid();
+      return ((PortletRequest)wrapped).isRequestedSessionIdValid();
    }
 
    /**
@@ -336,7 +341,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>isSecure()</code> on the wrapped request object.
     */
    public boolean isSecure() {
-      return request.isSecure();
+      return ((PortletRequest)wrapped).isSecure();
    }
 
    /**
@@ -344,7 +349,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>isUserInRole(role)</code> on the wrapped request object.
     */
    public boolean isUserInRole(String role) {
-      return request.isUserInRole(role);
+      return ((PortletRequest)wrapped).isUserInRole(role);
    }
 
    /**
@@ -352,7 +357,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>isWindowStateAllowed(state)</code> on the wrapped request object.
     */
    public boolean isWindowStateAllowed(WindowState state) {
-      return request.isWindowStateAllowed(state);
+      return ((PortletRequest)wrapped).isWindowStateAllowed(state);
    }
 
    /**
@@ -360,7 +365,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>removeAttribute(name)</code> on the wrapped request object.
     */
    public void removeAttribute(String name) {
-      request.removeAttribute(name);
+      ((PortletRequest)wrapped).removeAttribute(name);
    }
 
    /**
@@ -368,29 +373,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>setAttribute(name, o)</code> on the wrapped request object.
     */
    public void setAttribute(String name, Object o) {
-      request.setAttribute(name, o);
-   }
-
-   /**
-    * Return the wrapped request object.
-    * 
-    * @return the wrapped request
-    */
-   public PortletRequest getRequest() {
-      return request;
-   }
-
-   /**
-    * Sets the request object being wrapped.
-    * 
-    * @param request the request to set
-    * @throws java.lang.IllegalArgumentException   if the request is null.
-    */
-   public void setRequest(PortletRequest request) {
-      if ( request == null)
-         throw new java.lang.IllegalArgumentException("Request is null");
-
-      this.request = request;
+      ((PortletRequest)wrapped).setAttribute(name, o);
    }
 
    /**
@@ -398,7 +381,7 @@ public class PortletRequestWrapper implements PortletRequest {
     * <code>getCookies()</code> on the wrapped request object.
     */
    public Cookie[] getCookies() {
-      return request.getCookies();
+      return ((PortletRequest)wrapped).getCookies();
    }
 
    /**
@@ -407,7 +390,7 @@ public class PortletRequestWrapper implements PortletRequest {
     */
    @Deprecated 
    public Map<String, String[]> getPrivateParameterMap() {
-      return request.getPrivateParameterMap();
+      return ((PortletRequest)wrapped).getPrivateParameterMap();
    }
 
    /**
@@ -416,7 +399,7 @@ public class PortletRequestWrapper implements PortletRequest {
     */
    @Deprecated
    public Map<String, String[]> getPublicParameterMap() {
-      return request.getPublicParameterMap();
+      return ((PortletRequest)wrapped).getPublicParameterMap();
    }
 
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/PortletSessionWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/PortletSessionWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/PortletSessionWrapper.java
new file mode 100644
index 0000000..d76e851
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/filter/PortletSessionWrapper.java
@@ -0,0 +1,223 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package javax.portlet.filter;
+
+import java.util.Enumeration;
+import java.util.Map;
+
+import javax.portlet.PortletContext;
+import javax.portlet.PortletSession;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <code>PortletSessionWrapper</code> provides a convenient 
+ * implementation of the <code>PortletSession</code> interface 
+ * that can be subclassed by developers wishing to adapt the request.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ * </div>
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class PortletSessionWrapper implements PortletSession {
+   
+   protected PortletSession wrapped;
+   
+   /**
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the PortletSession is null.
+    */
+   public PortletSessionWrapper(PortletSession wrapped) {
+      if (wrapped == null) {
+         throw new java.lang.IllegalArgumentException("Object to wrap is null");
+      }
+      this.wrapped = wrapped;
+   }
+   
+
+   /**
+    * Gets the wrapped object.
+    * 
+    * @return the wrapped object.
+    */
+   public PortletSession getWrapped() {
+      return wrapped;
+   }
+
+
+   /**
+    * Sets the wrapped object.
+    * 
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the PortletSession is null.
+    */
+   public void setWrapped(PortletSession wrapped) {
+      if (wrapped == null) {
+         throw new java.lang.IllegalArgumentException("Object to wrap is null");
+      }
+     this.wrapped = wrapped;
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getAttribute(java.lang.String)
+    */
+   @Override
+   public Object getAttribute(String name) {
+      return wrapped.getAttribute(name);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getAttribute(java.lang.String, int)
+    */
+   @Override
+   public Object getAttribute(String name, int scope) {
+      return wrapped.getAttribute(name, scope);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getAttributeNames()
+    */
+   @Override
+   public Enumeration<String> getAttributeNames() {
+      return wrapped.getAttributeNames();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getAttributeNames(int)
+    */
+   @Override
+   public Enumeration<String> getAttributeNames(int scope) {
+      return wrapped.getAttributeNames(scope);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getCreationTime()
+    */
+   @Override
+   public long getCreationTime() {
+      return wrapped.getCreationTime();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getId()
+    */
+   @Override
+   public String getId() {
+      return wrapped.getId();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getLastAccessedTime()
+    */
+   @Override
+   public long getLastAccessedTime() {
+      return wrapped.getLastAccessedTime();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getMaxInactiveInterval()
+    */
+   @Override
+   public int getMaxInactiveInterval() {
+      return wrapped.getMaxInactiveInterval();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#invalidate()
+    */
+   @Override
+   public void invalidate() {
+      wrapped.invalidate();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#isNew()
+    */
+   @Override
+   public boolean isNew() {
+      return wrapped.isNew();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#removeAttribute(java.lang.String)
+    */
+   @Override
+   public void removeAttribute(String name) {
+      wrapped.removeAttribute(name);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#removeAttribute(java.lang.String, int)
+    */
+   @Override
+   public void removeAttribute(String name, int scope) {
+      wrapped.removeAttribute(name, scope);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#setAttribute(java.lang.String, java.lang.Object)
+    */
+   @Override
+   public void setAttribute(String name, Object value) {
+      wrapped.setAttribute(name, value);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#setAttribute(java.lang.String, java.lang.Object, int)
+    */
+   @Override
+   public void setAttribute(String name, Object value, int scope) {
+      wrapped.setAttribute(name, value, scope);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#setMaxInactiveInterval(int)
+    */
+   @Override
+   public void setMaxInactiveInterval(int interval) {
+      wrapped.setMaxInactiveInterval(interval);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getPortletContext()
+    */
+   @Override
+   public PortletContext getPortletContext() {
+      return wrapped.getPortletContext();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getAttributeMap()
+    */
+   @Override
+   public Map<String, Object> getAttributeMap() {
+      return wrapped.getAttributeMap();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletSession#getAttributeMap(int)
+    */
+   @Override
+   public Map<String, Object> getAttributeMap(int scope) {
+      return wrapped.getAttributeMap(scope);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/PortletStateWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/PortletStateWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/PortletStateWrapper.java
new file mode 100644
index 0000000..aa69794
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/filter/PortletStateWrapper.java
@@ -0,0 +1,102 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package javax.portlet.filter;
+
+import javax.portlet.PortletMode;
+import javax.portlet.PortletState;
+import javax.portlet.RenderParameters;
+import javax.portlet.WindowState;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <code>PortletStateWrapper</code> provides a convenient 
+ * implementation of the <code>PortletState</code> interface 
+ * that can be subclassed by developers wishing to adapt the request.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ * </div>
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class PortletStateWrapper implements PortletState {
+   
+   protected PortletState wrapped;
+   
+   /**
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the PortletState is null.
+    */
+   public PortletStateWrapper(PortletState wrapped) {
+      if (wrapped == null) {
+         throw new java.lang.IllegalArgumentException("Object to wrap is null");
+      }
+      this.wrapped = wrapped;
+   }
+   
+
+   /**
+    * Gets the wrapped object.
+    * 
+    * @return the wrapped object.
+    */
+   public PortletState getWrapped() {
+      return wrapped;
+   }
+
+
+   /**
+    * Sets the wrapped object.
+    * 
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the PortletState is null.
+    */
+   public void setWrapped(PortletState wrapped) {
+      if (wrapped == null) {
+         throw new java.lang.IllegalArgumentException("Object to wrap is null");
+      }
+     this.wrapped = wrapped;
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletState#getRenderParameters()
+    */
+   @Override
+   public RenderParameters getRenderParameters() {
+      return wrapped.getRenderParameters();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletState#getPortletMode()
+    */
+   @Override
+   public PortletMode getPortletMode() {
+      return wrapped.getPortletMode();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletState#getWindowState()
+    */
+   @Override
+   public WindowState getWindowState() {
+      return wrapped.getWindowState();
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/PortletURLWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/PortletURLWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/PortletURLWrapper.java
new file mode 100644
index 0000000..56ae896
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/filter/PortletURLWrapper.java
@@ -0,0 +1,114 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package javax.portlet.filter;
+
+import javax.portlet.MutableRenderParameters;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletModeException;
+import javax.portlet.PortletURL;
+import javax.portlet.WindowState;
+import javax.portlet.WindowStateException;
+import javax.portlet.annotations.PortletSerializable;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <code>PortletURLWrapper</code> provides a convenient 
+ * implementation of the <code>PortletURL</code> interface 
+ * that can be subclassed by developers wishing to adapt the request.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ * </div>
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class PortletURLWrapper extends BaseURLWrapper implements PortletURL {
+   
+   /**
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the PortletURL is null.
+    */
+   public PortletURLWrapper(PortletURL wrapped) {
+      super(wrapped);
+   }
+   
+
+   /**
+    * Gets the wrapped object.
+    * 
+    * @return the wrapped object.
+    */
+   public PortletURL getWrapped() {
+      return (PortletURL) wrapped;
+   }
+
+
+   /**
+    * Sets the wrapped object.
+    * 
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the PortletURL is null.
+    */
+   public void setWrapped(PortletURL wrapped) {
+      super.setWrapped(wrapped);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.MutablePortletState#getRenderParameters()
+    */
+   @Override
+   public MutableRenderParameters getRenderParameters() {
+      return ((PortletURL)wrapped).getRenderParameters();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.MutablePortletState#setWindowState(javax.portlet.WindowState)
+    */
+   @Override
+   public void setWindowState(WindowState windowState) throws WindowStateException {
+      ((PortletURL)wrapped).setWindowState(windowState);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.MutablePortletState#setPortletMode(javax.portlet.PortletMode)
+    */
+   @Override
+   public void setPortletMode(PortletMode portletMode) throws PortletModeException {
+      ((PortletURL)wrapped).setPortletMode(portletMode);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletURL#removePublicRenderParameter(java.lang.String)
+    */
+   @Deprecated
+   @Override
+   public void removePublicRenderParameter(String name) {
+      ((PortletURL)wrapped).removePublicRenderParameter(name);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletURL#setBeanParameter(javax.portlet.annotations.PortletSerializable)
+    */
+   @Override
+   public void setBeanParameter(PortletSerializable bean) {
+      ((PortletURL)wrapped).setBeanParameter(bean);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/RenderParametersWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/RenderParametersWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/RenderParametersWrapper.java
new file mode 100644
index 0000000..bbc566c
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/filter/RenderParametersWrapper.java
@@ -0,0 +1,84 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package javax.portlet.filter;
+
+import javax.portlet.MutableRenderParameters;
+import javax.portlet.RenderParameters;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <code>RenderParametersWrapper</code> provides a convenient 
+ * implementation of the <code>RenderParameters</code> interface 
+ * that can be subclassed by developers wishing to adapt the request.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ * </div>
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class RenderParametersWrapper extends PortletParametersWrapper implements RenderParameters {
+   
+   /**
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the RenderParameters is null.
+    */
+   public RenderParametersWrapper(RenderParameters wrapped) {
+      super(wrapped);
+   }
+   
+
+   /**
+    * Gets the wrapped object.
+    * 
+    * @return the wrapped object.
+    */
+   public RenderParameters getWrapped() {
+      return (RenderParameters) wrapped;
+   }
+
+
+   /**
+    * Sets the wrapped object.
+    * 
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the RenderParameters is null.
+    */
+   public void setWrapped(RenderParameters wrapped) {
+      super.setWrapped(wrapped);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.RenderParameters#clone()
+    */
+   @Override
+   public MutableRenderParameters clone() {
+      return ((RenderParameters)wrapped).clone();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.RenderParameters#isPublic(java.lang.String)
+    */
+   @Override
+   public boolean isPublic(String name) {
+      return ((RenderParameters)wrapped).isPublic(name);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/RenderRequestWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
index 2506285..19c5051 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
@@ -39,8 +39,6 @@ import javax.portlet.RenderRequest;
  */
 public class RenderRequestWrapper extends PortletRequestWrapper implements RenderRequest {
 
-   RenderRequest request;
-
    /**
     * Creates an <code>RenderRequest</code> adaptor 
     * wrapping the given request object.
@@ -50,7 +48,6 @@ public class RenderRequestWrapper extends PortletRequestWrapper implements Rende
     */
    public RenderRequestWrapper(RenderRequest request) {
       super(request);
-      this.request = request;
    }
 
 
@@ -61,7 +58,7 @@ public class RenderRequestWrapper extends PortletRequestWrapper implements Rende
     * @return the wrapped request
     */
    public RenderRequest getRequest() {
-      return request;
+      return (RenderRequest) super.getRequest();
    }
 
    /**
@@ -71,11 +68,7 @@ public class RenderRequestWrapper extends PortletRequestWrapper implements Rende
     * @throws java.lang.IllegalArgumentException   if the request is null.
     */
    public void setRequest(RenderRequest request) {
-      if ( request == null) {
-         throw new java.lang.IllegalArgumentException("Request is null");
-      }
       super.setRequest(request);
-      this.request = request;
    }
 
    /**
@@ -83,7 +76,7 @@ public class RenderRequestWrapper extends PortletRequestWrapper implements Rende
     * <code>getETag()</code> on the wrapped request object.
     */
    public String getETag() {
-      return request.getETag();
+      return ((RenderRequest)wrapped).getETag();
    }
 
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/RenderResponseWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
index f5a518c..b4fbe71 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
@@ -32,7 +32,7 @@ import javax.portlet.RenderResponse;
 /**
  * <span class="changed_modified_3_0">The</span> <code>RenderResponseWrapper</code> provides a convenient 
  * implementation of the <code>RenderResponse</code> interface 
- * that can be subclassed by developers wishing to adapt the response.
+ * that can be subclassed by developers wishing to adapt the ((RenderResponse)response).
  * This class implements the Wrapper or Decorator pattern. 
  * Methods default to calling through to the wrapped response object.
  *
@@ -42,8 +42,6 @@ import javax.portlet.RenderResponse;
 
 public class RenderResponseWrapper extends MimeResponseWrapper implements RenderResponse {
 
-   RenderResponse response;
-
    /**
     * Creates an <code>RenderResponse</code> adaptor 
     * wrapping the given response object.
@@ -53,7 +51,6 @@ public class RenderResponseWrapper extends MimeResponseWrapper implements Render
     */
    public RenderResponseWrapper(RenderResponse response) {
       super(response);
-      this.response = response;
    }
 
    /**
@@ -62,7 +59,7 @@ public class RenderResponseWrapper extends MimeResponseWrapper implements Render
     * @return the wrapped response
     */
    public RenderResponse getResponse() {
-      return response;
+      return (RenderResponse) response;
    }
 
    /**
@@ -72,20 +69,16 @@ public class RenderResponseWrapper extends MimeResponseWrapper implements Render
     * @throws java.lang.IllegalArgumentException   if the response is null.
     */
    public void setResponse(RenderResponse response) {
-      if ( response == null) {
-         throw new java.lang.IllegalArgumentException("Response is null");
-      }
       super.setResponse(response);
-      this.response = response;
    }
 
    /**
     * The default behavior of this method is to call 
     * <code>setTitle(title)</code> on the wrapped response object.
     */
-   @SuppressWarnings("deprecation")
+   @Deprecated
    public void setTitle(String title) {
-      response.setTitle(title);
+      ((RenderResponse)response).setTitle(title);
    }
 
    /**
@@ -93,7 +86,7 @@ public class RenderResponseWrapper extends MimeResponseWrapper implements Render
     * <code>setNextPossiblePortletModes()</code> on the wrapped response object.
     */
    public void setNextPossiblePortletModes(Collection<? extends PortletMode> portletModes) {
-      response.setNextPossiblePortletModes(portletModes);
+      ((RenderResponse)response).setNextPossiblePortletModes(portletModes);
    }
 
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/RenderURLWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/RenderURLWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/RenderURLWrapper.java
new file mode 100644
index 0000000..5c54a09
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/filter/RenderURLWrapper.java
@@ -0,0 +1,83 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package javax.portlet.filter;
+
+import javax.portlet.RenderURL;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <code>RenderURLWrapper</code> provides a convenient 
+ * implementation of the <code>RenderURL</code> interface 
+ * that can be subclassed by developers wishing to adapt the request.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ * </div>
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class RenderURLWrapper extends PortletURLWrapper implements RenderURL {
+   
+   /**
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the RenderURL is null.
+    */
+   public RenderURLWrapper(RenderURL wrapped) {
+      super(wrapped);
+   }
+   
+
+   /**
+    * Gets the wrapped object.
+    * 
+    * @return the wrapped object.
+    */
+   public RenderURL getWrapped() {
+      return (RenderURL) wrapped;
+   }
+
+
+   /**
+    * Sets the wrapped object.
+    * 
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the RenderURL is null.
+    */
+   public void setWrapped(RenderURL wrapped) {
+      super.setWrapped(wrapped);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.RenderURL#setFragmentIdentifier(java.lang.String)
+    */
+   @Override
+   public void setFragmentIdentifier(String fragment) {
+      ((RenderURL)wrapped).setFragmentIdentifier(fragment);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.RenderURL#getFragmentIdentifier()
+    */
+   @Override
+   public String getFragmentIdentifier() {
+      return ((RenderURL)wrapped).getFragmentIdentifier();
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/ResourceParametersWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/ResourceParametersWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/ResourceParametersWrapper.java
new file mode 100644
index 0000000..57a8752
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/filter/ResourceParametersWrapper.java
@@ -0,0 +1,76 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package javax.portlet.filter;
+
+import javax.portlet.MutableResourceParameters;
+import javax.portlet.ResourceParameters;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <code>ResourceParametersWrapper</code> provides a convenient 
+ * implementation of the <code>ResourceParameters</code> interface 
+ * that can be subclassed by developers wishing to adapt the request.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ * </div>
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class ResourceParametersWrapper extends PortletParametersWrapper implements ResourceParameters {
+   
+   /**
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the ResourceParameters is null.
+    */
+   public ResourceParametersWrapper(ResourceParameters wrapped) {
+      super(wrapped);
+   }
+   
+
+   /**
+    * Gets the wrapped object.
+    * 
+    * @return the wrapped object.
+    */
+   public ResourceParameters getWrapped() {
+      return (ResourceParameters) wrapped;
+   }
+
+
+   /**
+    * Sets the wrapped object.
+    * 
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the ResourceParameters is null.
+    */
+   public void setWrapped(ResourceParameters wrapped) {
+      super.setWrapped(wrapped);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.ResourceParameters#clone()
+    */
+   @Override
+   public MutableResourceParameters clone() {
+      return ((ResourceParameters)wrapped).clone();
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
index 50a5b86..f10284c 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
@@ -42,8 +42,6 @@ import javax.portlet.ResourceRequest;
  */
 public class ResourceRequestWrapper extends ClientDataRequestWrapper implements ResourceRequest {
 
-   ResourceRequest request;
-
    /**
     * Creates an <code>ResourceRequest</code> adaptor 
     * wrapping the given request object.
@@ -53,7 +51,6 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     */
    public ResourceRequestWrapper(ResourceRequest request) {
       super(request);
-      this.request = request;
    }
 
    /**
@@ -62,7 +59,7 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     * @return the wrapped request
     */
    public ResourceRequest getRequest() {
-      return request;
+      return (ResourceRequest) super.getRequest();
    }
 
    /**
@@ -72,11 +69,7 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     * @throws java.lang.IllegalArgumentException   if the request is null.
     */
    public void setRequest(ResourceRequest request) {
-      if ( request == null) {
-         throw new java.lang.IllegalArgumentException("Request is null");
-      }
       super.setRequest(request);
-      this.request = request;
    }
 
    /**
@@ -84,7 +77,7 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     * <code>getETag()</code> on the wrapped request object.
     */
    public String getETag() {
-      return request.getETag();
+      return ((ResourceRequest)wrapped).getETag();
    }
 
    /**
@@ -92,7 +85,7 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     * <code>getResourceID()</code> on the wrapped request object.
     */
    public String getResourceID() {
-      return request.getResourceID();
+      return ((ResourceRequest)wrapped).getResourceID();
    }
 
    /**
@@ -101,7 +94,7 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     */
    @Deprecated
    public Map<String, String[]> getPrivateRenderParameterMap() {
-      return request.getPrivateRenderParameterMap();
+      return ((ResourceRequest)wrapped).getPrivateRenderParameterMap();
    }
 
    /**
@@ -109,7 +102,7 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     * <code>getCacheability()</code> on the wrapped response object.
     */
    public String getCacheability() {
-      return request.getCacheability();
+      return ((ResourceRequest)wrapped).getCacheability();
    }
 
    /**
@@ -119,7 +112,7 @@ public class ResourceRequestWrapper extends ClientDataRequestWrapper implements
     * </div>
     */
    public ResourceParameters getResourceParameters() {
-      return request.getResourceParameters();
+      return ((ResourceRequest)wrapped).getResourceParameters();
    }
 
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
index 486ccb8..ca2d129 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
@@ -32,7 +32,7 @@ import javax.portlet.ResourceResponse;
  * <span class="changed_modified_3_0">The</span>  
  * <code>ResourceResponseWrapper</code> provides a convenient 
  * implementation of the <code>ResourceResponse</code> interface 
- * that can be subclassed by developers wishing to adapt the response.
+ * that can be subclassed by developers wishing to adapt the ((ResourceResponse)response).
  * This class implements the Wrapper or Decorator pattern. 
  * Methods default to calling through to the wrapped response object.
  *
@@ -42,8 +42,6 @@ import javax.portlet.ResourceResponse;
 
 public class ResourceResponseWrapper extends MimeResponseWrapper implements ResourceResponse {
 
-   ResourceResponse response;
-
    /**
     * Creates an <code>ResourceResponse</code> adaptor 
     * wrapping the given response object.
@@ -53,7 +51,6 @@ public class ResourceResponseWrapper extends MimeResponseWrapper implements Reso
     */
    public ResourceResponseWrapper(ResourceResponse response) {
       super(response);
-      this.response = response;
    }
 
    /**
@@ -62,7 +59,7 @@ public class ResourceResponseWrapper extends MimeResponseWrapper implements Reso
     * @return the wrapped response
     */
    public ResourceResponse getResponse() {
-      return response;
+      return (ResourceResponse) response;
    }
 
    /**
@@ -72,11 +69,7 @@ public class ResourceResponseWrapper extends MimeResponseWrapper implements Reso
     * @throws java.lang.IllegalArgumentException   if the response is null.
     */
    public void setResponse(ResourceResponse response) {
-      if ( response == null) {
-         throw new java.lang.IllegalArgumentException("Response is null");
-      }
       super.setResponse(response);
-      this.response = response;
    }
 
 
@@ -85,8 +78,7 @@ public class ResourceResponseWrapper extends MimeResponseWrapper implements Reso
     * <code>setCharacterEncoding(String charset)</code> on the wrapped response object.
     */
    public void setCharacterEncoding(String charset) {
-      response.setCharacterEncoding(charset);
-      return;
+      ((ResourceResponse)response).setCharacterEncoding(charset);
    }
 
    /**
@@ -94,8 +86,7 @@ public class ResourceResponseWrapper extends MimeResponseWrapper implements Reso
     * <code>setLocale(Locale loc)</code> on the wrapped response object.
     */
    public void setLocale(Locale loc) {
-      response.setLocale(loc);
-      return;
+      ((ResourceResponse)response).setLocale(loc);
    }
 
    /**
@@ -103,7 +94,7 @@ public class ResourceResponseWrapper extends MimeResponseWrapper implements Reso
     * <code>setContentLength()</code> on the wrapped response object.
     */
    public void setContentLength(int len) {
-      response.setContentLength(len);
+      ((ResourceResponse)response).setContentLength(len);
    }
 
    /**
@@ -113,7 +104,7 @@ public class ResourceResponseWrapper extends MimeResponseWrapper implements Reso
     * </div>
     */
    public void setStatus(int sc) {
-      response.setStatus(sc);
+      ((ResourceResponse)response).setStatus(sc);
    }
 
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/ResourceURLWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/ResourceURLWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/ResourceURLWrapper.java
new file mode 100644
index 0000000..237a5bf
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/filter/ResourceURLWrapper.java
@@ -0,0 +1,108 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package javax.portlet.filter;
+
+import javax.portlet.MutableResourceParameters;
+import javax.portlet.ResourceURL;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <code>ResourceURLWrapper</code> provides a convenient 
+ * implementation of the <code>ResourceURL</code> interface 
+ * that can be subclassed by developers wishing to adapt the request.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ * </div>
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class ResourceURLWrapper extends BaseURLWrapper implements ResourceURL {
+   
+   /**
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the ResourceURL is null.
+    */
+   public ResourceURLWrapper(ResourceURL wrapped) {
+      super(wrapped);
+   }
+   
+
+   /**
+    * Gets the wrapped object.
+    * 
+    * @return the wrapped object.
+    */
+   public ResourceURL getWrapped() {
+      return (ResourceURL) wrapped;
+   }
+
+
+   /**
+    * Sets the wrapped object.
+    * 
+    * @param the wrapped object to set.
+    * @throws java.lang.IllegalArgumentException   if the ResourceURL is null.
+    */
+   public void setWrapped(ResourceURL wrapped) {
+      super.setWrapped(wrapped);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.ResourceURL#getResourceParameters()
+    */
+   @Override
+   public MutableResourceParameters getResourceParameters() {
+      return ((ResourceURL)wrapped).getResourceParameters();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.ResourceURL#setResourceID(java.lang.String)
+    */
+   @Override
+   public void setResourceID(String resourceID) {
+      ((ResourceURL)wrapped).setResourceID(resourceID);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.ResourceURL#getResourceID()
+    */
+   @Override
+   public String getResourceID() {
+      return ((ResourceURL)wrapped).getResourceID();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.ResourceURL#getCacheability()
+    */
+   @Override
+   public String getCacheability() {
+      return ((ResourceURL)wrapped).getCacheability();
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.ResourceURL#setCacheability(java.lang.String)
+    */
+   @Override
+   public void setCacheability(String cacheLevel) {
+      ((ResourceURL)wrapped).setCacheability(cacheLevel);
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/aa5e8a3b/portlet-api/src/main/java/javax/portlet/filter/StateAwareResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/StateAwareResponseWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/StateAwareResponseWrapper.java
index 9284c37..94568d5 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/StateAwareResponseWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/StateAwareResponseWrapper.java
@@ -41,14 +41,11 @@ import javax.xml.namespace.QName;
  */
 public class StateAwareResponseWrapper extends PortletResponseWrapper implements StateAwareResponse {
 
-   StateAwareResponse response;
-
    /**
     * @param response
     */
    public StateAwareResponseWrapper(StateAwareResponse response) {
       super(response);
-      this.response = response;
    }
 
    /**
@@ -57,7 +54,7 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     * @return the wrapped response
     */
    public StateAwareResponse getResponse() {
-      return response;
+      return (StateAwareResponse) response;
    }
 
    /**
@@ -67,18 +64,14 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     * @throws java.lang.IllegalArgumentException   if the response is null.
     */
    public void setResponse(StateAwareResponse response) {
-      if ( response == null) {
-         throw new java.lang.IllegalArgumentException("Response is null");
-      }
       super.setResponse(response);
-      this.response = response;
    }
 
    /* (non-Javadoc)
     * @see javax.portlet.MutablePortletState#getRenderParameters()
     */
    public MutableRenderParameters getRenderParameters() {
-      return response.getRenderParameters();
+      return ((StateAwareResponse)response).getRenderParameters();
    }
 
    /* (non-Javadoc)
@@ -86,7 +79,7 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     */
    public void setWindowState(WindowState windowState)
          throws WindowStateException {
-      response.setWindowState(windowState);
+      ((StateAwareResponse)response).setWindowState(windowState);
    }
 
    /* (non-Javadoc)
@@ -94,21 +87,21 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     */
    public void setPortletMode(PortletMode portletMode)
          throws PortletModeException {
-      response.setPortletMode(portletMode);
+      ((StateAwareResponse)response).setPortletMode(portletMode);
    }
 
    /* (non-Javadoc)
     * @see javax.portlet.PortletState#getPortletMode()
     */
    public PortletMode getPortletMode() {
-      return response.getPortletMode();
+      return ((StateAwareResponse)response).getPortletMode();
    }
 
    /* (non-Javadoc)
     * @see javax.portlet.PortletState#getWindowState()
     */
    public WindowState getWindowState() {
-      return response.getWindowState();
+      return ((StateAwareResponse)response).getWindowState();
    }
 
    /* (non-Javadoc)
@@ -116,7 +109,7 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     */
    @Deprecated
    public void setRenderParameters(Map<String, String[]> parameters) {
-      response.setRenderParameters(parameters);
+      ((StateAwareResponse)response).setRenderParameters(parameters);
    }
 
    /* (non-Javadoc)
@@ -124,7 +117,7 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     */
    @Deprecated
    public void setRenderParameter(String key, String value) {
-      response.setRenderParameter(key, value);
+      ((StateAwareResponse)response).setRenderParameter(key, value);
    }
 
    /* (non-Javadoc)
@@ -132,21 +125,21 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     */
    @Deprecated
    public void setRenderParameter(String key, String... values) {
-      response.setRenderParameter(key, values);
+      ((StateAwareResponse)response).setRenderParameter(key, values);
    }
 
    /* (non-Javadoc)
     * @see javax.portlet.StateAwareResponse#setEvent(javax.xml.namespace.QName, java.io.Serializable)
     */
    public void setEvent(QName name, Serializable value) {
-      response.setEvent(name, value);
+      ((StateAwareResponse)response).setEvent(name, value);
    }
 
    /* (non-Javadoc)
     * @see javax.portlet.StateAwareResponse#setEvent(java.lang.String, java.io.Serializable)
     */
    public void setEvent(String name, Serializable value) {
-      response.setEvent(name, value);
+      ((StateAwareResponse)response).setEvent(name, value);
    }
 
    /* (non-Javadoc)
@@ -154,7 +147,7 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     */
    @Deprecated
    public Map<String, String[]> getRenderParameterMap() {
-      return response.getRenderParameterMap();
+      return ((StateAwareResponse)response).getRenderParameterMap();
    }
 
    /* (non-Javadoc)
@@ -162,7 +155,7 @@ public class StateAwareResponseWrapper extends PortletResponseWrapper implements
     */
    @Deprecated
    public void removePublicRenderParameter(String name) {
-      response.removePublicRenderParameter(name);
+      ((StateAwareResponse)response).removePublicRenderParameter(name);
    }
 
 }


Mime
View raw message