You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@portals.apache.org by ta...@apache.org on 2015/07/13 18:40:01 UTC

svn commit: r1690750 [6/6] - in /portals/portlet-spec/trunk/portlet-api_2.1.0_spec: ./ src/ src/main/ src/main/appended-resources/ src/main/appended-resources/META-INF/ src/main/java/ src/main/java/META-INF/ src/main/java/javax/ src/main/java/javax/por...

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,111 @@
+/*  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.
+ */
+
+/*
+ * This source code implements specifications defined by the Java
+ * Community Process. In order to remain compliant with the specification
+ * DO NOT add / change / or delete method signatures!
+ */
+
+package javax.portlet.filter;
+
+import java.io.IOException;
+
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+
+/**
+ * The <code>RenderFilter</code> is an object that performs filtering 
+ * tasks on either the render request to a portlet, or on the render response from 
+ * a portlet, or both.
+ * <p>
+ * Filters perform filtering in the <code>doFilter</code> method. Every Filter has 
+ * access to a <code>FilterConfig</code> object from which it can obtain 
+ * its initialization parameters, a reference to the PortletContext 
+ * which it can use, for example, to load resources needed for filtering tasks.
+ * <p>
+ * Filters are configured in the portlet deployment descriptor of a 
+ * portlet application. 
+ * 
+ * @since 2.0
+ */
+public interface RenderFilter extends PortletFilter {
+
+    /**
+     * The <code>doFilter</code> method of the Filter is called by the 
+     * portlet container each time a render request/response pair is passed 
+     * through the chain due to a client request for a portlet method 
+     * at the end of the chain. 
+     * <p>
+     * The <code>FilterChain</code> passed in to this method allows 
+     * the Filter to pass on the render request and response to the next 
+     * component in the chain.
+     * <p>
+     * The <code>doFilter</code> method of a filter will typically be implemented 
+     * following this or some subset of the following pattern:
+     * <ul>
+     *  <li>The method examines the request information.</li>
+     *  <li>The method may wrap the request object passed in to 
+     *      its doFilter method with a customized implementation 
+     *      the request wrapper <code>RenderRequestWrapper</code> 
+     *      in order to modify request data.</li>
+     *  <li>The method may wrap the response object passed in to its 
+     *      <code>doFilter</code> method with a customized implementation 
+     *      of the response wrapper <code>RenderResponseWrapper</code> 
+     *      to modify response data.</li>
+     *  <li>The filter may invoke the next component in the filter chain. 
+     *      The next component may be another filter, or if the filter 
+     *      making the invocation is the last filter configured in the 
+     *      deployment descriptor for this chain, the next component 
+     *      is the target method of the portlet. The invocation of the 
+     *      next component is effected by calling the <code>doFilter</code>
+     *      method on the <code>FilterChain</code> object, and passing in 
+     *      the request and response with which it was called or passing 
+     *      in wrapped versions it may have created. 
+     *      The filter chain's implementation of the <code>doFilter</code> 
+     *      method, provided by the portlet container, must locate the 
+     *      next component in the filter chain and invoke its <code>doFilter</code>
+     *      method, passing in the appropriate request and response objects. 
+     *      Alternatively, the filter chain can block the request by not 
+     *      making the call to invoke the next component, leaving the filter 
+     *      responsible for filling out the response object.</li>
+     *  <li>After invocation of the next filter in the chain, the filter 
+     *      may examine the response data.</li>
+     *  <li>Alternatively, the filter may have thrown an exception to 
+     *      indicate an error in processing. If the filter throws an 
+     *      <code>UnavailableException</code> during its <code>doFilter</code> 
+     *      processing, the portlet container must not attempt continued 
+     *      processing down the filter chain. It may choose to retry the 
+     *      whole chain at a later time if the exception is not marked permanent.</li>
+     *  <li>When the last filter in the chain has been invoked, the next 
+     *      component accessed is the target method on the portlet at 
+     *      the end of the chain.</li>
+     * </ul>
+     * 
+     * @param request  the current render request 
+     * @param response  the current render response 
+     * @param chain  the remaining filter chain
+     * @throws IOException  if an IO error occurred in the filter processing
+     * @throws PortletException  if a portlet exception occurred in the filter processing
+     */
+    public void doFilter(RenderRequest request, RenderResponse response,
+                         FilterChain chain)
+     throws IOException, PortletException;
+        
+}

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,88 @@
+/*  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.
+ */
+
+/*
+ * This source code implements specifications defined by the Java
+ * Community Process. In order to remain compliant with the specification
+ * DO NOT add / change / or delete method signatures!
+ */
+
+package javax.portlet.filter;
+
+import javax.portlet.RenderRequest;
+
+/**
+ * The <code>RenderRequestWrapper</code> provides a convenient 
+ * implementation of the <code>RenderRequest</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.
+ *
+ * @since 2.0
+ * @see RenderRequest
+ */
+public class RenderRequestWrapper extends PortletRequestWrapper implements RenderRequest {
+
+    RenderRequest request;
+    
+    /**
+     * Creates an <code>RenderRequest</code> adaptor 
+     * wrapping the given request object.
+     * 
+     * @param request  the render request to wrap
+     * @throws java.lang.IllegalArgumentException if the request is <code>null</code>
+     */
+    public RenderRequestWrapper(RenderRequest request) {
+    	super(request);
+    	this.request = request;
+    }
+
+    
+
+    /**
+     * Return the wrapped request object.
+     * 
+     * @return the wrapped request
+     */
+    public RenderRequest 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(RenderRequest request) {
+    	if ( request == null)
+    		throw new java.lang.IllegalArgumentException("Request is null");
+
+    	this.request = request;
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getETag()</code> on the wrapped request object.
+     */
+    public String getETag() {
+        return request.getETag();
+    }
+
+
+}

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,234 @@
+/*  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.
+ */
+
+/*
+ * This source code implements specifications defined by the Java
+ * Community Process. In order to remain compliant with the specification
+ * DO NOT add / change / or delete method signatures!
+ */
+
+package javax.portlet.filter;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.Locale;
+
+import javax.portlet.CacheControl;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceURL;
+
+/**
+ * The <code>RenderResponseWrapper</code> provides a convenient 
+ * implementation of the <code>RenderResponse</code> interface 
+ * that can be subclassed by developers wishing to adapt the response.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped response object.
+ *
+ * @since 2.0
+ * @see RenderResponse
+ */
+
+public class RenderResponseWrapper extends PortletResponseWrapper implements RenderResponse {
+
+    RenderResponse response;
+    
+    /**
+     * Creates an <code>RenderResponse</code> adaptor 
+     * wrapping the given response object.
+     * 
+     * @param response  the event response to wrap
+     * @throws java.lang.IllegalArgumentException if the response is <code>null</code>
+     */
+    public RenderResponseWrapper(RenderResponse response) {
+    	super(response);
+    	this.response = response;
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>flushBuffer()</code> on the wrapped response object.
+     */ 
+    public void flushBuffer() throws IOException {
+        response.flushBuffer();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getBufferSize()</code> on the wrapped response object.
+     */
+    public int getBufferSize() {
+        return response.getBufferSize();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getCharacterEncoding()</code> on the wrapped response object.
+     */
+    public String getCharacterEncoding() {
+        return response.getCharacterEncoding();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getContentType()</code> on the wrapped response object.
+     */
+    public String getContentType() {
+        return response.getContentType();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getLocale()</code> on the wrapped response object.
+     */
+    public Locale getLocale() {
+        return response.getLocale();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPortletOutputStream()</code> on the wrapped response object.
+     */
+    public OutputStream getPortletOutputStream() throws IOException {
+        return response.getPortletOutputStream();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getWriter()</code> on the wrapped response object.
+     */
+    public PrintWriter getWriter() throws IOException {
+        return response.getWriter();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>isCommitted()</code> on the wrapped response object.
+     */
+    public boolean isCommitted() {
+        return response.isCommitted();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>reset()</code> on the wrapped response object.
+     */
+    public void reset() {
+        response.reset();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>resetBuffer()</code> on the wrapped response object.
+     */
+    public void resetBuffer() {
+        response.resetBuffer();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setBufferSize(size)</code> on the wrapped response object.
+     */
+    public void setBufferSize(int size) {
+        response.setBufferSize(size);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setContentType(type)</code> on the wrapped response object.
+     */
+    public void setContentType(String type) {
+        response.setContentType(type);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setTitle(title)</code> on the wrapped response object.
+     */
+    public void setTitle(String title) {
+        response.setTitle(title);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getCacheControl()</code> on the wrapped response object.
+     */
+    public CacheControl getCacheControl() {
+        return response.getCacheControl();
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>setNextPossiblePortletModes()</code> on the wrapped response object.
+     */
+    public void setNextPossiblePortletModes(Collection<PortletMode> portletModes) {
+        response.setNextPossiblePortletModes(portletModes);
+    }
+
+    /**
+     * Return the wrapped response object.
+     * 
+     * @return the wrapped response
+     */
+    public RenderResponse getResponse() {
+        return response;
+    }
+
+    /**
+     * Sets the response object being wrapped.
+     * 
+     * @param response the response to set
+     * @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");
+
+	    	this.response = response;
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>createActionURL()</code> on the wrapped response object.
+     */
+	public PortletURL createActionURL() throws IllegalStateException {
+		return response.createActionURL();
+	}
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>createRenderURL()</code> on the wrapped response object.
+     */
+	public PortletURL createRenderURL() throws IllegalStateException {
+		return response.createRenderURL();
+	}
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>createResourceURL()</code> on the wrapped response object.
+     */
+	public ResourceURL createResourceURL() throws IllegalStateException {
+		return response.createResourceURL();
+	}
+
+
+
+}

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,111 @@
+/*  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.
+ */
+
+/*
+ * This source code implements specifications defined by the Java
+ * Community Process. In order to remain compliant with the specification
+ * DO NOT add / change / or delete method signatures!
+ */
+
+package javax.portlet.filter;
+
+import java.io.IOException;
+
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.PortletException;
+
+/**
+ * The <code>ResourceFilter</code> is an object that performs filtering 
+ * tasks on either the resource request to a portlet, or on the resource response from 
+ * a portlet, or both.
+ * <p>
+ * Filters perform filtering in the <code>doFilter</code> method. Every Filter has 
+ * access to a <code>FilterConfig</code> object from which it can obtain 
+ * its initialization parameters, a reference to the PortletContext 
+ * which it can use, for example, to load resources needed for filtering tasks.
+ * <p>
+ * Filters are configured in the portlet deployment descriptor of a 
+ * portlet application. 
+ * 
+ * @since 2.0
+ */
+public interface ResourceFilter extends PortletFilter {
+
+    /**
+     * The <code>doFilter</code> method of the Filter is called by the 
+     * portlet container each time a resource request/response pair is passed 
+     * through the chain due to a client request for a portlet method 
+     * at the end of the chain. 
+     * <p>
+     * The <code>FilterChain</code> passed in to this method allows 
+     * the Filter to pass on the resource request and response to the next 
+     * component in the chain.
+     * <p>
+     * The <code>doFilter</code> method of a filter will typically be implemented 
+     * following this or some subset of the following pattern:
+     * <ul>
+     *  <li>The method examines the request information.</li>
+     *  <li>The method may wrap the request object passed in to 
+     *      its doFilter method with a customized implementation 
+     *      the request wrapper <code>ResourceRequestWrapper</code> 
+     *      in order to modify request data.</li>
+     *  <li>The method may wrap the response object passed in to its 
+     *      <code>doFilter</code> method with a customized implementation 
+     *      of the response wrapper <code>ResourceResponseWrapper</code> 
+     *      to modify response data.</li>
+     *  <li>The filter may invoke the next component in the filter chain. 
+     *      The next component may be another filter, or if the filter 
+     *      making the invocation is the last filter configured in the 
+     *      deployment descriptor for this chain, the next component 
+     *      is the target method of the portlet. The invocation of the 
+     *      next component is effected by calling the <code>doFilter</code>
+     *      method on the <code>FilterChain</code> object, and passing in 
+     *      the request and response with which it was called or passing 
+     *      in wrapped versions it may have created. 
+     *      The filter chain's implementation of the <code>doFilter</code> 
+     *      method, provided by the portlet container, must locate the 
+     *      next component in the filter chain and invoke its <code>doFilter</code>
+     *      method, passing in the appropriate request and response objects. 
+     *      Alternatively, the filter chain can block the request by not 
+     *      making the call to invoke the next component, leaving the filter 
+     *      responsible for filling out the response object.</li>
+     *  <li>After invocation of the next filter in the chain, the filter 
+     *      may examine the response data.</li>
+     *  <li>Alternatively, the filter may have thrown an exception to 
+     *      indicate an error in processing. If the filter throws an 
+     *      <code>UnavailableException</code> during its <code>doFilter</code> 
+     *      processing, the portlet container must not attempt continued 
+     *      processing down the filter chain. It may choose to retry the 
+     *      whole chain at a later time if the exception is not marked permanent.</li>
+     *  <li>When the last filter in the chain has been invoked, the next 
+     *      component accessed is the target method on the portlet at 
+     *      the end of the chain.</li>
+     * </ul>
+     * 
+     * @param request  the current resource request 
+     * @param response  the current resource response 
+     * @param chain  the remaining filter chain
+     * @throws IOException  if an IO error occurred in the filter processing
+     * @throws PortletException  if a portlet exception occurred in the filter processing
+     */
+    public void doFilter(ResourceRequest request, ResourceResponse response,
+                         FilterChain chain)
+     throws IOException, PortletException;
+    
+}

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,176 @@
+/*  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.
+ */
+
+/*
+ * This source code implements specifications defined by the Java
+ * Community Process. In order to remain compliant with the specification
+ * DO NOT add / change / or delete method signatures!
+ */
+
+package javax.portlet.filter;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Map;
+
+import javax.portlet.ResourceRequest;
+
+/**
+ * The <code>ResourceRequestWrapper</code> provides a convenient 
+ * implementation of the <code>ResourceRequest</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.
+ *
+ * @since 2.0
+ * @see ResourceRequest
+ */
+public class ResourceRequestWrapper extends PortletRequestWrapper implements ResourceRequest {
+
+    ResourceRequest request;
+
+    /**
+     * Creates an <code>ResourceRequest</code> adaptor 
+     * wrapping the given request object.
+     * 
+     * @param request  the resource request to wrap
+     * @throws java.lang.IllegalArgumentException if the request is <code>null</code>
+     */
+    public ResourceRequestWrapper(ResourceRequest request) {
+    	super(request);
+    	this.request = request;
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPortletInputStream()</code> on the wrapped request object.
+     */
+    public InputStream getPortletInputStream() throws IOException {
+        return request.getPortletInputStream();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getReader()</code> on the wrapped request object.
+     */
+    public BufferedReader getReader() throws UnsupportedEncodingException,
+            IOException {
+        return request.getReader();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setCharacterEncoding(String enc)</code> 
+     * on the wrapped request object.
+     */
+    public void setCharacterEncoding(String enc)
+            throws UnsupportedEncodingException {
+       request.setCharacterEncoding(enc);
+    }
+    
+
+    /**
+     * Return the wrapped request object.
+     * 
+     * @return the wrapped request
+     */
+    public ResourceRequest 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(ResourceRequest request) {
+    	if ( request == null)
+    		throw new java.lang.IllegalArgumentException("Request is null");
+
+    	this.request = request;
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getCharacterEncoding()</code> on the wrapped request object.
+     */
+    public String getCharacterEncoding() {      
+        return request.getCharacterEncoding();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getContentLength()</code> on the wrapped request object.
+     */
+    public int getContentLength() {
+        return request.getContentLength();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getContentType()</code> on the wrapped request object.
+     */
+    public String getContentType() {
+        return request.getContentType();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getETag()</code> on the wrapped request object.
+     */
+    public String getETag() {
+        return request.getETag();
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>getMethod()</code> on the wrapped request object.
+     */
+    public String getMethod() {
+        return request.getMethod();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getResourceID()</code> on the wrapped request object.
+     */
+    public String getResourceID() {
+        return request.getResourceID();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPrivateRenderParameterMap()</code> on the wrapped request object.
+     */
+	public Map<String, String[]> getPrivateRenderParameterMap() {
+		return request.getPrivateParameterMap();
+	}
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>getCacheability()</code> on the wrapped response object.
+     */
+    public String getCacheability() {
+        return request.getCacheability();
+    }
+    
+
+}

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,242 @@
+/*  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.
+ */
+
+/*
+ * This source code implements specifications defined by the Java
+ * Community Process. In order to remain compliant with the specification
+ * DO NOT add / change / or delete method signatures!
+ */
+
+package javax.portlet.filter;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Locale;
+
+import javax.portlet.CacheControl;
+import javax.portlet.PortletURL;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceURL;
+
+/**
+ * The <code>ResourceResponseWrapper</code> provides a convenient 
+ * implementation of the <code>ResourceResponse</code> interface 
+ * that can be subclassed by developers wishing to adapt the response.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped response object.
+ *
+ * @since 2.0
+ * @see ResourceResponse
+ */
+
+public class ResourceResponseWrapper extends PortletResponseWrapper implements ResourceResponse {
+
+    ResourceResponse response;
+    
+    /**
+     * Creates an <code>ResourceResponse</code> adaptor 
+     * wrapping the given response object.
+     * 
+     * @param response  the event response to wrap
+     * @throws java.lang.IllegalArgumentException if the response is <code>null</code>
+     */
+    public ResourceResponseWrapper(ResourceResponse response) {
+    	super(response);
+    	this.response = response;
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>flushBuffer()</code> on the wrapped response object.
+     */ 
+    public void flushBuffer() throws IOException {
+        response.flushBuffer();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getBufferSize()</code> on the wrapped response object.
+     */
+    public int getBufferSize() {
+        return response.getBufferSize();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getCharacterEncoding()</code> on the wrapped response object.
+     */
+    public String getCharacterEncoding() {
+        return response.getCharacterEncoding();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getContentType()</code> on the wrapped response object.
+     */
+    public String getContentType() {
+        return response.getContentType();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getLocale()</code> on the wrapped response object.
+     */
+    public Locale getLocale() {
+        return response.getLocale();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPortletOutputStream()</code> on the wrapped response object.
+     */
+    public OutputStream getPortletOutputStream() throws IOException {
+        return response.getPortletOutputStream();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getWriter()</code> on the wrapped response object.
+     */
+    public PrintWriter getWriter() throws IOException {
+        return response.getWriter();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>isCommitted()</code> on the wrapped response object.
+     */
+    public boolean isCommitted() {
+        return response.isCommitted();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>reset()</code> on the wrapped response object.
+     */
+    public void reset() {
+        response.reset();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>resetBuffer()</code> on the wrapped response object.
+     */
+    public void resetBuffer() {
+        response.resetBuffer();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setBufferSize(size)</code> on the wrapped response object.
+     */
+    public void setBufferSize(int size) {
+        response.setBufferSize(size);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setContentType(type)</code> on the wrapped response object.
+     */
+    public void setContentType(String type) {
+        response.setContentType(type);
+    }
+
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getCacheControl()</code> on the wrapped response object.
+     */
+    public CacheControl getCacheControl() {
+        return response.getCacheControl();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setCharacterEncoding(String charset)</code> on the wrapped response object.
+     */
+    public void setCharacterEncoding(String charset) {
+        response.setCharacterEncoding(charset);
+        return;
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>setLocale(Locale loc)</code> on the wrapped response object.
+     */
+    public void setLocale(Locale loc) {
+        response.setLocale(loc);
+        return;
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>setContentLength()</code> on the wrapped response object.
+     */
+    public void setContentLength(int len) {
+        response.setContentLength(len);
+    }
+
+    /**
+     * Return the wrapped response object.
+     * 
+     * @return the wrapped response
+     */
+    public ResourceResponse getResponse() {
+        return response;
+    }
+
+    /**
+     * Sets the response object being wrapped.
+     * 
+     * @param response the response to set
+     * @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");
+
+	    	this.response = response;
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>createActionURL()</code> on the wrapped response object.
+     */
+	public PortletURL createActionURL() throws IllegalStateException {
+		return response.createActionURL();
+	}
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>createRenderURL()</code> on the wrapped response object.
+     */
+	public PortletURL createRenderURL() throws IllegalStateException {
+		return response.createRenderURL();
+	}
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>createResourceURL()</code> on the wrapped response object.
+     */
+	public ResourceURL createResourceURL() throws IllegalStateException {
+		return response.createResourceURL();
+	}
+	
+
+}

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/package-info.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/package-info.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/package-info.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/filter/package-info.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,23 @@
+/*  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.
+ */
+
+/**
+ * The javax.portlet.filter package defines the filter APIs for the Java Portlet Specification.
+ */
+
+package javax.portlet.filter;
\ No newline at end of file

Added: portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/package-info.java
URL: http://svn.apache.org/viewvc/portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/package-info.java?rev=1690750&view=auto
==============================================================================
--- portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/package-info.java (added)
+++ portals/portlet-spec/trunk/portlet-api_2.1.0_spec/src/main/java/javax/portlet/package-info.java Mon Jul 13 16:39:59 2015
@@ -0,0 +1,44 @@
+/*  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.
+ */
+
+/*
+ * This source code implements specifications defined by the Java
+ * Community Process. In order to remain compliant with the specification
+ * DO NOT add / change / or delete method signatures!
+ */
+
+/**
+ * The javax.portlet package defines the API for Java Portlet Specification V2.0.
+ * <p>
+ * A portlet is a Java technology based web component, managed by a portlet container,
+ * that processes requests and generates dynamic content. Portlets provide a presentation
+ * layer to Information Systems.
+ * <p>
+ * Portlets generate fragments of markup (e.g. HTML, XHTML, WML). A portal combines markup
+ * fragments generated by different portlets into a portal page.
+ * <p>
+ * A portlet container manages the lifecyle of portlets. It also provides the required runtime environment.
+ * <p>
+ * Portlets are bundled in Portlet Applications as web applications using the WAR file format.
+ * A portlet application consists of two deployment descriptors: one to specify
+ * the web application resources (web.xml) and one to specify the portlet resources
+ * (portlet.xml). The portlet.xml must follow the schema defined by the
+ * http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd namespace.
+ * <p>
+ */
+package javax.portlet;