You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2014/11/25 13:50:18 UTC

[13/19] portals-pluto git commit: Moved the portlet spec 2 API classes into the Pluto project in preparation for prototyping the Partial Action sequence. The Partial Action implementation will require an update to the ResourceRequest class in order to ma

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventFilter.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventFilter.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventFilter.java
new file mode 100644
index 0000000..24f4bea
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventFilter.java
@@ -0,0 +1,112 @@
+/*  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.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.PortletException;
+
+/**
+ * The <code>EventFilter</code> is an object that performs filtering 
+ * tasks on either the event request to a portlet, or on the event 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 EventFilter extends PortletFilter {
+
+    
+    /**
+     * The <code>doFilter</code> method of the Filter is called by the 
+     * portlet container each time a event 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 event 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>ActionRequestWrapper</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>ActionResponseWrapper</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 event request 
+     * @param response  the current event 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(EventRequest request, EventResponse response,
+                         FilterChain chain)
+     throws IOException, PortletException;
+    
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventRequestWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventRequestWrapper.java
new file mode 100644
index 0000000..d13b014
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventRequestWrapper.java
@@ -0,0 +1,96 @@
+/*  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.Event;
+import javax.portlet.EventRequest;
+
+/**
+ * The <code>EventRequestWrapper</code> provides a convenient 
+ * implementation of the <code>EventRequest</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 EventRequest
+ */
+public class EventRequestWrapper extends PortletRequestWrapper implements EventRequest {
+
+    EventRequest request;
+    
+    
+    /**
+     * Creates an <code>EventRequest</code> adaptor 
+     * wrapping the given request object.
+     * 
+     * @param request  the event request to wrap
+     * @throws java.lang.IllegalArgumentException if the request is <code>null</code>
+     */
+    public EventRequestWrapper(EventRequest request) {
+    	super(request);
+    	this.request = request;
+    }
+
+    /**
+     * Return the wrapped request object.
+     * 
+     * @return the wrapped request
+     */
+    public EventRequest 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(EventRequest 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>getEvent()</code> on the wrapped request object.
+     */
+    public Event getEvent() {
+        return request.getEvent();
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>getMethod()</code> on the wrapped request object.
+     */
+    public String getMethod() {
+        return request.getMethod();
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventResponseWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventResponseWrapper.java
new file mode 100644
index 0000000..c075064
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/EventResponseWrapper.java
@@ -0,0 +1,184 @@
+/*  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.util.Map;
+
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletModeException;
+import javax.portlet.WindowState;
+import javax.portlet.WindowStateException;
+import javax.xml.namespace.QName;
+
+/**
+ * The <code>EventResponseWrapper</code> provides a convenient 
+ * implementation of the <code>EventResponse</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 EventResponse
+ */
+
+public class EventResponseWrapper extends PortletResponseWrapper implements EventResponse {
+
+    EventResponse response;
+     
+     /**
+      * Creates an <code>EventResponse</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 EventResponseWrapper(EventResponse response) {
+    	 super(response);
+         this.response = response;
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>setEvent(name, value)</code> on the wrapped response object.
+      */
+     public void setEvent(QName name, java.io.Serializable value) {
+         response.setEvent(name, value);
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>setPortletMode(portletMode)</code> on the wrapped response object.
+      */
+     public void setPortletMode(PortletMode portletMode)
+             throws PortletModeException {
+         response.setPortletMode(portletMode);
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>setRenderParameter(key, value)</code> on the wrapped response object.
+      */
+     public void setRenderParameter(String key, String value) {
+         response.setRenderParameter(key, value);
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>setRenderParameter(key, value)</code> on the wrapped response object.
+      */
+     public void setRenderParameter(String key, String[] values) {
+         response.setRenderParameter(key, values);
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>setRenderParameters(parameters)</code> on the wrapped response object.
+      */
+     public void setRenderParameters(Map<String, String[]> parameters) {
+         response.setRenderParameters(parameters);
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>setWindowState(windowState)</code> on the wrapped response object.
+      */
+     public void setWindowState(WindowState windowState)
+             throws WindowStateException {
+         response.setWindowState(windowState);
+     }
+
+     /**
+      * Return the wrapped response object.
+      * 
+      * @return the wrapped response
+      */
+     public EventResponse 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(EventResponse 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>getPortletMode()</code> on the wrapped response object.
+      */
+     public PortletMode getPortletMode() {
+         return response.getPortletMode();
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>getRenderParameterMap()</code> on the wrapped response object.
+      */
+     public Map<String, String[]> getRenderParameterMap() {
+         return response.getRenderParameterMap();
+     }
+
+     /**
+      * The default behavior of this method is to call 
+      * <code>getWindowState()</code> on the wrapped response object.
+      */
+     public WindowState getWindowState() {
+         return response.getWindowState();
+     }
+
+     /**
+      *  The default behavior of this method is to call 
+      * <code>setRenderParameters()</code> on the wrapped response object.
+      */
+     public void setRenderParameters(EventRequest request) {
+         response.setRenderParameters(request);         
+     }
+
+     /**
+      *  The default behavior of this method is to call 
+      * <code>setEvent()</code> on the wrapped response object.
+      */
+ 	public void setEvent(String name, java.io.Serializable value) {
+ 		response.setEvent(name, value);
+ 	}
+ 	
+    /**
+     *  The default behavior of this method is to call 
+     * <code>removePublicRenderParameter()</code> on the wrapped response object.
+     */
+	public void removePublicRenderParameter(String name) {
+		response.removePublicRenderParameter(name);		
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterChain.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterChain.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterChain.java
new file mode 100644
index 0000000..914ae7f
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterChain.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.
+ */
+
+/*
+ * 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.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+
+/**
+ * A <code>FilterChain</code> is an object provided by the portlet container 
+ * to the developer giving a view into the invocation chain of a 
+ * filtered request for a portlet. Filters use the <code>FilterChain</code> 
+ * to invoke the next filter in the chain, or if the calling filter is the 
+ * last filter in the chain, to invoke the portlet at the end of the chain.
+ *
+ * @since 2.0
+ */
+public interface FilterChain {
+
+    /**
+     * Causes the next filter in the chain to be invoked, 
+     * or if the calling filter is the last filter in the chain, 
+     * causes the portlet at the end of the chain to be invoked.
+     * 
+     * @param request  the current action request. 
+     * @param response  the current action response
+     *                   
+     * @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(ActionRequest request, ActionResponse response)
+     throws IOException, PortletException;
+
+    /**
+     * Causes the next filter in the chain to be invoked, 
+     * or if the calling filter is the last filter in the chain, 
+     * causes the portlet at the end of the chain to be invoked.
+     * 
+     * @param request  the current event request. 
+     * @param response  the current event response.
+     *  
+     * @throws IOException  if an IO error occured in the filter processing
+     * @throws PortletException  if a portlet exception occured in the filter processing
+     */
+    public void doFilter(EventRequest request, EventResponse response)
+     throws IOException, PortletException;
+
+    /**
+     * Causes the next filter in the chain to be invoked, 
+     * or if the calling filter is the last filter in the chain, 
+     * causes the portlet at the end of the chain to be invoked.
+     * 
+     * @param request  the current render request.
+     *  
+     * @param response  the current render response.
+     *  
+     * @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)
+     throws IOException, PortletException;
+    
+    /**
+     * Causes the next filter in the chain to be invoked, 
+     * or if the calling filter is the last filter in the chain, 
+     * causes the portlet at the end of the chain to be invoked.
+     * 
+     * @param request  the current resource request. 
+     * @param response  the current resource response.
+     *  
+     * @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)
+     throws IOException, PortletException;
+
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterConfig.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterConfig.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterConfig.java
new file mode 100644
index 0000000..d81f55b
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/FilterConfig.java
@@ -0,0 +1,78 @@
+/*  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.util.Enumeration;
+
+import javax.portlet.PortletContext;
+
+/**
+ * A filter configuration object used by a portlet container 
+ * to pass information to a filter during initialization.
+ *
+ * @since 2.0
+ */
+public interface FilterConfig {
+
+    /**
+     * Returns the filter-name of this filter as defined in the 
+     * portlet deployment descriptor.
+     * 
+     * @return  the filter name
+     */
+    public String getFilterName();
+    
+    /**
+     * Returns a reference to the <code>PortletContext</code> in which the caller is executing.
+     * 
+     * @return  the portlet context
+     */
+    public PortletContext getPortletContext();
+    
+    /**
+     * Returns a String containing the value of the named 
+     * initialization parameter, or <code>null</code> if the parameter does not exist.
+     * <p>
+     * Initialization parameters are defined in the portlet deployment descriptor.
+     * 
+     * @param name  the name of the initialization parameter to return
+     * @return  initialization parameter, or <code>null</code> if the parameter does not exist.  
+     */
+    public String getInitParameter(String name);
+    
+    /**
+     * Returns the names of the filter's initialization parameters 
+     * as an Enumeration of String objects, or an empty Enumeration 
+     * if the filter has no initialization parameters.
+     * <p>
+     * Initialization parameters are defined in the portlet deployment descriptor.
+     * 
+     * @return the names of the filter's initialization parameters, 
+     *         or an empty Enumeration if the filter has no initialization parameters.
+     */
+    public Enumeration<String> getInitParameterNames();
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletFilter.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletFilter.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletFilter.java
new file mode 100644
index 0000000..ec12fb6
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletFilter.java
@@ -0,0 +1,74 @@
+/*  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.PortletException;
+
+/**
+ * The <code>PortletFilter</code> is the base interface for all portlet filters.
+ * It provides the lifecycle methods <code>init</code> and <code>destroy</code>
+ * for putting a portlet filter into and out of service.
+ *
+ * @since 2.0
+ */
+public interface PortletFilter {
+
+    /**
+     * Called by the portlet container to indicate to a filter
+     * that it is being placed into service. The portlet container 
+     * calls the init method exactly once after instantiating the filter. 
+     * The init method must complete successfully before the filter 
+     * is asked to do any filtering work.
+     * <p>
+     * The portlet container cannot place the filter into service if the init method either
+     * <ul>
+     *   <li>throws a PortletException</li>
+     *   <li>does not return within a time period defined by the portlet container</li>
+     * </ul>
+     * 
+     * @param filterConfig    the filter configuration data defined 
+     *                        in the portlet deployment descriptor
+     * @throws PortletException  if an error occurs in the filter initialization
+     */
+    public void init(FilterConfig filterConfig) throws PortletException;
+
+    
+    /**
+     * Called by the portlet container to indicate to a filter that it is 
+     * being taken out of service. This method is only called once all threads 
+     * within the filter's <code>doFilter</code> method have exited or 
+     * after a timeout period has passed. 
+     * <p>
+     * After the portlet container calls this method, it will not call the 
+     * <code>doFilter</code> method again on this instance of the filter.
+     * <p>
+     * This method gives the filter an opportunity to clean up any resources 
+     * that are being held (for example, memory, file handles, threads) and 
+     * make sure that any persistent state is synchronized with the 
+     * filter's current state in memory.
+     */
+    public void destroy();
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletRequestWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
new file mode 100644
index 0000000..7245eee
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
@@ -0,0 +1,402 @@
+/*  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.security.Principal;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.portlet.PortalContext;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletPreferences;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletSession;
+import javax.portlet.WindowState;
+import javax.servlet.http.Cookie;
+
+/**
+ * The <code>PortletRequestWrapper</code> provides a convenient 
+ * implementation of the <code>PortletRequest</code> interface 
+ * and is extended by other request wrappers.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped request object.
+ *
+ * @since 2.0
+ * @see PortletRequest
+ */
+public class PortletRequestWrapper implements PortletRequest {
+
+    PortletRequest request;
+    
+    /** 
+     * Require having a request for constructing
+     * the wrapper.
+     *
+     */
+    private PortletRequestWrapper() {
+    }
+    
+    
+    /**
+     * Creates an <code>PortletRequest</code> adaptor 
+     * wrapping the given request object.
+     * 
+     * @param request  the portlet request to wrap
+     * @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");
+
+        this.request = request;
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getAttribute(String name)</code> on the wrapped request object.
+     */
+    public Object getAttribute(String name) {
+        return request.getAttribute(name);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getAttributeNames()</code> on the wrapped request object.
+     */
+    public Enumeration<String> getAttributeNames() {
+        return request.getAttributeNames();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getAuthType()</code> on the wrapped request object.
+     */
+    public String getAuthType() {
+        return request.getAuthType();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getContextPath()</code> on the wrapped request object.
+     */
+    public String getContextPath() {
+        return request.getContextPath();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getLocale()</code> on the wrapped request object.
+     */
+    public Locale getLocale() {
+        return request.getLocale();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getLocales()</code> on the wrapped request object.
+     */
+    public Enumeration<Locale> getLocales() {
+        return request.getLocales();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getParameter(String name)</code> on the wrapped request object.
+     */
+    public String getParameter(String name) {
+        return request.getParameter(name);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getParameterMap()</code> on the wrapped request object.
+     */
+    public Map<String, String[]> getParameterMap() {
+        return request.getParameterMap();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getParameterNames()</code> on the wrapped request object.
+     */
+    public Enumeration<String> getParameterNames() {
+        return request.getParameterNames();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getParameterValues(name)</code> on the wrapped request object.
+     */
+    public String[] getParameterValues(String name) {
+        return request.getParameterValues(name);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPortalContext()</code> on the wrapped request object.
+     */
+    public PortalContext getPortalContext() {
+        return request.getPortalContext();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPortletMode()</code> on the wrapped request object.
+     */
+    public PortletMode getPortletMode() {
+        return request.getPortletMode();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPortletSession()</code> on the wrapped request object.
+     */
+    public PortletSession getPortletSession() {
+        return request.getPortletSession();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPortletSession(create)</code> on the wrapped request object.
+     */
+    public PortletSession getPortletSession(boolean create) {
+        return request.getPortletSession(create);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPreferences()</code> on the wrapped request object.
+     */
+    public PortletPreferences getPreferences() {
+        return request.getPreferences();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getProperteis(name)</code> on the wrapped request object.
+     */
+    public Enumeration<String> getProperties(String name) {
+        return request.getProperties(name);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getProperty(name)</code> on the wrapped request object.
+     */
+    public String getProperty(String name) {
+        return request.getProperty(name);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getPropertyNames()</code> on the wrapped request object.
+     */
+    public Enumeration<String> getPropertyNames() {
+        return request.getPropertyNames();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getRemoteUser()</code> on the wrapped request object.
+     */
+    public String getRemoteUser() {
+        return request.getRemoteUser();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getRequestedSessionId()</code> on the wrapped request object.
+     */
+    public String getRequestedSessionId() {
+        return request.getRequestedSessionId();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getResponseContentType()</code> on the wrapped request object.
+     */
+    public String getResponseContentType() {
+        return request.getResponseContentType();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getResponseContentTypes()</code> on the wrapped request object.
+     */
+    public Enumeration<String> getResponseContentTypes() {
+        return request.getResponseContentTypes();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getScheme()</code> on the wrapped request object.
+     */
+    public String getScheme() {
+        return request.getScheme();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getServerName()</code> on the wrapped request object.
+     */
+    public String getServerName() {
+        return request.getServerName();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getServerPort()</code> on the wrapped request object.
+     */
+    public int getServerPort() {
+        return request.getServerPort();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getUserPrincipal()</code> on the wrapped request object.
+     */
+    public Principal getUserPrincipal() {
+        return request.getUserPrincipal();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getWindowId()</code> on the wrapped request object.
+     */
+    public String getWindowID() {
+        return request.getWindowID();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>getWindowState()</code> on the wrapped request object.
+     */
+    public WindowState getWindowState() {
+        return request.getWindowState();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>isPortletModeAllowed(mode)</code> on the wrapped request object.
+     */
+    public boolean isPortletModeAllowed(PortletMode mode) {
+        return request.isPortletModeAllowed(mode);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>isRequestedSessionIdValid()</code> on the wrapped request object.
+     */
+    public boolean isRequestedSessionIdValid() {
+        return request.isRequestedSessionIdValid();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>isSecure()</code> on the wrapped request object.
+     */
+    public boolean isSecure() {
+        return request.isSecure();
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>isUserInRole(role)</code> on the wrapped request object.
+     */
+    public boolean isUserInRole(String role) {
+        return request.isUserInRole(role);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>isWindowStateAllowed(state)</code> on the wrapped request object.
+     */
+    public boolean isWindowStateAllowed(WindowState state) {
+        return request.isWindowStateAllowed(state);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <code>removeAttribute(name)</code> on the wrapped request object.
+     */
+    public void removeAttribute(String name) {
+        request.removeAttribute(name);
+    }
+
+    /**
+     * The default behavior of this method is to call 
+     * <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;
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>getCookies()</code> on the wrapped request object.
+     */
+    public Cookie[] getCookies() {
+    	return request.getCookies();
+    }
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>getPrivateParameterMap()</code> on the wrapped request object.
+     */
+	public Map<String, String[]> getPrivateParameterMap() {
+		return request.getPrivateParameterMap();
+	}
+
+    /**
+     *  The default behavior of this method is to call 
+     * <code>getPublicParameterMap()</code> on the wrapped request object.
+     */
+	public Map<String, String[]> getPublicParameterMap() {
+		return request.getPublicParameterMap();
+	}
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletResponseWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletResponseWrapper.java
new file mode 100644
index 0000000..b9df9ee
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/PortletResponseWrapper.java
@@ -0,0 +1,144 @@
+/*  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.PortletResponse;
+import javax.servlet.http.Cookie;
+
+/**
+ * The <code>PortletResponseWrapper</code> provides a convenient 
+ * implementation of the <code>PortletResponse</code> interface 
+ * and is extended by other response wrappers.
+ * This class implements the Wrapper or Decorator pattern. 
+ * Methods default to calling through to the wrapped response object.
+ *
+ * @since 2.0
+ * @see PortletResponse
+ */
+public class PortletResponseWrapper implements PortletResponse {
+
+		PortletResponse response;
+	    
+	    /** 
+	     * Require having a response for constructing
+	     * the wrapper.
+	     *
+	     */
+	    private PortletResponseWrapper() {
+	    }
+	    
+	    /**
+	     * Creates an <code>ActionResponse</code> adaptor 
+	     * wrapping the given response object.
+	     * 
+	     * @param response  the action response to wrap
+	     * @throws java.lang.IllegalArgumentException if the response is <code>null</code>
+	     */
+	    public PortletResponseWrapper(PortletResponse 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>addProperty(key, value)</code> on the wrapped response object.
+	     */
+	    public void addProperty(String key, String value) {
+	        response.addProperty(key, value);
+	    }
+
+	    /**
+	     * The default behavior of this method is to call 
+	     * <code>encodeURL(path)</code> on the wrapped response object.
+	     */
+	    public String encodeURL(String path) {
+	        return response.encodeURL(path);
+	    }
+
+	    /**
+	     * The default behavior of this method is to call 
+	     * <code>getNamespace()</code> on the wrapped response object.
+	     */
+	    public String getNamespace() {
+	        return response.getNamespace();
+	    }
+
+	    /**
+	     * The default behavior of this method is to call 
+	     * <code>setProperty(key, value)</code> on the wrapped response object.
+	     */
+	    public void setProperty(String key, String value) {
+	        response.setProperty(key, value);
+	    }
+
+	    /**
+	     * Return the wrapped response object.
+	     * 
+	     * @return the wrapped response
+	     */
+	    public PortletResponse 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(PortletResponse 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>addProperty()</code> on the wrapped response object.
+	     */
+	    public void addProperty(String key, org.w3c.dom.Element element) {
+	        response.addProperty(key, element);
+	    }
+
+	    /**
+	     *  The default behavior of this method is to call 
+	     * <code>createElement()</code> on the wrapped response object.
+	     */
+	    public org.w3c.dom.Element createElement(String tagName) {
+	        return response.createElement(tagName);
+	    }
+
+	    /**
+	     *  The default behavior of this method is to call 
+	     * <code>addProperty()</code> on the wrapped response object.
+	     */
+	    public void addProperty(Cookie cookie) {
+	        response.addProperty(cookie);
+	    }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java
new file mode 100644
index 0000000..86b4e23
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderFilter.java
@@ -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;
+        
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
new file mode 100644
index 0000000..1858feb
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderRequestWrapper.java
@@ -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();
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
new file mode 100644
index 0000000..b39dda9
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
@@ -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();
+	}
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java
new file mode 100644
index 0000000..96babc3
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceFilter.java
@@ -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;
+    
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
new file mode 100644
index 0000000..2bf5edb
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
@@ -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();
+    }
+    
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
new file mode 100644
index 0000000..bc7e379
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
@@ -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();
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/package-info.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/package-info.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/package-info.java
new file mode 100644
index 0000000..05c1c01
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/filter/package-info.java
@@ -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

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/package-info.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/package-info.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/package-info.java
new file mode 100644
index 0000000..561b69f
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/package-info.java
@@ -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;