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 2015/02/18 18:35:08 UTC

[1/5] portals-pluto git commit: Implemented the new parameters objects.

Repository: portals-pluto
Updated Branches:
  refs/heads/V3Prototype 355084b02 -> 7b13130ce


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/ResourceParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/ResourceParameters.java b/portlet-api/src/main/java/javax/portlet/ResourceParameters.java
new file mode 100644
index 0000000..5f2c7aa
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/ResourceParameters.java
@@ -0,0 +1,60 @@
+/*  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;
+
+
+/**
+ * <div class="changed_added_3_0">
+ * Resource parameters are additional portlet parameters added to the 
+ * URL that extend the state information provided by 
+ * the render parameters.
+ * <p>
+ * {@link PortletParameters} provides a description of the parameter concept.
+ * </div>
+ * @see     PortletParameters
+ * @see     MutableResourceParameters
+ * @see     ResourceRequest
+ * @see     ResourceURL
+ * @since   3.0
+ */
+public interface ResourceParameters extends PortletParameters
+{
+
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Returns a <code>MutableResourceParameters</code> object encapsulating a copy of the same
+    * parameters as the original object.
+    * Changing a mutable copy will not influence the source object. 
+    * </div>
+    * 
+    * @return Mutable clone of ResourceParameters object
+    * 
+    * @since  3.0
+    */
+   
+   public MutableResourceParameters clone();
+
+}


[2/5] portals-pluto git commit: Implemented the new parameters objects.

Posted by ms...@apache.org.
Implemented the new parameters objects.


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/ab7f5522
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/ab7f5522
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/ab7f5522

Branch: refs/heads/V3Prototype
Commit: ab7f5522871af31811775f7a31f45af3451c9a2f
Parents: 355084b
Author: Scott Nicklous <ms...@apache.org>
Authored: Wed Feb 18 07:23:54 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Wed Feb 18 07:23:54 2015 +0100

----------------------------------------------------------------------
 .../pluto/container/PortletURLProvider.java     |  49 ++++
 .../container/impl/ActionParametersImpl.java    |  77 ++++++
 .../impl/MutableActionParametersImpl.java       |  73 ++++++
 .../impl/MutablePortletParametersImpl.java      | 248 +++++++++++++++++++
 .../impl/MutableRenderParametersImpl.java       | 136 ++++++++++
 .../impl/MutableResourceParametersImpl.java     |  73 ++++++
 .../container/impl/PortletParametersImpl.java   | 161 ++++++++++++
 .../container/impl/RenderParametersImpl.java    |  97 ++++++++
 .../container/impl/ResourceParametersImpl.java  |  76 ++++++
 .../container/PortletURLProviderImpl.java       |  31 ++-
 .../driver/url/PortletParameterFactory.java     | 211 +++++++++++-----
 .../java/javax/portlet/ActionParameters.java    |  61 +++++
 .../main/java/javax/portlet/MimeResponse.java   |  41 ++-
 .../javax/portlet/MutableActionParameters.java  |  56 +++++
 .../javax/portlet/MutablePortletParameters.java | 203 +++++++++++++++
 .../javax/portlet/MutableRenderParameters.java  |  75 ++++++
 .../portlet/MutableResourceParameters.java      |  55 ++++
 .../java/javax/portlet/PortletParameters.java   | 232 +++++++++++++++++
 .../java/javax/portlet/RenderParameters.java    |  78 ++++++
 .../java/javax/portlet/ResourceParameters.java  |  60 +++++
 20 files changed, 2023 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container-api/src/main/java/org/apache/pluto/container/PortletURLProvider.java
----------------------------------------------------------------------
diff --git a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletURLProvider.java b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletURLProvider.java
index ae211ca..310c018 100644
--- a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletURLProvider.java
+++ b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletURLProvider.java
@@ -38,6 +38,55 @@ public interface PortletURLProvider {
     enum TYPE { ACTION, RENDER, RESOURCE };
     
     TYPE getType();
+    
+    // For JSR 362 parameter handling
+    enum ParamType {
+       ACTION,
+       RENDER,
+       RESOURCE,
+    }
+
+    /**
+     * Returns a parameter map for the specified window and type.
+     * 
+     * V3.0 method.
+     * 
+     * @param windowId
+     * @param type
+     * @return
+     */
+    Map<String, String[]> getParameterMap(String windowId, ParamType type);
+
+    /**
+     * Sets a parameter of the given type for the window.
+     * 
+     * V3 method.
+     * 
+     * @param windowId
+     * @param name
+     * @param type
+     * @param strings
+     */
+    void setParameter(String windowId, String name, ParamType type, String[] strings);
+
+    /**
+     * Removes the given parameter
+     * 
+     * V3 method.
+     * 
+     * @param windowId
+     * @param name
+     * @param type
+     */
+    void removeParameter(String windowId, String name, ParamType type);
+
+    /**
+     * Gets the public render parameter names for this window.
+     * 
+     * @param windowId
+     * @return
+     */
+    Set<String> getPublicParameterNames(String windowId);
 
     /**
      * Sets the new portlet mode at the URL. If no mode is set at the URL the

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java
new file mode 100644
index 0000000..12318d6
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java
@@ -0,0 +1,77 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.container.impl;
+
+import java.util.Map;
+
+import javax.portlet.ActionParameters;
+import javax.portlet.MutableActionParameters;
+import javax.portlet.MutablePortletParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author nick
+ *
+ */
+public class ActionParametersImpl extends PortletParametersImpl implements
+      ActionParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(ActionParametersImpl.class);
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+
+   /**
+    * For creating a new object from scratch
+    * 
+    * @param urlProvider
+    * @param windowId
+    */
+   public ActionParametersImpl(PortletURLProvider urlProvider, String windowId) {
+      super(urlProvider, windowId, ParamType.ACTION);
+   }
+   
+   /**
+    * For cloning an object
+    * 
+    * @param params
+    * @param windowId
+    */
+   protected ActionParametersImpl(Map<String, String[]> params, String windowId) {
+      super(params, windowId, ParamType.ACTION);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#mutableClone()
+    */
+   @Override
+   public MutableActionParameters clone() {
+      if (isTrace) {
+         LOGGER.debug("Window ID: " + windowId + ", ParameterType: " + type);
+      }
+
+      // create a mutable clone, breaking link to the underlying URL provider.
+      MutableActionParametersImpl map = new MutableActionParametersImpl(params, windowId);
+      
+      return map;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java
new file mode 100644
index 0000000..aa9f3db
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java
@@ -0,0 +1,73 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.container.impl;
+
+import java.util.Map;
+
+import javax.portlet.MutableActionParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author nick
+ *
+ */
+public class MutableActionParametersImpl extends MutablePortletParametersImpl
+      implements MutableActionParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(MutableActionParametersImpl.class);
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+
+   /**
+    * @param urlProvider
+    * @param windowId
+    * @param type
+    */
+   public MutableActionParametersImpl(PortletURLProvider urlProvider, String windowId) {
+      super(urlProvider, windowId, ParamType.ACTION);
+   }
+
+   /**
+    * @param params
+    * @param windowId
+    * @param type
+    */
+   public MutableActionParametersImpl(Map<String, String[]> params, String windowId) {
+      super(params, windowId, ParamType.ACTION);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#mutableClone()
+    */
+   @Override
+   public MutableActionParameters clone() {
+      if (isTrace) {
+         LOGGER.debug("Window ID: " + windowId + ", ParameterType: " + type);
+      }
+
+      // create a mutable clone, breaking link to the underlying URL provider.
+      MutableActionParametersImpl map = new MutableActionParametersImpl(params, windowId);
+      
+      return map;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java
new file mode 100644
index 0000000..3100ff9
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java
@@ -0,0 +1,248 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.pluto.container.impl;
+
+import java.util.Arrays;
+import java.util.Map;
+
+import javax.portlet.MutablePortletParameters;
+import javax.portlet.PortletParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author nick
+ * 
+ */
+public class MutablePortletParametersImpl extends
+      PortletParametersImpl implements MutablePortletParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(MutablePortletParametersImpl.class);
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+
+   /**
+    * Constructor used by extending classes for instantiation
+    * 
+    * @param urlProvider
+    * @param windowId
+    * @param type
+    */
+   protected MutablePortletParametersImpl(PortletURLProvider urlProvider,
+         String windowId, ParamType type) {
+      super(urlProvider, windowId, type);
+   }
+   
+   /**
+    * Copy constructor used during cloning
+    * 
+    * @param params
+    * @param windowId
+    * @param type
+    */
+   protected MutablePortletParametersImpl(Map<String, String[]> params, String windowId, ParamType type) {
+      super(params, windowId, type);
+   }
+
+   /*
+    * (non-Javadoc)
+    * 
+    * @see javax.portlet.MutablePortletParameters#setValue(java.lang.String,
+    * java.lang.String)
+    */
+   public String setValue(String name, String value) {
+      checkNull("name", name);
+      String[] vals = params.get(name);
+      String val = (vals == null) ? null : vals[0];
+      
+      params.put(name, new String[]{value});
+      
+      // If we're not a clone, update source URL 
+      if (urlProvider != null) {
+         urlProvider.setParameter(windowId, name, type, new String[]{value});
+      }
+      
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", Name: ").append(name)
+            .append(", Old Value: ").append(val)
+            .append(", New Value: ").append(value);
+         LOGGER.debug(txt.toString());
+      }
+      
+      return val;
+   }
+
+   /*
+    * (non-Javadoc)
+    * 
+    * @see javax.portlet.MutablePortletParameters#setValues(java.lang.String,
+    * java.lang.String[])
+    */
+   public String[] setValues(String name, String... values) {
+      checkNull("name", name);
+      String[] vals = params.get(name);
+      
+      if (values == null) {
+         values = new String[]{null};
+      }
+      
+      params.put(name, values.clone());
+      
+      // If we're not a clone, update source URL 
+      if (urlProvider != null) {
+         urlProvider.setParameter(windowId, name, type, values.clone());
+      }
+      
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", Name: ").append(name)
+            .append(", Old Value: ").append(Arrays.toString(vals))
+            .append(", New Value: ").append(Arrays.toString(values));
+         LOGGER.debug(txt.toString());
+      }
+      
+      return vals;
+   }
+
+   /*
+    * (non-Javadoc)
+    * 
+    * @see
+    * javax.portlet.MutablePortletParameters#removeParameter(java.lang.String)
+    */
+   public boolean removeParameter(String name) {
+      checkNull("name", name);
+      boolean isContains = params.containsKey(name);
+      
+      if (isContains) {
+         params.remove(name);
+
+         // If we're not a clone, update source URL 
+         if (urlProvider != null) {
+            urlProvider.removeParameter(windowId, name, type);
+         }
+      }
+      
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", Name: ").append(name)
+            .append(", Removed: ").append(isContains);
+         LOGGER.debug(txt.toString());
+      }
+      
+      return isContains;
+   }
+
+   /*
+    * (non-Javadoc)
+    * 
+    * @see
+    * javax.portlet.MutablePortletParameters#set(javax.portlet.PortletParameters
+    * )
+    */
+   public MutablePortletParameters set(PortletParameters inParams) {
+      checkNull("params", inParams);
+      MutablePortletParameters oldparms = this.clone();
+      int ctr = 0;
+      
+      // delete all parameters from this map not contained in input map
+      boolean removed = params.keySet().retainAll(inParams.getNames());
+      
+      for (String name : inParams.getNames()) {
+         String[] vals = inParams.getValues(name).clone();
+         ctr++;
+         params.put(name, vals);
+
+         if (urlProvider != null) {
+            urlProvider.setParameter(windowId, name, type, vals);
+         }
+      }
+      
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", Removed values from old map:  ").append(removed)
+            .append(", set ").append(ctr).append(" values.");
+         LOGGER.debug(txt.toString());
+      }
+ 
+      return oldparms;
+   }
+
+   /*
+    * (non-Javadoc)
+    * 
+    * @see
+    * javax.portlet.MutablePortletParameters#add(javax.portlet.PortletParameters
+    * )
+    */
+   public MutablePortletParameters add(PortletParameters inParams) {
+      checkNull("params", inParams);
+      MutablePortletParameters oldparms = this.clone();
+      int ctr = 0;
+      
+      for (String name : inParams.getNames()) {
+         String[] vals = inParams.getValues(name).clone();
+         ctr++;
+         params.put(name, vals);
+
+         if (urlProvider != null) {
+            urlProvider.setParameter(windowId, name, type, vals);
+         }
+      }
+      
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", added ").append(ctr).append(" values.");
+         LOGGER.debug(txt.toString());
+      }
+ 
+      return oldparms;
+   }
+
+   /*
+    * (non-Javadoc)
+    * 
+    * @see javax.portlet.MutablePortletParameters#clear()
+    */
+   public void clear() {
+      int ctr = params.size();
+
+      if (urlProvider != null) {
+         for (String name : params.keySet()) {
+            urlProvider.removeParameter(windowId, name, type);
+         }
+      }
+      params.clear();
+
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", removed ").append(ctr).append(" values.");
+         LOGGER.debug(txt.toString());
+      }
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
new file mode 100644
index 0000000..72e47ea
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
@@ -0,0 +1,136 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.container.impl;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.portlet.MutableRenderParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author nick
+ *
+ */
+public class MutableRenderParametersImpl extends MutablePortletParametersImpl
+      implements MutableRenderParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(MutableRenderParametersImpl.class);
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+   
+   private final Set<String> prpNames;
+
+   /**
+    * @param urlProvider
+    * @param windowId
+    * @param type
+    */
+   public MutableRenderParametersImpl(PortletURLProvider urlProvider, String windowId) {
+      super(urlProvider, windowId, ParamType.ACTION);
+      prpNames = urlProvider.getPublicParameterNames(windowId);
+   }
+
+   /**
+    * @param params
+    * @param windowId
+    * @param type
+    */
+   public MutableRenderParametersImpl(Map<String, String[]> params, String windowId, Set<String> prpNames) {
+      super(params, windowId, ParamType.ACTION);
+      this.prpNames = new HashSet<String>(prpNames);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#mutableClone()
+    */
+   @Override
+   public MutableRenderParameters clone() {
+      if (isTrace) {
+         LOGGER.debug("Window ID: " + windowId + ", ParameterType: " + type);
+      }
+
+      // create a mutable clone, breaking link to the underlying URL provider.
+      MutableRenderParametersImpl map = new MutableRenderParametersImpl(params, windowId, prpNames);
+      
+      return map;
+   }
+
+   public void clearPrivate() {
+      int ctr = params.size();
+
+      if (urlProvider != null) {
+         for (String name : params.keySet()) {
+            if (!prpNames.contains(name)) {
+               urlProvider.removeParameter(windowId, name, type);
+            }
+         }
+      }
+      params.keySet().retainAll(prpNames);
+      ctr -= params.size();
+
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", removed ").append(ctr).append(" values.");
+         LOGGER.debug(txt.toString());
+      }
+   }
+
+   public void clearPublic() {
+      int ctr = params.size();
+
+      if (urlProvider != null) {
+         for (String name : params.keySet()) {
+            if (prpNames.contains(name)) {
+               urlProvider.removePublicRenderParameter(windowId, name);
+            }
+         }
+      }
+      params.keySet().removeAll(prpNames);
+      ctr -= params.size();
+
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", removed ").append(ctr).append(" values.");
+         LOGGER.debug(txt.toString());
+      }
+   }
+
+   public boolean isPublic(String name) {
+      checkNull("name", name);
+      boolean isPublic = prpNames.contains(name); 
+      
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", Name: ").append(name)
+            .append(", isPublic: ").append(isPublic);
+         LOGGER.debug(txt.toString());
+      }
+      
+      return isPublic;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java
new file mode 100644
index 0000000..4ce2d27
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java
@@ -0,0 +1,73 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.container.impl;
+
+import java.util.Map;
+
+import javax.portlet.MutableResourceParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author nick
+ *
+ */
+public class MutableResourceParametersImpl extends MutablePortletParametersImpl
+      implements MutableResourceParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(MutableResourceParametersImpl.class);
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+
+   /**
+    * @param urlProvider
+    * @param windowId
+    * @param type
+    */
+   public MutableResourceParametersImpl(PortletURLProvider urlProvider, String windowId) {
+      super(urlProvider, windowId, ParamType.RESOURCE);
+   }
+
+   /**
+    * @param params
+    * @param windowId
+    * @param type
+    */
+   public MutableResourceParametersImpl(Map<String, String[]> params, String windowId) {
+      super(params, windowId, ParamType.RESOURCE);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#mutableClone()
+    */
+   @Override
+   public MutableResourceParameters clone() {
+      if (isTrace) {
+         LOGGER.debug("Window ID: " + windowId + ", ParameterType: " + type);
+      }
+
+      // create a mutable clone, breaking link to the underlying URL provider.
+      MutableResourceParametersImpl map = new MutableResourceParametersImpl(params, windowId);
+      
+      return map;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java
new file mode 100644
index 0000000..fc0b2b8
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java
@@ -0,0 +1,161 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.container.impl;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.portlet.MutablePortletParameters;
+import javax.portlet.PortletParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author Scott Nicklous
+ *
+ */
+public abstract class PortletParametersImpl implements PortletParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(PortletParametersImpl.class);
+   private static final boolean  isDebug    = LOGGER.isDebugEnabled();
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+   
+   protected final PortletURLProvider  urlProvider;
+   protected final String              windowId;
+   protected final ParamType           type;
+
+   protected final Map<String, String[]>  params;
+   
+   /**
+    * Regular constructor used by extending classes for instantiation.
+    * @param urlProvider
+    * @param windowId
+    * @param type
+    */
+   protected PortletParametersImpl(PortletURLProvider urlProvider, String windowId, ParamType type) {
+      this.urlProvider = urlProvider;
+      this.windowId = windowId;
+      this.type = type;
+      this.params = this.urlProvider.getParameterMap(windowId, type);
+      if (isDebug) {
+         LOGGER.debug("Created PortletParameters object for window: " + windowId + ", Type: " + type);
+      }
+   }
+   
+   /**
+    * Copy constructor used when cloning. Use of this constructor disconnects the 
+    * object from the underlying URL provider.
+    * 
+    * @param params
+    * @param windowId
+    * @param type
+    */
+   protected PortletParametersImpl(Map<String, String[]> params, String windowId, ParamType type) {
+      this.urlProvider = null;
+      this.type = type;
+      this.windowId = windowId;
+      
+      this.params = new HashMap<String, String[]>();
+      for (String name : params.keySet()) {
+         this.params.put(name, params.get(name).clone());
+      }
+   }
+   
+   /**
+    * Throws exception if argument is null.
+    * @param msg
+    * @param vals
+    */
+   protected void checkNull(String msg, Object... vals) {
+      if (vals == null) {
+         throw new IllegalArgumentException("Argument " + msg + " cannot be null.");
+      }
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#getValue(java.lang.String)
+    */
+   public String getValue(String name) {
+      checkNull("name", name);
+      String[] vals = params.get(name);
+      String val = (vals == null) ? null : vals[0];
+      if (isTrace) {
+         LOGGER.debug("Name: " + name + ", Value: " + val);
+      }
+      return val;
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#getNames()
+    */
+   public Set<? extends String> getNames() {
+      HashSet<String> names = new HashSet<String>();
+      for (String name : params.keySet()) {
+         names.add(name);
+      }
+      if (isTrace) {
+         LOGGER.debug("Parameter Names: " + names.toString());
+      }
+      return names;
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#getValues(java.lang.String)
+    */
+   public String[] getValues(String name) {
+      checkNull("name", name);
+      String[] vals = params.get(name).clone();
+      if (isTrace) {
+         LOGGER.debug("Name: " + name + ", Values: " + Arrays.toString(vals));
+      }
+      return vals;
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#isEmpty()
+    */
+   public boolean isEmpty() {
+      boolean e = params.isEmpty();
+      if (isTrace) {
+         LOGGER.debug("Parameters is empty: " + e);
+      }
+      return e;
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#mutableClone()
+    */
+   public MutablePortletParameters clone() {
+      if (isTrace) {
+         LOGGER.debug("Window ID: " + windowId + ", ParameterType: " + type);
+      }
+
+      // create a mutable clone, breaking link to the underlying URL provider.
+      MutablePortletParametersImpl mpp = new MutablePortletParametersImpl(params, windowId, type);
+      
+      return mpp;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java
new file mode 100644
index 0000000..97d0a3a
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java
@@ -0,0 +1,97 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.container.impl;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.portlet.RenderParameters;
+import javax.portlet.MutableRenderParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author nick
+ *
+ */
+public class RenderParametersImpl extends PortletParametersImpl implements
+      RenderParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(RenderParametersImpl.class);
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+   
+   private final Set<String> prpNames;
+
+   /**
+    * For creating a new object from scratch
+    * 
+    * @param urlProvider
+    * @param windowId
+    */
+   public RenderParametersImpl(PortletURLProvider urlProvider, String windowId) {
+      super(urlProvider, windowId, ParamType.RENDER);
+      prpNames = urlProvider.getPublicParameterNames(windowId);
+   }
+   
+   /**
+    * For cloning an object
+    * 
+    * @param params
+    * @param windowId
+    */
+   protected RenderParametersImpl(Map<String, String[]> params, String windowId, Set<String> prpNames) {
+      super(params, windowId, ParamType.RENDER);
+      this.prpNames = new HashSet<String>(prpNames);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#mutableClone()
+    */
+   @Override
+   public MutableRenderParameters clone() {
+      if (isTrace) {
+         LOGGER.debug("Window ID: " + windowId + ", ParameterType: " + type);
+      }
+
+      // create a mutable clone, breaking link to the underlying URL provider.
+      MutableRenderParametersImpl map = new MutableRenderParametersImpl(params, windowId, prpNames);
+      
+      return map;
+   }
+
+   public boolean isPublic(String name) {
+      checkNull("name", name);
+      boolean isPublic = prpNames.contains(name); 
+      
+      if (isTrace) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Window ID: ").append(windowId)
+            .append(", Name: ").append(name)
+            .append(", isPublic: ").append(isPublic);
+         LOGGER.debug(txt.toString());
+      }
+      
+      return isPublic;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java
new file mode 100644
index 0000000..d490324
--- /dev/null
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java
@@ -0,0 +1,76 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.container.impl;
+
+import java.util.Map;
+
+import javax.portlet.MutableResourceParameters;
+import javax.portlet.ResourceParameters;
+
+import org.apache.pluto.container.PortletURLProvider;
+import org.apache.pluto.container.PortletURLProvider.ParamType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author nick
+ *
+ */
+public class ResourceParametersImpl extends PortletParametersImpl implements
+      ResourceParameters {
+   private static final Logger   LOGGER     = LoggerFactory.getLogger(ResourceParametersImpl.class);
+   private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+
+   /**
+    * For creating a new object from scratch
+    * 
+    * @param urlProvider
+    * @param windowId
+    */
+   public ResourceParametersImpl(PortletURLProvider urlProvider, String windowId) {
+      super(urlProvider, windowId, ParamType.RESOURCE);
+   }
+   
+   /**
+    * For cloning an object
+    * 
+    * @param params
+    * @param windowId
+    */
+   protected ResourceParametersImpl(Map<String, String[]> params, String windowId) {
+      super(params, windowId, ParamType.RESOURCE);
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.PortletParameters#mutableClone()
+    */
+   @Override
+   public MutableResourceParameters clone() {
+      if (isTrace) {
+         LOGGER.debug("Window ID: " + windowId + ", ParameterType: " + type);
+      }
+
+      // create a mutable clone, breaking link to the underlying URL provider.
+      MutableResourceParametersImpl map = new MutableResourceParametersImpl(params, windowId);
+      
+      return map;
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
index 92bcd3d..fa95b7c 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
@@ -56,13 +56,22 @@ public class PortletURLProviderImpl implements PortletURLProvider {
    private final String                        window;
    private Map<String, List<String>>           properties;
 
-   // Hack: called to force class loading in Container thread
+   // called to force class loading in Container thread
    protected static final void load() {
       if (isDebug) {
          LOGGER.debug("Loaded.");
       }
    };
    
+   private final static HashMap<PortletURLProvider.ParamType, String> paramTypeMap  = 
+         new HashMap<PortletURLProvider.ParamType, String>();
+   static {
+      paramTypeMap.put(ParamType.ACTION, PortalURLParameter.PARAM_TYPE_ACTION);
+      paramTypeMap.put(ParamType.RENDER, PortalURLParameter.PARAM_TYPE_RENDER);
+      paramTypeMap.put(ParamType.RESOURCE, PortalURLParameter.PARAM_TYPE_RESOURCE);
+   }
+
+   
    public PortletURLProviderImpl(PortalURL url, TYPE type,
          PortletWindow portletWindow) {
       this.url = url.clone();
@@ -278,4 +287,24 @@ public class PortletURLProviderImpl implements PortletURLProvider {
       paramFactory.removeParameter(windowId, name);
    }
 
+   // V3 method
+   public Map<String, String[]> getParameterMap(String windowId, ParamType type) {
+      return paramFactory.getParameterMap(windowId, paramTypeMap.get(type));
+   }
+
+   // V3 method
+   public void setParameter(String windowId, String name, ParamType type, String[] values) {
+      paramFactory.setParameter(windowId, name, paramTypeMap.get(type), values);
+   }
+
+   // V3Method
+   public void removeParameter(String windowId, String name, ParamType type) {
+      paramFactory.removeParameter(windowId, name, paramTypeMap.get(type));
+   }
+
+   // V3 method
+   public Set<String> getPublicParameterNames(String windowId) {
+      return paramFactory.getPublicParameterNames(windowId);
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortletParameterFactory.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortletParameterFactory.java b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortletParameterFactory.java
index a872478..6738e2c 100644
--- a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortletParameterFactory.java
+++ b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortletParameterFactory.java
@@ -28,9 +28,11 @@ import java.util.Set;
 
 import org.apache.pluto.driver.services.portal.PublicRenderParameterMapper;
 import org.apache.pluto.driver.url.PortalURL.URLType;
+import static org.apache.pluto.driver.url.PortalURLParameter.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * @author Scott Nicklous
  * 
@@ -45,10 +47,6 @@ public class PortletParameterFactory {
    
    PortalURL url;
    
-   HashMap<String, ArrayList<PortalURLParameter>> wid2Render;
-   HashMap<String, ArrayList<PortalURLParameter>> wid2Action;
-   HashMap<String, ArrayList<PortalURLParameter>> wid2Resource;
-   
    static final HashSet<PortalURL.URLType> actionTypes = new HashSet<PortalURL.URLType>();
    static {
       actionTypes.add(URLType.Action);
@@ -67,35 +65,6 @@ public class PortletParameterFactory {
    public PortletParameterFactory(PortalURL url) {
       this.url = url;
    }
-   
-   private void addParam(Map<String, ArrayList<PortalURLParameter>> map, PortalURLParameter parm) {
-      String wid = parm.getWindowId();
-      if (!map.keySet().contains(wid)) {
-         map.put(wid, new ArrayList<PortalURLParameter>());
-      }
-      map.get(wid).add(parm);
-   }
-   
-   /**
-    * process the URL parameters. Do this as late as possible so that 
-    * the servlet rquest parameters get handled properly.
-    */
-   private void processParams() {
-      wid2Render = new HashMap<String, ArrayList<PortalURLParameter>>();
-      wid2Action = new HashMap<String, ArrayList<PortalURLParameter>>();
-      wid2Resource = new HashMap<String, ArrayList<PortalURLParameter>>();
-      
-      for (PortalURLParameter parm : url.getParameters()) {
-         if (parm.getType().equals(PortalURLParameter.PARAM_TYPE_ACTION)) {
-            addParam(wid2Action, parm);
-         } else if (parm.getType().equals(PortalURLParameter.PARAM_TYPE_RESOURCE)) {
-            addParam(wid2Resource, parm);
-         } else {
-            addParam(wid2Render, parm);
-         }
-      }
-
-   }
 
    /**
     * This V2.0 method returns the private parameters for the given window ID.
@@ -112,34 +81,33 @@ public class PortletParameterFactory {
     */
    public Map<String, String[]> getPrivateParameterMap(String windowId) {
       HashMap<String, String[]> parameters = new HashMap<String, String[]>();
-      processParams();
       
       boolean isV3 = url.isVersion3(windowId);
 
       // get the action or resource parameters
       
-      if (wid2Action.containsKey(windowId)) {
-         for (PortalURLParameter parm : wid2Action.get(windowId)) {
-            parameters.put(parm.getName(), parm.getValues().clone());
-         }
-      } else if (wid2Resource.containsKey(windowId)) {
-         for (PortalURLParameter parm : wid2Resource.get(windowId)) {
-            parameters.put(parm.getName(), parm.getValues().clone());
+      for (PortalURLParameter pup : url.getParameters()) {
+         if (pup.getWindowId().equals(windowId)) { 
+            if (pup.getType().equals(PARAM_TYPE_ACTION) || pup.getType().equals(PARAM_TYPE_RESOURCE)) {
+               parameters.put(pup.getName(), pup.getValues().clone());
+            }
          }
       }
       
       // Now merge in the render parameters if we're not dealing with a V2 action
 
       if (isV3 || !actionTypes.contains(url.getType())) {
-         if (wid2Render.containsKey(windowId)) {
-            for (PortalURLParameter parm : wid2Render.get(windowId)) {
-               if (parameters.containsKey(parm.getName())) {
-                  ArrayList<String> vals = 
-                        new ArrayList<String>(Arrays.asList(parameters.get(parm.getName())));
-                  vals.addAll(Arrays.asList(parm.getValues()));
-                  parameters.put(parm.getName(), vals.toArray(new String[0]));
-               } else {
-                  parameters.put(parm.getName(), parm.getValues().clone());
+         for (PortalURLParameter pup : url.getParameters()) {
+            if (pup.getWindowId().equals(windowId)) {
+               if (pup.getType().equals(PARAM_TYPE_RENDER)) {
+                  if (parameters.containsKey(pup.getName())) {
+                     ArrayList<String> vals = 
+                           new ArrayList<String>(Arrays.asList(parameters.get(pup.getName())));
+                     vals.addAll(Arrays.asList(pup.getValues()));
+                     parameters.put(pup.getName(), vals.toArray(new String[0]));
+                  } else {
+                     parameters.put(pup.getName(), pup.getValues().clone());
+                  }
                }
             }
          }
@@ -196,11 +164,11 @@ public class PortletParameterFactory {
    public Map<String, String[]> getResourceRenderParameterMap(String windowId) {
       HashMap<String, String[]> parameters = new HashMap<String, String[]>();
 
-      processParams();
-      
-      if (wid2Render.containsKey(windowId)) {
-         for (PortalURLParameter parm : wid2Render.get(windowId)) {
-            parameters.put(parm.getName(), parm.getValues().clone());
+      for (PortalURLParameter pup : url.getParameters()) {
+         if (pup.getWindowId().equals(windowId)) {
+            if (pup.getType().equals(PARAM_TYPE_RENDER)) {
+               parameters.put(pup.getName(), pup.getValues().clone());
+            }
          }
       }
       
@@ -248,8 +216,7 @@ public class PortletParameterFactory {
    public boolean isPublicRenderParameter(String windowId, String name) {
       PublicRenderParameterMapper prpMapper = url.getPublicRenderParameterMapper();
       if (isDebug) {
-         StringBuilder txt = new StringBuilder(
-               "isPublicRenderParameter Window: ");
+         StringBuilder txt = new StringBuilder("Window: ");
          txt.append(windowId).append(", name: ").append(name);
          LOGGER.debug(txt.toString());
       }
@@ -367,4 +334,134 @@ public class PortletParameterFactory {
          url.removeParameter(pup);
       }
    }
+
+   /**
+    * Gets the parameter map for the window & type
+    * 
+    * @param windowId
+    * @param type
+    * @return
+    */
+   public Map<String, String[]> getParameterMap(String windowId, String type) {
+      HashMap<String, String[]> params = new HashMap<String, String[]>();
+      
+      for (PortalURLParameter pup : url.getParameters()) {
+         if (pup.getWindowId().equals(windowId)) {
+            if (pup.getType().equals(type)) {
+               params.put(pup.getName(), pup.getValues().clone());
+            }
+         }
+      }
+
+      if (type.equals(PARAM_TYPE_RENDER)) {
+         
+         PublicRenderParameterMapper mapper = url.getPublicRenderParameterMapper();
+
+         // Get onl the active (= set) PRPs for the window
+         for (PortalURLPublicParameter prp : mapper.getPRPsForWindow(windowId, true)) {
+            params.put(prp.getName(), prp.getValues().clone());
+         }
+      }
+      
+      if (isDebug) {
+         StringBuilder txt = new StringBuilder("Parameter map for ");
+         txt.append("window ID: ").append(windowId);
+         txt.append(", type: ").append(type);
+         for (String name : params.keySet()) {
+            txt.append("\nName: ").append(name);
+            txt.append(", Values: ").append(Arrays.toString(params.get(name)));
+         }
+         LOGGER.debug(txt.toString());
+      }
+
+      return params;
+   }
+
+   /**
+    * Sets a parameter of a given type for the window
+    * 
+    * @param windowId
+    * @param name
+    * @param type
+    * @param values
+    */
+   public void setParameter(String windowId, String name, String type, String[] values) {
+
+      PublicRenderParameterMapper mapper = url.getPublicRenderParameterMapper();
+      int index = mapper.getIndex(windowId, name);
+      
+      if (type.equals(PARAM_TYPE_RENDER) && (index >= 0)) {
+         mapper.setValues(index, values);
+      } else {
+         PortalURLParameter pup = new PortalURLParameter(windowId, name, values, type);
+         url.setParameter(pup);
+      }
+
+      if (isDebug) {
+         StringBuilder txt = new StringBuilder("Set ");
+         txt.append("name: ").append(name);
+         txt.append(", type: ").append(type);
+         txt.append(", PRP index: ").append(index);
+         txt.append(", window ID: ").append(windowId);
+         txt.append(", Values: ").append(Arrays.toString(values));
+         LOGGER.debug(txt.toString());
+      }
+
+   }
+
+   /**
+    * Removes the parameter of the given type for the window
+    * 
+    * @param windowId
+    * @param name
+    * @param type
+    */
+   public void removeParameter(String windowId, String name, String type) {
+
+      PublicRenderParameterMapper mapper = url.getPublicRenderParameterMapper();
+      int index = mapper.getIndex(windowId, name);
+      
+      if (type.equals(PARAM_TYPE_RENDER) && (index >= 0)) {
+         mapper.setRemoved(index, true);
+      } else {
+         PortalURLParameter pup = new PortalURLParameter(windowId, name, null, type);
+         url.removeParameter(pup);
+      }
+
+      if (isDebug) {
+         StringBuilder txt = new StringBuilder("Removed ");
+         txt.append("name: ").append(name);
+         txt.append(", type: ").append(type);
+         txt.append(", PRP index: ").append(index);
+         txt.append(", window ID: ").append(windowId);
+         LOGGER.debug(txt.toString());
+      }
+
+   }
+
+   /**
+    * Returns a Set containing the public render parameter names for the given
+    * window.
+    * 
+    * @param windowId
+    * @return
+    */
+   public Set<String> getPublicParameterNames(String windowId) {
+      HashSet<String> names = new HashSet<String>();
+
+      PublicRenderParameterMapper mapper = url.getPublicRenderParameterMapper();
+      
+      // get all of the PRP names
+      
+      List<PortalURLPublicParameter> prps = mapper.getPRPsForWindow(windowId, false);
+      for (PortalURLPublicParameter prp : prps) {
+         names.add(prp.getName());
+      }
+      
+      if (isDebug) {
+         LOGGER.debug("Public render parameter names: " + names.toString());
+      }
+
+      return names;
+   }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/ActionParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/ActionParameters.java b/portlet-api/src/main/java/javax/portlet/ActionParameters.java
new file mode 100644
index 0000000..35248ed
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/ActionParameters.java
@@ -0,0 +1,61 @@
+/*  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;
+
+
+/**
+ * <div class="changed_added_3_0">
+ * Action parameters are additional portlet parameters added to the portlet 
+ * URL or provided by the client that extend the state information provided by 
+ * the render parameters.
+ * The client can supply additional action parameters when a form is submitted, for example.
+ * <p>
+ * {@link PortletParameters} provides a description of the parameter concept.
+ * </div>
+ * @see     PortletParameters
+ * @see     MutableActionParameters
+ * @see     ActionRequest
+ * @see     ActionURL
+ * @since   3.0
+ */
+public interface ActionParameters extends PortletParameters
+{
+
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Returns a <code>MutableActionParameters</code> object encapsulating a copy of the same
+    * parameters as the original object.
+    * Changing a mutable copy will not influence the source object. 
+    * </div>
+    * 
+    * @return Mutable clone of ActionParameters object
+    * 
+    * @since  3.0
+    */
+   
+   public MutableActionParameters clone();
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/MimeResponse.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/MimeResponse.java b/portlet-api/src/main/java/javax/portlet/MimeResponse.java
index ee16254..925320b 100644
--- a/portlet-api/src/main/java/javax/portlet/MimeResponse.java
+++ b/portlet-api/src/main/java/javax/portlet/MimeResponse.java
@@ -25,7 +25,8 @@
 package javax.portlet;
 
 /**
- * The <CODE>MimeResponse</CODE> defines the base interface to assist a
+ * <span class="changed_modified_3_0">The</span>
+ * <CODE>MimeResponse</CODE> defines the base interface to assist a
  * portlet in returning MIME content. 
  *
  * @since 2.0
@@ -41,7 +42,7 @@ public interface MimeResponse extends PortletResponse {
      * portlet; if the value is set to <code>-1</code>, the cache does not expire.
      * <p>
      * A default can be defined in the portlet deployment descriptor
-     * with the <code>expiration-cache<code> tag, otherwise it is <code>0</code>.
+     * with the <code>expiration-cache</code> tag, otherwise it is <code>0</code>.
      * <p>
      * Non-integer values are treated as <code>0</code>.
      * <p>
@@ -51,6 +52,7 @@ public interface MimeResponse extends PortletResponse {
      */
     public static final String EXPIRATION_CACHE = "portlet.expiration-cache";
 
+    
     /**
      * Property to set the cache scope for this response using the
      * <code>setProperty</code> method intended to be used in 
@@ -59,7 +61,7 @@ public interface MimeResponse extends PortletResponse {
      * Predefined cache scopes are: <code>PUBLIC_SCOPE</code> and <code>PRIVATE_SCOPE</code>.
      * <p>
      * A default can be defined in the portlet deployment descriptor
-     * with the <code>cache-scope<code> tag, otherwise it is <code>PRIVATE_SCOPE</code>.
+     * with the <code>cache-scope</code> tag, otherwise it is <code>PRIVATE_SCOPE</code>.
      * <p>
      * Values that are not either <code>PUBLIC_SCOPE</code> or <code>PRIVATE_SCOPE</code>
      * are treated as <code>PRIVATE_SCOPE</code>.
@@ -172,11 +174,14 @@ public interface MimeResponse extends PortletResponse {
     public String getContentType();
 
     /**
-     * Sets the MIME type for the response. The portlet should set the
+     * <span class="changed_modified_3_0">Sets</span> 
+     * the MIME type for the response. The portlet should set the
      * content type before calling {@link #getWriter} or
-     * {@link #getPortletOutputStream}. If the content type is not 
-     * the {@link PortletRequest#getResponseContentType} value is
-     * set as response content type by the portlet container.
+     * {@link #getPortletOutputStream}. 
+     * <span class="changed_modified_3_0"> 
+     * If the content type is not set using this method, the preferred 
+     * content type as returned by {@link PortletRequest#getResponseContentType} is used.
+     * </span> 
      * <p>
      * Calling <code>setContentType</code> after <code>getWriter</code> or
      * <code>getOutputStream</code> does not change the content type.
@@ -185,6 +190,11 @@ public interface MimeResponse extends PortletResponse {
      * @param type
      *            the content MIME type
      * 
+     * @exception java.lang.IllegalArgumentException 
+     * <span class="changed_added_3_0"> 
+     *             if the content type is invalid.
+     * </span>
+     * 
      * @see PortletRequest#getResponseContentTypes
      * @see #getContentType
      */
@@ -353,13 +363,20 @@ public interface MimeResponse extends PortletResponse {
             throws java.io.IOException;
 
 	/**
-     * Creates a portlet URL targeting the portlet. If no portlet mode, window
-     * state or security modifier is set in the PortletURL the current values
-     * are preserved. If a request is triggered by the PortletURL, it results in
+     * <div class="changed_modified_3_0">
+     * Creates a render URL targeting the portlet. 
+     * Render URLs cause idempotent requests that move the portlet to a 
+     * new view state, for example, to view a different page of data. 
+     * <p> 
+     * If a request is triggered by the URL, it results in
      * a render request.
+     * </div>
+     * <div class="changed_added_3_0">
      * <p>
-     * The returned URL can be further extended by adding portlet-specific
-     * parameters and portlet modes and window states.
+     * The returned render URL will not contain any private render parameters from the
+     * current request.  
+     * </div>
+     * <div class="changed_deleted_3_0">
      * <p>
      * The created URL will per default not contain any parameters of the
      * current render request.

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/MutableActionParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/MutableActionParameters.java b/portlet-api/src/main/java/javax/portlet/MutableActionParameters.java
new file mode 100644
index 0000000..e0100d3
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/MutableActionParameters.java
@@ -0,0 +1,56 @@
+/*  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;
+
+
+/**
+ * <div class="changed_added_3_0">
+ * Action parameters are additional portlet parameters added to the portlet
+ * URL or provided by the client that extend the state information provided by 
+ * the render parameters.
+ * The client can supply additional action parameters when a form is submitted, for example.
+ * <p>
+ * The <code>MutableActionParameters</code> interface provides methods for modifying
+ * the action parameters attached to a portlet action URL. 
+ * <p>
+ * If the <code>MutableActionParameters</code> object was retrieved from 
+ * a URL, changes made will be applied to the URL. 
+ * The modified parameters will be available during requests
+ * triggered by the URL.
+ * <p>
+ * {@link PortletState} provides a description of the portlet state.
+ * {@link PortletParameters} provides a description of the parameter concept.
+ * </div>
+ * @see     PortletState
+ * @see     PortletParameters
+ * @see     ActionParameters
+ * @see     ActionRequest
+ * @see     ActionURL
+ * @since   3.0
+ */
+public interface MutableActionParameters extends MutablePortletParameters, ActionParameters
+{
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/MutablePortletParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/MutablePortletParameters.java b/portlet-api/src/main/java/javax/portlet/MutablePortletParameters.java
new file mode 100644
index 0000000..7c48fd8
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/MutablePortletParameters.java
@@ -0,0 +1,203 @@
+/*  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;
+
+import java.util.Set;
+
+/**
+ * <div class="changed_added_3_0">
+ * The <CODE>MutablePortletParameters</CODE> provides methods that allow  
+ * setting parameters to define a potential future portlet state.
+ * <p>
+ * {@link PortletState} provides a description of the portlet state.
+ * {@link PortletParameters} provides a description of the parameter concept.
+ * </div>
+ * @see   PortletState
+ * @see   PortletParameters
+ * @see   MutablePortletState
+ * @since 3.0
+ */
+public interface MutablePortletParameters extends PortletParameters, Mutable {
+
+
+   /**
+    * <div class="changed_added_3_0">
+    * Returns a <code>Set</code> of <code>String</code>
+    * objects containing the names of the parameters contained
+    * in this object. 
+    * <p>
+    * A parameter cannot be added through use of the set.
+    * However, removing a parameter from the set will remove the 
+    * underlying parameter. 
+    * <p>
+    * Only parameter names targeted to the current portlet are returned.
+    * </div>
+    *
+    *
+    * @return      a <code>Set</code> of <code>String</code>
+    *        objects, each <code>String</code> containing
+    *        the name of a parameter; or an 
+    *        empty <code>Set</code> if the
+    *        MutablePortletParameters object has no parameters.
+    *
+    * @since 3.0
+    */
+
+   public Set<? extends String> getNames();
+
+   
+    /**
+     * <div class="changed_added_3_0">
+     * Sets a String parameter.
+     * <p> 
+     * If the parameter already exists, this method replaces 
+     * all existing values with the new value.
+     * <p>
+     * A parameter value of <code>null</code> is valid.
+     * <p>
+     * To remove a parameter, use {@link #removeParameter(String)}.
+     * </div>
+     *
+     * @param   name
+     *          the parameter name
+     * @param   value
+     *          the parameter value
+     *
+     * @return  The previous parameter value, or 
+     *          <code>null</code> if there was no previous value.
+     *
+     * @since  3.0
+     *
+     * @exception  java.lang.IllegalArgumentException 
+     *                            if name is <code>null</code>.
+     */
+
+    public String setValue (String name, String value);
+
+
+    /**
+     * <div class="changed_added_3_0">
+     * Sets a multivalued String parameter.
+     * <p> 
+     * If the parameter already exists, this method replaces 
+     * all existing values with the new value array.
+     * <p>
+     * An input value of null or an empty array is valid.
+     * These values will be preserved when reading the parameter through 
+     * {@link PortletParameters#getValues(String)}, but will be 
+     * mapped to the value <code>null</code> when the parameter is read
+     * through {@link PortletParameters#getValue(String)}.
+     * <p> 
+     * A parameter value of <code>null</code> within the array is valid.
+     * <p>
+     * To remove a parameter, use {@link #removeParameter(String)}.
+     * </div>
+     *
+     * @param   name
+     *          the parameter name
+     * @param   values
+     *          An array of parameter values
+     *
+     * @return  The previous parameter value array, or
+     *          <code>null</code> if there was no previous value.
+     *
+     * @since  3.0
+     *
+     * @exception  java.lang.IllegalArgumentException 
+     *                            if name is <code>null</code>
+     */
+
+    public String[] setValues (String name, String... values);
+
+    
+    /**
+     * <div class="changed_added_3_0">
+     * Removes the given public or private parameter. 
+     * All values associated with the name are removed.
+     * </div>
+     *
+     * @param        name
+     *               the parameter name
+     *
+     * @exception    java.lang.IllegalArgumentException 
+     *                            if name is <code>null</code>.
+     * 
+     * @return       <code>true</code> if the parameter name was present.
+     * 
+     * @since  3.0
+     */
+
+    public boolean removeParameter (String name);
+    
+    
+    /**
+     * <div class="changed_added_3_0">
+     * Makes the public and private parameters identical to 
+     * those of the input PortletParameters object.
+     * <p>
+     * The parameters are copied so that after the operation completes, there 
+     * is no linkage to the input object.
+     * </div>
+     *   
+     * @param params - input portlet parameters
+     *
+     * @return  MutablePortletParameters object containing the previous values
+     * 
+     * @since  3.0
+     */
+    
+    public MutablePortletParameters set(PortletParameters params);
+    
+    
+    /**
+     * <div class="changed_added_3_0">
+     * Adds the parameters from the input <code>PortletParameters</code> object 
+     * if they are not already present. 
+     * If a parameter from the input object is already present, its value 
+     * will be updated with the input value.
+     * <p>
+     * The parameters are copied so that after the operation completes, there 
+     * is no linkage to the input object.
+     * </div>
+     *   
+     * @param params - input portlet parameters
+     *
+     * @return  MutablePortletParameters object containing the previous values
+     * 
+     * @since  3.0
+     */
+    
+    public MutablePortletParameters add(PortletParameters params);
+    
+    
+    /**
+     * <div class="changed_added_3_0">
+     * Clears all parameters.
+     * </div> 
+     * @since 3.0
+     */
+    
+    public void clear();
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/MutableRenderParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/MutableRenderParameters.java b/portlet-api/src/main/java/javax/portlet/MutableRenderParameters.java
new file mode 100644
index 0000000..221400e
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/MutableRenderParameters.java
@@ -0,0 +1,75 @@
+/*  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;
+
+/**
+ * <div class="changed_added_3_0">
+ * Provides methods that allow  
+ * setting parameters to define a potential future portlet state.
+ * <p>
+ * For example, these methods can be used to set render parameters on 
+ * a <code>PortletURL</code> object. 
+ * The modified parameters will be available during requests
+ * triggered by the URL.
+ * <p>
+ * If the <code>MutableRenderParameters</code> object was retrieved from 
+ * a response or a URL, changes made will be applied to that response or URL. 
+ * The modified parameters will be available during subsequent requests as defined 
+ * by the response or URL object. 
+ * <p>
+ * {@link PortletState} provides a description of the portlet state.
+ * {@link PortletParameters} provides a description of the parameter concept.
+ * </div>
+ *
+ * @see   PortletState
+ * @see   MutablePortletParameters
+ * @see   RenderParameters
+ * @since 3.0
+ */
+public interface MutableRenderParameters extends 
+         MutablePortletParameters, RenderParameters {
+   
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Clears all private parameters that are present in the 
+    * <code>MutableRenderParameters</code> object.
+    * </div> 
+    * @since 3.0
+    */
+   
+   public void clearPrivate();
+   
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Clears all public parameters that are present in the 
+    * <code>MutableRenderParameters</code> object.
+    * </div> 
+    * @since 3.0
+    */
+   
+   public void clearPublic();
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/MutableResourceParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/MutableResourceParameters.java b/portlet-api/src/main/java/javax/portlet/MutableResourceParameters.java
new file mode 100644
index 0000000..e92af89
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/MutableResourceParameters.java
@@ -0,0 +1,55 @@
+/*  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;
+
+
+/**
+ * <div class="changed_added_3_0">
+ * Resource parameters are additional portlet parameters added to the 
+ * URL that extend the state information provided by 
+ * the render parameters.
+ * <p>
+ * The <code>MutableResourceParameters</code> interface provides methods for modifying
+ * the resource parameters attached to a portlet resource URL. 
+ * <p>
+ * If the <code>MutableResourceParameters</code> object was retrieved from 
+ * a URL, changes made will be applied to the URL. 
+ * The modified parameters will be available during requests
+ * triggered by the URL.
+ * <p>
+ * {@link PortletState} provides a description of the portlet state.
+ * {@link PortletParameters} provides a description of the parameter concept.
+ * </div>
+ * @see     PortletState
+ * @see     PortletParameters
+ * @see     ResourceParameters
+ * @see     ResourceRequest
+ * @see     ResourceURL
+ * @since   3.0
+ */
+public interface MutableResourceParameters extends MutablePortletParameters, ResourceParameters
+{
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/PortletParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/PortletParameters.java b/portlet-api/src/main/java/javax/portlet/PortletParameters.java
new file mode 100644
index 0000000..460c855
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/PortletParameters.java
@@ -0,0 +1,232 @@
+/*  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;
+
+import java.util.Set;
+
+
+/**
+ * <div class="changed_added_3_0">
+ * The <CODE>PortletParameters</CODE> interface defines the API 
+ * for accessing the parameters that are set for the portlet or on a portlet URL.
+ * <p>
+ * Portlet parameters store state information that the portlet needs to render itself,
+ * generate content by serving resources, or make decisions when executing portlet
+ * actions. Conceptually the portlet parameters correspond to query string parameters
+ * that are stored in the URL used to access the portlet, although they are not
+ * required to actually be present on the URL as visible parameters.
+ * <p>
+ * Private parameters parameters are available exclusively to a single portlet. 
+ * Public parameters can be shared between portlets.
+ * <p>
+ * The portlet parameters governing the request can be read during all portlet
+ * execution phases through the {@link PortletParameters} object available 
+ * from the portlet request. Portlet parameters
+ * can be set for subsequent or future portlet execution phases through
+ * the {@link MutablePortletParameters} object available from the
+ * portlet response object or from the portlet URL.
+ * <p>
+ * Different types of portlet parameters are distinguished 
+ * according to their use. 
+ * <dl>
+ * <dt>Render Parameters</dt>
+ * <dd>
+ * Set on the response during the Action and Event phases to govern content
+ * generation during the Render and Resource phases. Also set on render URLs
+ * to move the portlet to a new render state when the URL is triggered.
+ * <p>
+ * Refer to {@link PortletRequest#getRenderParameters()},
+ * {@link StateAwareResponse#getRenderParameters()}, and
+ * {@link PortletURL#getRenderParameters()}.
+ * <p>
+ * Example: Render URLs with differing render parameters can be used to
+ * implement tabbed navigation within a portlet.
+ * </dd> 
+ * <dt>Resource Parameters</dt>
+ * <dd>
+ * Provide additional information about the content to be generated when
+ * serving a resource for the governing render state.
+ * Set on resource URLs and made available to the portlet through the
+ * resource request when the URL is triggered.
+ * <p>
+ * Refer to {@link ResourceRequest#getResourceParameters()} and
+ * {@link ResourceURL#getResourceParameters()}.
+ * <p>
+ * Example: Portlets may require several different pieces of content 
+ * to be served for the governing render state.
+ * Resource URLs with differing resource parameters can be used to
+ * determine which content is to be served for a specific request.
+ * </dd> 
+ * <dt>Action Parameters</dt>
+ * <dd>
+ * Provide additional information about the action to be executed
+ * for the governing render state.
+ * Set on action URLs and made available to the portlet through the
+ * action request when the URL is triggered, or provided to the 
+ * portlet by the client (form parameters).
+ * <p>
+ * Refer to {@link ActionRequest#getActionParameters()} and
+ * {@link ActionURL#getActionParameters()}.
+ * <p>
+ * Example: Portlets may render a number of buttons or links
+ * for the governing render state.
+ * Action URLs with differing action parameters can be used to
+ * determine which action is to be executed for a specific request.
+ * <br>
+ * Example: Portlets may render forms that, when submitted, may cause
+ * parameters to be added to the portlet action request. 
+ * During action request processing, these form parameters will be available as 
+ * action parameters.
+ * </dd> 
+ * </dl>
+ * </div>
+ * @see     MutablePortletParameters
+ * @since   3.0 
+ */
+public interface PortletParameters
+{
+
+  /**
+   * <div class="changed_added_3_0">
+   * Returns the value of a parameter as a <code>String</code>.
+   * <p>
+   * Note that <code>null</code> is a valid parameter value. 
+   * To determine whether a
+   * parameter is present, use the {@link java.util.Set#contains(Object)}
+   * method on the set returned by {@link #getNames()}. 
+   * <p>
+   * Only parameters targeted to the current portlet are accessible.
+   * <p>
+   * This method should only be used if the 
+   * parameter has only one value. If the parameter might have
+   * more than one value, use {@link #getValues}.
+   * <p>
+   * If this method is used with a multivalued
+   * parameter, the value returned is equal to the first value
+   * in the array returned by <code>getValues</code>.
+   * </div>
+   *
+   * @param name 	a <code>String</code> specifying the 
+   *			name of the parameter
+   *
+   * @return		a <code>String</code> representing the 
+   *			single value of the parameter, or <code>null</code>. 
+   *
+   * @see 		#getValues
+   * @see      #getNames
+   * @since    3.0
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   *
+   */
+  
+  public String getValue(String name);
+
+
+  /**
+   * <div class="changed_added_3_0">
+   * Returns a <code>Set</code> of <code>String</code>
+   * objects containing the names of the parameters contained
+   * in this object. 
+   * Changing the <code>Set</code> has no effect on the originating 
+   * PortletParameters object. 
+   * <p>
+   * Only parameter names targeted to the current portlet are returned.
+   * </div>
+   *
+   *
+   * @return		a <code>Set</code> of <code>String</code>
+   *			objects, each <code>String</code> containing
+   * 			the name of a parameter; or an 
+   *			empty <code>Set</code> if the
+   *			PortletParameters object has no parameters.
+   *
+   * @since 3.0
+   */
+
+  public Set<? extends String> getNames();
+
+
+  /**
+   * <div class="changed_added_3_0">
+   * Returns an array of <code>String</code> objects containing 
+   * all of the values the given parameter, or 
+   * <code>null</code> if the parameter does not exist.
+   * <p>
+   * If the parameter has a single value, the array has a length
+   * of 1.
+   * <p>
+   * Note that individual parameter values in the returned array 
+   * may be <code>null</code>.
+   * </div>
+   *
+   * @param name	a <code>String</code> containing the name of 
+   *			the parameter the value of which is requested
+   *
+   * @return		an array of <code>String</code> objects 
+   *			containing the parameter values, or <code>null</code> 
+   *        if the parameter does not exist.
+   *
+   * @see		#getValue
+   * @since    3.0
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   *
+   */
+
+  public String[] getValues(String name);
+
+  
+  /**
+   * <div class="changed_added_3_0">
+   * Returns a <code>true</code> if no parameters have been set.
+   * </div> 
+   *
+   * @return  <code>true</code> if the object contains no parameters.
+   *          <code>false</code> otherwise
+   * 
+   * @since    3.0
+   */
+
+  public boolean isEmpty ();
+
+  
+  /**
+   * <div class="changed_added_3_0">
+   * Returns a <code>MutablePortletParameters</code> object encapsulating a copy of the same
+   * parameters as the original object.
+   * Changing a mutable copy will not influence the source object. 
+   * </div>
+   * 
+   * @return Mutable clone of PortletParameters object
+   * 
+   * @since  3.0
+   */
+  
+  public MutablePortletParameters clone();
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/ab7f5522/portlet-api/src/main/java/javax/portlet/RenderParameters.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/RenderParameters.java b/portlet-api/src/main/java/javax/portlet/RenderParameters.java
new file mode 100644
index 0000000..c2a1df6
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/RenderParameters.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;
+
+
+/**
+ * <div class="changed_added_3_0">
+ * Provides access to render parameters, which make up part of the portlet state.
+ * </div>
+ * @see     PortletParameters
+ * @see     MutableRenderParameters
+ * @since   3.0
+ */
+public interface RenderParameters extends PortletParameters
+{
+
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Returns a <code>MutableRenderParameters</code> object encapsulating a copy of the same
+    * parameters as the original object.
+    * Changing a mutable copy will not influence the source object. 
+    * </div>
+    * 
+    * @return Mutable clone of RenderParameters object
+    * 
+    * @since  3.0
+    */
+   
+   public MutableRenderParameters clone();
+
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Returns a boolean value indicating whether the given
+    * parameter name represents a public render parameter.
+    * Note that if <code>true</code> is returned, it does not mean that a public 
+    * render parameter value is set.
+    * </div> 
+    *
+    * @param   name
+    *          the parameter name
+    *
+    * @return  <code>true</code> if the given parameter
+    *           name represents a public render parameter.
+    *           <code>false</code> otherwise
+    *
+    * @exception  java.lang.IllegalArgumentException 
+    *                            if name is <code>null</code>.
+    * 
+    * @since    3.0
+    */
+
+   public boolean isPublic (String name);
+
+}


[5/5] portals-pluto git commit: Introduced the new parameter handling in the responses. You can now retrieve a MutableRenderParameters object from the Action response and use it to query and set parameters. Expanded the parameter test portlet to set para

Posted by ms...@apache.org.
Introduced the new parameter handling in the responses. You can now retrieve
a MutableRenderParameters object from the Action response and use it to
query and set parameters. Expanded the parameter test portlet to set
parameters through the new MutableRenderParameters object.


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/7b13130c
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/7b13130c
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/7b13130c

Branch: refs/heads/V3Prototype
Commit: 7b13130ced01e2c5eeff824d7c67da2cd6ca93a4
Parents: 23df6c2
Author: Scott Nicklous <ms...@apache.org>
Authored: Wed Feb 18 18:31:17 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Wed Feb 18 18:31:17 2015 +0100

----------------------------------------------------------------------
 .../java/basic/portlet/ParamTestPortlet.java    | 36 ++++----
 .../src/main/webapp/WEB-INF/jsp/view-ptp.jsp    | 11 +--
 .../PortletStateAwareResponseContext.java       |  8 ++
 .../impl/MutablePortletParametersImpl.java      |  7 +-
 .../impl/MutableRenderParametersImpl.java       |  4 +-
 .../container/impl/PortletParametersImpl.java   |  2 +-
 .../container/impl/StateAwareResponseImpl.java  |  5 ++
 .../PortletStateAwareResponseContextImpl.java   |  9 ++
 .../java/javax/portlet/ResourceResponse.java    | 28 +++++--
 .../java/javax/portlet/StateAwareResponse.java  | 87 +-------------------
 .../portlet/filter/ActionResponseWrapper.java   | 22 ++++-
 .../portlet/filter/EventResponseWrapper.java    | 24 +++++-
 12 files changed, 117 insertions(+), 126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java b/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java
index 00de328..cbf5411 100644
--- a/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java
+++ b/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java
@@ -33,6 +33,7 @@ import javax.portlet.ActionParameters;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.GenericPortlet;
+import javax.portlet.MutableRenderParameters;
 import javax.portlet.PortletException;
 import javax.portlet.PortletRequestDispatcher;
 import javax.portlet.RenderParameters;
@@ -80,6 +81,10 @@ public class ParamTestPortlet extends GenericPortlet {
          logger.fine(txt.toString());
       }
       
+      // don't display the control parameters
+      pnSet.remove(PARAM_SETTYPE);
+      pnSet.remove(PARAM_REMTYPE);
+      
       StringBuilder txt = new StringBuilder();
       txt.append("<h3>Currently set render parameters:</h3>\n");
       txt.append("<p>\n");
@@ -119,14 +124,12 @@ public class ParamTestPortlet extends GenericPortlet {
          throws PortletException, IOException {
    }
 
-   // nothing to do in processAction
-   @SuppressWarnings("deprecation")
    public void processAction(ActionRequest req, ActionResponse resp)
          throws PortletException, IOException {
       
       ActionParameters ap = req.getActionParameters();
-      RenderParameters rp = req.getRenderParameters();
-      Set<? extends String> rpNames = rp.getNames();
+      MutableRenderParameters mrp = resp.getRenderParameters();
+      Set<? extends String> rpNames = mrp.getNames();
 
       if (isDebug) {
          StringBuffer sb = new StringBuffer();
@@ -142,9 +145,11 @@ public class ParamTestPortlet extends GenericPortlet {
       
       String setType = ap.getValue(PARAM_SETTYPE);
       setType = (setType == null) ? PARAM_SETTYPE_VARRAY : setType;
+      mrp.setValue(PARAM_SETTYPE, setType);
       
       String remType = ap.getValue(PARAM_REMTYPE);
       remType = (remType == null) ? PARAM_REMTYPE_SET : remType;
+      mrp.setValue(PARAM_REMTYPE, remType);
       
       // Get the parameter name & values. Parse values string into individual values.
       // if string is 'null', change it into null.
@@ -178,39 +183,34 @@ public class ParamTestPortlet extends GenericPortlet {
             }
          }
          try {
-            if (parsedVals == null) {
-               if (remType.equals(PARAM_REMTYPE_SET)) {
-                  txt.append(". Remove using setRenderParameter");
-                  resp.setRenderParameter(pn, parsedVals);
-               } else {
-                  txt.append(". Remove using removePublicRenderParameter");
-                  resp.removePublicRenderParameter(pn);
-               }
-               
+            if (remType.equals(PARAM_REMTYPE_REM)) {
+               txt.append(". Removing parameter");
+               mrp.removeParameter(pn);
             } else {
                if (setType.equals(PARAM_SETTYPE_VARRAY)) {
                   txt.append(" using values array");
-                  resp.setRenderParameter(pn, parsedVals);
+                  mrp.setValues(pn, parsedVals);
                } else {
                   txt.append(" using first value in array");
-                  resp.setRenderParameter(pn, parsedVals[0]);
+                  String tval = (parsedVals == null) ? null : parsedVals[0];
+                  mrp.setValue(pn, tval);
                }
             }
          } catch(Exception e) {
             StringBuilder err = new StringBuilder("Exception setting parameter: ");
             err.append(e.toString());
-            resp.setRenderParameter("Error:", "<span style='color: red;'>" + err.toString() + "</span>");
+            mrp.setValue("Error:", "<span style='color: red;'>" + err.toString() + "</span>");
          }
       } else if (rpNames.isEmpty()) {
          txt.append("the error message");
-         resp.setRenderParameter("Error:", "<span style='color: red;'>No parameters available!</span>");
+         mrp.setValue("Error:", "<span style='color: red;'>No parameters available!</span>");
       }
       
       if (isDebug) {
          logger.fine(txt.toString());
          txt = new StringBuilder("Parsed Action Parameters: ");
          txt.append(", Name: ").append(pn);
-         txt.append(", Value string: >>").append(pv).append("<");
+         txt.append(", Value string: >>").append(pv).append("<<");
          txt.append(", Parsed Values: ").append(Arrays.toString(parsedVals));
          logger.fine(txt.toString());
       }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp b/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp
index f5a6cca..d3694aa 100644
--- a/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp
+++ b/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp
@@ -36,7 +36,6 @@ limitations under the License.
 <p>Enter parameter name and value and click 'send'.
 To enter multiple values, separate values with a ',' character.
 Entering 'null' as a value will cause the corresponding value in the values array to be set to null.
-Entering 'null' by itself will cause the parameter to be set to null (removed).
 Entering 'empty' by itself will set the parameter to an empty array.
 Leaving the value field empty will set the parameter to an array containing a single empty string.
 <p/>
@@ -55,15 +54,11 @@ Leaving the value field empty will set the parameter to an array containing a si
           <%=(setType.equals(PARAM_SETTYPE_VARRAY) ? "checked" : "")%> >Value array
 
    </td></tr><tr><td>
-   To remove, use:
+   Remove:
    </td><td>
 
-   <input type='radio' name='<%=PARAM_REMTYPE%>' value='<%=PARAM_REMTYPE_REM%>'
-          <%=(remType.equals(PARAM_REMTYPE_REM) ? "checked" : "")%> >removePRP
-
-   </td><td>
-   <input type='radio' name='<%=PARAM_REMTYPE%>' value='<%=PARAM_REMTYPE_SET%>'
-          <%=(remType.equals(PARAM_REMTYPE_SET) ? "checked" : "")%> >setRenderParameter
+   <input type='checkbox' name='<%=PARAM_REMTYPE%>' value='<%=PARAM_REMTYPE_REM%>'
+          <%=(remType.equals(PARAM_REMTYPE_REM) ? "checked" : "")%> >remove parameter
 
    </td></tr><tr><td>
       Parameter Name:

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java
----------------------------------------------------------------------
diff --git a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java
index aea640c..e2420a6 100644
--- a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java
+++ b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletStateAwareResponseContext.java
@@ -20,6 +20,7 @@ import java.util.List;
 import java.util.Set;
 
 import javax.portlet.Event;
+import javax.portlet.MutableRenderParameters;
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
 
@@ -94,5 +95,12 @@ public interface PortletStateAwareResponseContext extends PortletResponseContext
      * @param name
      */
     void removeParameter(String windowId, String name);
+    
+    /**
+     * Returns a mutable render parameters object.
+     * 
+     * @return
+     */
+    MutableRenderParameters getRenderParameters(String windowId);
 
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java
index 3100ff9..1b0fb96 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutablePortletParametersImpl.java
@@ -83,6 +83,7 @@ public class MutablePortletParametersImpl extends
          StringBuilder txt = new StringBuilder();
          txt.append("Window ID: ").append(windowId)
             .append(", Name: ").append(name)
+            .append(", Type: ").append(type)
             .append(", Old Value: ").append(val)
             .append(", New Value: ").append(value);
          LOGGER.debug(txt.toString());
@@ -116,8 +117,9 @@ public class MutablePortletParametersImpl extends
          StringBuilder txt = new StringBuilder();
          txt.append("Window ID: ").append(windowId)
             .append(", Name: ").append(name)
-            .append(", Old Value: ").append(Arrays.toString(vals))
-            .append(", New Value: ").append(Arrays.toString(values));
+            .append(", Type: ").append(type)
+            .append(", Old Values: ").append(Arrays.toString(vals))
+            .append(", New Values: ").append(Arrays.toString(values));
          LOGGER.debug(txt.toString());
       }
       
@@ -147,6 +149,7 @@ public class MutablePortletParametersImpl extends
          StringBuilder txt = new StringBuilder();
          txt.append("Window ID: ").append(windowId)
             .append(", Name: ").append(name)
+            .append(", Type: ").append(type)
             .append(", Removed: ").append(isContains);
          LOGGER.debug(txt.toString());
       }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
index 0bd1ae8..3baa156 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
@@ -54,7 +54,7 @@ public class MutableRenderParametersImpl extends MutablePortletParametersImpl
     * @param type
     */
    public MutableRenderParametersImpl(PortletURLProvider urlProvider, String windowId) {
-      super(urlProvider, windowId, ParamType.ACTION);
+      super(urlProvider, windowId, ParamType.RENDER);
       prpNames = urlProvider.getPublicParameterNames(windowId);
    }
 
@@ -64,7 +64,7 @@ public class MutableRenderParametersImpl extends MutablePortletParametersImpl
     * @param type
     */
    public MutableRenderParametersImpl(Map<String, String[]> params, String windowId, Set<String> prpNames) {
-      super(params, windowId, ParamType.ACTION);
+      super(params, windowId, ParamType.RENDER);
       this.prpNames = new HashSet<String>(prpNames);
    }
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java
index fc0b2b8..8a86f50 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletParametersImpl.java
@@ -100,7 +100,7 @@ public abstract class PortletParametersImpl implements PortletParameters {
    public String getValue(String name) {
       checkNull("name", name);
       String[] vals = params.get(name);
-      String val = (vals == null) ? null : vals[0];
+      String val = (vals == null || vals.length == 0) ? null : vals[0];
       if (isTrace) {
          LOGGER.debug("Name: " + name + ", Value: " + val);
       }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
index 122e57e..78b55c9 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/StateAwareResponseImpl.java
@@ -26,6 +26,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.portlet.Event;
+import javax.portlet.MutableRenderParameters;
 import javax.portlet.PortletMode;
 import javax.portlet.PortletModeException;
 import javax.portlet.StateAwareResponse;
@@ -183,4 +184,8 @@ public abstract class StateAwareResponseImpl extends PortletResponseImpl
          responseContext.setParameter(windowId, key, values.clone());
       }
    }
+
+   public MutableRenderParameters getRenderParameters() {
+      return responseContext.getRenderParameters(windowId);
+   }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
index a58d7cc..65731ba 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletStateAwareResponseContextImpl.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.portlet.Event;
+import javax.portlet.MutableRenderParameters;
 import javax.portlet.PortletMode;
 import javax.portlet.WindowState;
 import javax.servlet.http.HttpServletRequest;
@@ -36,6 +37,7 @@ import org.apache.pluto.container.PortletStateAwareResponseContext;
 import org.apache.pluto.container.PortletURLProvider;
 import org.apache.pluto.container.PortletWindow;
 import org.apache.pluto.container.driver.PlutoServices;
+import org.apache.pluto.container.impl.MutableRenderParametersImpl;
 import org.apache.pluto.container.impl.PortletURLImpl;
 import org.apache.pluto.driver.core.PortalRequestContext;
 import org.apache.pluto.driver.url.PortalURL;
@@ -246,4 +248,11 @@ public abstract class PortletStateAwareResponseContextImpl extends PortletRespon
        }
     }
 
+    /**
+     * Gets the mutable render parameters. V3 method.
+     */
+    public MutableRenderParameters getRenderParameters(String windowId) {
+       return new MutableRenderParametersImpl(portletURLProvider, windowId);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/portlet-api/src/main/java/javax/portlet/ResourceResponse.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/ResourceResponse.java b/portlet-api/src/main/java/javax/portlet/ResourceResponse.java
index 809e0b1..a618c42 100644
--- a/portlet-api/src/main/java/javax/portlet/ResourceResponse.java
+++ b/portlet-api/src/main/java/javax/portlet/ResourceResponse.java
@@ -25,7 +25,8 @@
 package javax.portlet;
 
 /**
- * The <CODE>ResourceResponse</CODE> defines an object to assist a portlet 
+ * <span class="changed_modified_3_0">The</span>  
+ * <CODE>ResourceResponse</CODE> defines an object to assist a portlet 
  * for rendering a resource.
  * <p>
  * The difference between the <CODE>RenderResponse</CODE> is that for the 
@@ -50,17 +51,28 @@ package javax.portlet;
 public interface ResourceResponse extends MimeResponse {
     
 	/**
-	 * Constant for setting the HTTP status code via the 
+	 * <span class="changed_modified_3_0">Constant</span> 
+	 * for setting the HTTP status code via the 
 	 * <code>setProperty</code> method.
+	 * <span class="changed_added_3_0">
+	 * Changing the HTTP status code after 
+    * after the response has been committed has no effect.
+    * </span>
 	 */
 	public static final String HTTP_STATUS_CODE = "portlet.http-status-code";
 
     /**
-     * Sets the locale of the response, setting the headers 
+     * <span class="changed_modified_3_0">Sets</span> 
+     * the locale of the response, setting the headers 
      * (including the Content-Type's charset) as appropriate. 
-     * This method should be called before a call to getWriter(). 
+     * <span class="changed_deleted_3_0">This method should be called before a call to getWriter().</span> 
      * By default, the response locale is the default locale provided
      * by the portlet container.
+     * <p>
+     * <span class="changed_added_3_0">
+     * This method has no effect if it is called after 
+     * after the response has been committed.
+     * </span>
      * 
      * @param loc  the new locale of the response
      */
@@ -89,7 +101,13 @@ public interface ResourceResponse extends MimeResponse {
     
     
     /**
-     * Sets the length of the content body in the response.
+     * <span class="changed_modified_3_0">Sets</span> 
+     * the length of the content body in the response.
+     * <p>
+     * <span class="changed_added_3_0">
+     * This method has no effect if it is called after 
+     * after the response has been committed.
+     * </span>
      * 
      * @param len an integer specifying the length of the content being returned
      */

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/portlet-api/src/main/java/javax/portlet/StateAwareResponse.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/StateAwareResponse.java b/portlet-api/src/main/java/javax/portlet/StateAwareResponse.java
index f1de4d4..a745ff7 100644
--- a/portlet-api/src/main/java/javax/portlet/StateAwareResponse.java
+++ b/portlet-api/src/main/java/javax/portlet/StateAwareResponse.java
@@ -37,72 +37,7 @@ package javax.portlet;
  * @see PortletState
  * @see PortletResponse
  */
-public interface StateAwareResponse extends PortletResponse {
-
-	/**
-     * Sets the window state of a portlet to the given window state.
-     * <p>
-     * Possible values are the standard window states and any custom window
-     * states supported by the portal and the portlet. Standard window states
-     * are:
-     * <ul>
-     * <li>MINIMIZED
-     * <li>NORMAL
-     * <li>MAXIMIZED
-     * </ul>
-     * 
-     * @param windowState
-     *            the new portlet window state
-     * 
-     * @exception WindowStateException
-     *                if the portlet cannot switch to the specified window
-     *                state. To avoid this exception the portlet can check the
-     *                allowed window states with
-     *                <code>Request.isWindowStateAllowed()</code>.
-     * @exception java.lang.IllegalStateException
-     *                if the method is invoked after <code>sendRedirect</code>
-     *                has been called.
-     * 
-     * @see WindowState
-     */
-
-	public void setWindowState(WindowState windowState)
-			throws WindowStateException;
-
-	/**
-     * Sets the portlet mode of a portlet to the given portlet mode.
-     * <p>
-     * Possible values are the standard portlet modes and any custom portlet
-     * modes supported by the portal and the portlet. Portlets must declare in
-     * the deployment descriptor the portlet modes they support for each markup
-     * type. Standard portlet modes are:
-     * <ul>
-     * <li>EDIT
-     * <li>HELP
-     * <li>VIEW
-     * </ul>
-     * <p>
-     * Note: The portlet may still be called in a different window state in the
-     * next render call, depending on the portlet container / portal.
-     * 
-     * @param portletMode
-     *            the new portlet mode
-     * 
-     * @exception PortletModeException
-     *                if the portlet cannot switch to this portlet mode, because
-     *                the portlet or portal does not support it for this markup,
-     *                or the current user is not allowed to switch to this
-     *                portlet mode. To avoid this exception the portlet can
-     *                check the allowed portlet modes with
-     *                <code>Request.isPortletModeAllowed()</code>.
-     * @exception java.lang.IllegalStateException
-     *                if the method is invoked after <code>sendRedirect</code>
-     *                has been called.
-     */
-
-	public void setPortletMode(PortletMode portletMode)
-			throws PortletModeException;
-
+public interface StateAwareResponse extends PortletResponse, MutablePortletState {
 
    /**
     * <span class="changed_modified_3_0">Sets</span> 
@@ -327,26 +262,6 @@ public interface StateAwareResponse extends PortletResponse {
    @Deprecated
 	public java.util.Map<String, String[]> getRenderParameterMap();
 
-	/**
-     * Returns the currently set portlet mode on this reponse.
-     * 
-     * @since 2.0
-     * 
-     * @return the portlet mode, or <code>null</code> if none is set
-     */
-
-	public PortletMode getPortletMode();
-
-	/**
-     * Returns the currently set window state on this response.
-     * 
-     * @since 2.0
-     * 
-     * @return the window state, or <code>null</code> if none is set
-     */
-
-	public WindowState getWindowState();
-
 
 	/**
 	 * Removes the specified public render parameter.

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/portlet-api/src/main/java/javax/portlet/filter/ActionResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/ActionResponseWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/ActionResponseWrapper.java
index dda4627..6542d82 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/ActionResponseWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/ActionResponseWrapper.java
@@ -28,6 +28,8 @@ import java.io.IOException;
 import java.util.Map;
 
 import javax.portlet.ActionResponse;
+import javax.portlet.MutablePortletParameters;
+import javax.portlet.MutableRenderParameters;
 import javax.portlet.PortletMode;
 import javax.portlet.PortletModeException;
 import javax.portlet.WindowState;
@@ -35,7 +37,8 @@ import javax.portlet.WindowStateException;
 import javax.xml.namespace.QName;
 
 /**
- * The <code>ActionResponseWrapper</code> provides a convenient 
+ * <span class="changed_modified_3_0">The</span> 
+ * <code>ActionResponseWrapper</code> provides a convenient 
  * implementation of the <code>ActionResponse</code> interface 
  * that can be subclassed by developers wishing to adapt the response.
  * This class implements the Wrapper or Decorator pattern. 
@@ -97,6 +100,7 @@ public class ActionResponseWrapper extends PortletResponseWrapper implements Act
      * The default behavior of this method is to call 
      * <code>setRenderParameter(key, value)</code> on the wrapped response object.
      */
+    @Deprecated
     public void setRenderParameter(String key, String value) {
         response.setRenderParameter(key, value);
     }
@@ -105,7 +109,8 @@ public class ActionResponseWrapper extends PortletResponseWrapper implements Act
      * 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) {
+    @Deprecated
+    public void setRenderParameter(String key, String... values) {
         response.setRenderParameter(key, values);
     }
 
@@ -113,6 +118,7 @@ public class ActionResponseWrapper extends PortletResponseWrapper implements Act
      * The default behavior of this method is to call 
      * <code>setRenderParameters(parameters)</code> on the wrapped response object.
      */
+    @Deprecated
     public void setRenderParameters(Map<String, String[]> parameters) {
         response.setRenderParameters(parameters);
     }
@@ -160,6 +166,7 @@ public class ActionResponseWrapper extends PortletResponseWrapper implements Act
      * The default behavior of this method is to call 
      * <code>getRenderParameterMap()</code> on the wrapped response object.
      */
+    @Deprecated
     public Map<String, String[]> getRenderParameterMap() {
         return response.getRenderParameterMap();
     }
@@ -184,8 +191,19 @@ public class ActionResponseWrapper extends PortletResponseWrapper implements Act
      *  The default behavior of this method is to call 
      * <code>removePublicRenderParameter()</code> on the wrapped response object.
      */
+	@Deprecated
 	public void removePublicRenderParameter(String name) {
 		response.removePublicRenderParameter(name);		
 	}
 
+   /**
+    * <div class="changed_added_3_0">
+    *  The default behavior of this method is to call 
+    * <code>getRenderParameter()</code> on the wrapped response object.
+    * </div>
+    */
+   public MutableRenderParameters getRenderParameters() {
+      return response.getRenderParameters();
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/7b13130c/portlet-api/src/main/java/javax/portlet/filter/EventResponseWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/EventResponseWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/EventResponseWrapper.java
index c075064..dc38240 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/EventResponseWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/EventResponseWrapper.java
@@ -28,6 +28,8 @@ import java.util.Map;
 
 import javax.portlet.EventRequest;
 import javax.portlet.EventResponse;
+import javax.portlet.MutablePortletParameters;
+import javax.portlet.MutableRenderParameters;
 import javax.portlet.PortletMode;
 import javax.portlet.PortletModeException;
 import javax.portlet.WindowState;
@@ -35,7 +37,8 @@ import javax.portlet.WindowStateException;
 import javax.xml.namespace.QName;
 
 /**
- * The <code>EventResponseWrapper</code> provides a convenient 
+ * <span class="changed_modified_3_0">The</span> 
+ * <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. 
@@ -82,6 +85,7 @@ public class EventResponseWrapper extends PortletResponseWrapper implements Even
       * The default behavior of this method is to call 
       * <code>setRenderParameter(key, value)</code> on the wrapped response object.
       */
+     @Deprecated
      public void setRenderParameter(String key, String value) {
          response.setRenderParameter(key, value);
      }
@@ -90,7 +94,9 @@ public class EventResponseWrapper extends PortletResponseWrapper implements Even
       * 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) {
+     
+     @Deprecated
+     public void setRenderParameter(String key, String ... values) {
          response.setRenderParameter(key, values);
      }
 
@@ -98,6 +104,7 @@ public class EventResponseWrapper extends PortletResponseWrapper implements Even
       * The default behavior of this method is to call 
       * <code>setRenderParameters(parameters)</code> on the wrapped response object.
       */
+     @Deprecated
      public void setRenderParameters(Map<String, String[]> parameters) {
          response.setRenderParameters(parameters);
      }
@@ -145,6 +152,7 @@ public class EventResponseWrapper extends PortletResponseWrapper implements Even
       * The default behavior of this method is to call 
       * <code>getRenderParameterMap()</code> on the wrapped response object.
       */
+     @Deprecated
      public Map<String, String[]> getRenderParameterMap() {
          return response.getRenderParameterMap();
      }
@@ -161,6 +169,7 @@ public class EventResponseWrapper extends PortletResponseWrapper implements Even
       *  The default behavior of this method is to call 
       * <code>setRenderParameters()</code> on the wrapped response object.
       */
+     @Deprecated
      public void setRenderParameters(EventRequest request) {
          response.setRenderParameters(request);         
      }
@@ -177,8 +186,19 @@ public class EventResponseWrapper extends PortletResponseWrapper implements Even
      *  The default behavior of this method is to call 
      * <code>removePublicRenderParameter()</code> on the wrapped response object.
      */
+ 	@Deprecated
 	public void removePublicRenderParameter(String name) {
 		response.removePublicRenderParameter(name);		
 	}
 
+   /**
+    * <div class="changed_added_3_0">
+    *  The default behavior of this method is to call 
+    * <code>getRenderParameter()</code> on the wrapped response object.
+    * </div>
+    */
+   public MutableRenderParameters getRenderParameters() {
+      return response.getRenderParameters();
+   }
+
 }


[4/5] portals-pluto git commit: Added new parameter structures to the Requests. Added V3 parameter test portlet to the PortletV3Demo portlet application.

Posted by ms...@apache.org.
Added new parameter structures to the Requests. Added V3 parameter test
portlet to the PortletV3Demo portlet application.


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/23df6c27
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/23df6c27
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/23df6c27

Branch: refs/heads/V3Prototype
Commit: 23df6c27a062b63d36eacfbec48c97f981aab6b2
Parents: ab7f552
Author: Scott Nicklous <ms...@apache.org>
Authored: Wed Feb 18 13:30:49 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Wed Feb 18 13:30:49 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/basic/portlet/Constants.java  |  13 +
 .../java/basic/portlet/ParamTestPortlet.java    | 220 +++++++++
 .../src/main/webapp/WEB-INF/jsp/view-ptp.jsp    |  83 ++++
 .../src/main/webapp/WEB-INF/portlet.xml         |  30 ++
 .../pluto/container/PortletRequestContext.java  |  14 +
 .../PortletResourceRequestContext.java          |  10 +-
 .../container/impl/ActionParametersImpl.java    |   7 +
 .../pluto/container/impl/ActionRequestImpl.java |  73 +--
 .../impl/MutableActionParametersImpl.java       |   7 +
 .../impl/MutableRenderParametersImpl.java       |   7 +
 .../impl/MutableResourceParametersImpl.java     |   7 +
 .../container/impl/PortletRequestImpl.java      |  17 +-
 .../container/impl/RenderParametersImpl.java    |   7 +
 .../container/impl/ResourceParametersImpl.java  |   7 +
 .../container/impl/ResourceRequestImpl.java     |   7 +-
 .../container/PortletRequestContextImpl.java    |  36 +-
 .../PortletResourceRequestContextImpl.java      |   6 +
 .../container/PortletURLProviderImpl.java       |  52 ++-
 .../driver/url/impl/RelativePortalURLImpl.java  |   5 +-
 .../org/apache/pluto/driver/url/PortalURL.java  |   2 +-
 .../main/java/javax/portlet/ActionRequest.java  | 123 +++--
 .../java/javax/portlet/MutablePortletState.java | 137 ++++++
 .../main/java/javax/portlet/PortletRequest.java |  20 +-
 .../main/java/javax/portlet/PortletState.java   |  70 +++
 .../java/javax/portlet/ResourceRequest.java     | 443 ++++++++++---------
 .../portlet/filter/ActionRequestWrapper.java    |  15 +-
 .../portlet/filter/PortletRequestWrapper.java   |  26 +-
 .../portlet/filter/ResourceRequestWrapper.java  |  18 +-
 28 files changed, 1124 insertions(+), 338 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/PortletV3Demo/src/main/java/basic/portlet/Constants.java
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/java/basic/portlet/Constants.java b/PortletV3Demo/src/main/java/basic/portlet/Constants.java
index de2ebf1..ac082f7 100644
--- a/PortletV3Demo/src/main/java/basic/portlet/Constants.java
+++ b/PortletV3Demo/src/main/java/basic/portlet/Constants.java
@@ -55,4 +55,17 @@ public class Constants {
    public final static String ATTRIB_PRPS = "prps";
    public final static String ATTRIB_PMS = "portletModes";
    public final static String ATTRIB_WS = "windowStates";
+
+   // For parameter test portlet
+
+   public final static String PARAM_NAME = "pName";
+   public final static String PARAM_VALUES = "pValues";
+   public final static String PARAM_REMTYPE = "remType";
+   public final static String PARAM_REMTYPE_REM = "remPRP";
+   public final static String PARAM_REMTYPE_SET = "setRP";
+   public final static String PARAM_SETTYPE = "setType";
+   public final static String PARAM_SETTYPE_VAL = "setVal";
+   public final static String PARAM_SETTYPE_VARRAY = "setVals";
+   public final static String ATTRIB_PARAMS = "params";
+
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java b/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java
new file mode 100644
index 0000000..00de328
--- /dev/null
+++ b/PortletV3Demo/src/main/java/basic/portlet/ParamTestPortlet.java
@@ -0,0 +1,220 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package basic.portlet;
+
+import static basic.portlet.Constants.*;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.ActionParameters;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderParameters;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+
+
+/**
+ * A purtlet hub portlet that allows parameter names & values to be entered and set.
+ * 
+ * @author Scott Nicklous
+ */
+public class ParamTestPortlet extends GenericPortlet {
+
+   // Set up logging
+   private static final String LOG_CLASS = ParamTestPortlet.class.getName();
+   private static final Logger logger = Logger.getLogger(LOG_CLASS);
+   private static final boolean isDebug = logger.isLoggable(Level.FINE);
+   
+   private final HashSet<String> prpNames = new HashSet<String>();
+   
+   @Override
+   public void init() throws PortletException {
+      super.init();
+      Enumeration<String> names = getPublicRenderParameterNames();
+      for (String name : Collections.list(names)) {
+         prpNames.add(name);
+      }
+   }
+
+   protected void doView(RenderRequest req, RenderResponse resp)
+         throws PortletException, IOException {
+
+      resp.setContentType("text/html");
+      
+      String style = "style='min-width: 100px;'";
+      RenderParameters rp = req.getRenderParameters();
+      Set<? extends String> pnSet = rp.getNames();
+      
+      if (isDebug) {
+         StringBuilder txt = new StringBuilder();
+         txt.append("Render parameter names: ").append(pnSet.toString());
+         logger.fine(txt.toString());
+      }
+      
+      StringBuilder txt = new StringBuilder();
+      txt.append("<h3>Currently set render parameters:</h3>\n");
+      txt.append("<p>\n");
+      txt.append("   <table>");
+
+      for (String pn : pnSet) {
+         // try to test all parameter apis
+         String val = rp.getValue(pn);
+         String[] vals = rp.getValues(pn);
+         txt.append("      <tr><td " + style + ">Name: ")
+            .append(pn)
+            .append("</td><td " + style + ">Val: ")
+            .append(val)
+            .append("</td><td " + style + ">Len: ")
+            .append(vals.length)
+            .append("</td><td " + style + ">Values: ")
+            .append(Arrays.toString(vals))
+            .append("</td></tr>\n");
+      }
+      
+      txt.append("   </table>");
+      txt.append("</p>\n");
+      
+      req.setAttribute(ATTRIB_PARAMS, txt.toString());
+
+      PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(
+            "/WEB-INF/jsp/view-ptp.jsp");
+      rd.include(req, resp);
+
+   }
+   
+   /* (non-Javadoc)
+    * @see javax.portlet.GenericPortlet#serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse)
+    */
+   @Override
+   public void serveResource(ResourceRequest req, ResourceResponse resp)
+         throws PortletException, IOException {
+   }
+
+   // nothing to do in processAction
+   @SuppressWarnings("deprecation")
+   public void processAction(ActionRequest req, ActionResponse resp)
+         throws PortletException, IOException {
+      
+      ActionParameters ap = req.getActionParameters();
+      RenderParameters rp = req.getRenderParameters();
+      Set<? extends String> rpNames = rp.getNames();
+
+      if (isDebug) {
+         StringBuffer sb = new StringBuffer();
+         sb.append("Action parameters:");
+         for (String k : ap.getNames()) {
+            sb.append("\nName: ").append(k);
+            sb.append(", Values: ").append(Arrays.toString(ap.getValues(k)));
+         }
+         logger.fine(sb.toString());
+      }
+
+      // decide how the set / remove is to be done
+      
+      String setType = ap.getValue(PARAM_SETTYPE);
+      setType = (setType == null) ? PARAM_SETTYPE_VARRAY : setType;
+      
+      String remType = ap.getValue(PARAM_REMTYPE);
+      remType = (remType == null) ? PARAM_REMTYPE_SET : remType;
+      
+      // Get the parameter name & values. Parse values string into individual values.
+      // if string is 'null', change it into null.
+      
+      String pn = ap.getValue(PARAM_NAME);
+      String pv = ap.getValue(PARAM_VALUES);
+
+      String[] parsedVals = null;
+      StringBuilder txt = new StringBuilder("Setting values to ");
+      if (pn != null && pn.length() > 0 && pv != null) {
+         parsedVals = pv.split(",", -1);
+         if (pv.length() == 0) {
+            txt.append("array containing single empty string");
+            parsedVals = new String[] {""};
+         } else if (parsedVals.length == 1) {
+            if (parsedVals[0].equals("null")) {
+               txt.append("null");
+               parsedVals = null;
+            } else if (parsedVals[0].equals("empty")) {
+               txt.append("an empty array.");
+               parsedVals = new String[0];
+            } else {
+               txt.append("an array containing the single item");
+            }
+         } else {
+            txt.append("an array of values");
+            for (int ii = 0; ii < parsedVals.length; ii++) {
+               if (parsedVals[ii].equals("null")) {
+                  parsedVals[ii] = null;
+               }
+            }
+         }
+         try {
+            if (parsedVals == null) {
+               if (remType.equals(PARAM_REMTYPE_SET)) {
+                  txt.append(". Remove using setRenderParameter");
+                  resp.setRenderParameter(pn, parsedVals);
+               } else {
+                  txt.append(". Remove using removePublicRenderParameter");
+                  resp.removePublicRenderParameter(pn);
+               }
+               
+            } else {
+               if (setType.equals(PARAM_SETTYPE_VARRAY)) {
+                  txt.append(" using values array");
+                  resp.setRenderParameter(pn, parsedVals);
+               } else {
+                  txt.append(" using first value in array");
+                  resp.setRenderParameter(pn, parsedVals[0]);
+               }
+            }
+         } catch(Exception e) {
+            StringBuilder err = new StringBuilder("Exception setting parameter: ");
+            err.append(e.toString());
+            resp.setRenderParameter("Error:", "<span style='color: red;'>" + err.toString() + "</span>");
+         }
+      } else if (rpNames.isEmpty()) {
+         txt.append("the error message");
+         resp.setRenderParameter("Error:", "<span style='color: red;'>No parameters available!</span>");
+      }
+      
+      if (isDebug) {
+         logger.fine(txt.toString());
+         txt = new StringBuilder("Parsed Action Parameters: ");
+         txt.append(", Name: ").append(pn);
+         txt.append(", Value string: >>").append(pv).append("<");
+         txt.append(", Parsed Values: ").append(Arrays.toString(parsedVals));
+         logger.fine(txt.toString());
+      }
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp b/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp
new file mode 100644
index 0000000..f5a6cca
--- /dev/null
+++ b/PortletV3Demo/src/main/webapp/WEB-INF/jsp/view-ptp.jsp
@@ -0,0 +1,83 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed  under the  License is distributed on an "AS IS" BASIS,
+WITHOUT  WARRANTIES OR CONDITIONS  OF ANY KIND, either  express  or
+implied.
+
+See the License for the specific language governing permissions and
+limitations under the License.
+--%>
+<%@ page session="false" %>
+<%@ taglib uri="http://java.sun.com/portlet_2_0"  prefix="portlet" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ page import="static basic.portlet.Constants.*" %>
+
+<portlet:defineObjects />
+
+<%
+   String setType = renderRequest.getRenderParameters().getValue(PARAM_SETTYPE);
+   setType = (setType == null) ? PARAM_SETTYPE_VARRAY : setType;
+   
+   String remType = renderRequest.getRenderParameters().getValue(PARAM_REMTYPE);
+   remType = (remType == null) ? PARAM_REMTYPE_SET : remType;
+%>
+
+<h3>Parameter Tester</h3><hr/>
+<p>This portlet uses V3 APIs but does not use the portlet hub.</p>
+<p>Enter parameter name and value and click 'send'.
+To enter multiple values, separate values with a ',' character.
+Entering 'null' as a value will cause the corresponding value in the values array to be set to null.
+Entering 'null' by itself will cause the parameter to be set to null (removed).
+Entering 'empty' by itself will set the parameter to an empty array.
+Leaving the value field empty will set the parameter to an array containing a single empty string.
+<p/>
+<p><hr/></p>
+<FORM id='<portlet:namespace/>-setParams' METHOD='POST' ACTION='<portlet:actionURL/>' enctype='application/x-www-form-urlencoded' accept-charset='UTF-8'>
+   <table><tr><td align='left'>
+
+   To set, use:
+   </td><td>
+
+   <input type='radio' name='<%=PARAM_SETTYPE%>' value='<%=PARAM_SETTYPE_VAL%>'
+          <%=(setType.equals(PARAM_SETTYPE_VAL) ? "checked" : "")%> >Single value
+
+   </td><td>
+   <input type='radio' name='<%=PARAM_SETTYPE%>' value='<%=PARAM_SETTYPE_VARRAY%>'
+          <%=(setType.equals(PARAM_SETTYPE_VARRAY) ? "checked" : "")%> >Value array
+
+   </td></tr><tr><td>
+   To remove, use:
+   </td><td>
+
+   <input type='radio' name='<%=PARAM_REMTYPE%>' value='<%=PARAM_REMTYPE_REM%>'
+          <%=(remType.equals(PARAM_REMTYPE_REM) ? "checked" : "")%> >removePRP
+
+   </td><td>
+   <input type='radio' name='<%=PARAM_REMTYPE%>' value='<%=PARAM_REMTYPE_SET%>'
+          <%=(remType.equals(PARAM_REMTYPE_SET) ? "checked" : "")%> >setRenderParameter
+
+   </td></tr><tr><td>
+      Parameter Name:
+   </td><td colspan=2>
+   <input name='<%=PARAM_NAME%>' type='text' value='' size='50' maxlength='100'>
+   </td></tr><tr><td>
+      Parameter Values:
+   </td><td colspan=2>
+   <input name='<%=PARAM_VALUES%>' type='text' value='' size='50' maxlength='100'>
+   </td></tr><tr><td>
+   <INPUT VALUE='send' CLASS='portlet-form-button' TYPE='submit'>
+   </td></tr></table>
+</FORM>
+
+<p><hr/></p>
+<%=renderRequest.getAttribute(ATTRIB_PARAMS) %>
+<p><hr/></p>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
----------------------------------------------------------------------
diff --git a/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml b/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
index 5d39bd8..54b9703 100644
--- a/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
+++ b/PortletV3Demo/src/main/webapp/WEB-INF/portlet.xml
@@ -149,6 +149,27 @@
       <supported-public-render-parameter>color</supported-public-render-parameter>
    </portlet>
 
+   <portlet>
+      <portlet-name>ParamTestPortlet</portlet-name>
+      <display-name>V3 Parameter Test Portlet</display-name>
+      
+      <portlet-class>basic.portlet.ParamTestPortlet</portlet-class>
+
+      <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+      </supports>
+
+      <supported-locale>en</supported-locale>        
+
+      <portlet-info>
+         <title>V3 Parameter Test Portlet</title>
+      </portlet-info>
+
+      <supported-public-render-parameter>Bild</supported-public-render-parameter>
+      <supported-public-render-parameter>Farbe</supported-public-render-parameter>
+   </portlet>
+
 	<custom-portlet-mode>
 		<description>Test mode #1</description>
 		<portlet-mode>MyMode_nonPortalManaged_1</portlet-mode>
@@ -190,4 +211,13 @@
       <identifier>color</identifier>
       <qname>rp:alt-color</qname>
    </public-render-parameter>
+   
+   <public-render-parameter>
+      <identifier>Bild</identifier>
+      <qname>rp:imgName</qname>
+   </public-render-parameter>
+   <public-render-parameter>
+      <identifier>Farbe</identifier>
+      <qname>rp:color</qname>
+   </public-render-parameter>
  </portlet-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container-api/src/main/java/org/apache/pluto/container/PortletRequestContext.java
----------------------------------------------------------------------
diff --git a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletRequestContext.java b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletRequestContext.java
index 8c6c781..26b3860 100644
--- a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletRequestContext.java
+++ b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletRequestContext.java
@@ -20,7 +20,9 @@ import java.util.Enumeration;
 import java.util.Locale;
 import java.util.Map;
 
+import javax.portlet.ActionParameters;
 import javax.portlet.PortletConfig;
+import javax.portlet.RenderParameters;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletRequest;
 import javax.servlet.http.Cookie;
@@ -62,4 +64,16 @@ public interface PortletRequestContext
     
     Map<String, String[]> getPrivateParameterMap();
     Map<String, String[]> getPublicParameterMap();
+    
+    /**
+     * Returns the render parameters for the portlet. V3 method.
+     * @return
+     */
+    RenderParameters getRenderParameters();
+
+    /**
+     * Returns the action parameters for the portlet. V3 method.
+     * @return
+     */
+    ActionParameters getActionParameters();
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResourceRequestContext.java
----------------------------------------------------------------------
diff --git a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResourceRequestContext.java b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResourceRequestContext.java
index 8d601be..bf69dac 100644
--- a/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResourceRequestContext.java
+++ b/pluto-container-api/src/main/java/org/apache/pluto/container/PortletResourceRequestContext.java
@@ -18,6 +18,8 @@ package org.apache.pluto.container;
 
 import java.util.Map;
 
+import javax.portlet.ResourceParameters;
+
 /**
  * @version $Id$
  *
@@ -29,8 +31,14 @@ public interface PortletResourceRequestContext extends PortletRequestContext
     Map<String, String[]> getPrivateRenderParameterMap();
     
     /**
-     * get page state when handling a partial action request
+     * get page state when handling a partial action request. V3 method
      * @return
      */
     String getPageState();
+    
+    /**
+     * Returns the resource parameters for the request. V3 method.
+     * @return
+     */
+    ResourceParameters getResourceParameters();
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java
index 12318d6..a75c946 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionParametersImpl.java
@@ -39,6 +39,13 @@ public class ActionParametersImpl extends PortletParametersImpl implements
    private static final Logger   LOGGER     = LoggerFactory.getLogger(ActionParametersImpl.class);
    private static final boolean  isTrace    = LOGGER.isDebugEnabled();
 
+   // called to force class loading in Container thread
+   public static final void load() {
+      if (isTrace) {
+         LOGGER.debug("Loaded.");
+      }
+   };
+
    /**
     * For creating a new object from scratch
     * 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionRequestImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionRequestImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionRequestImpl.java
index d4e1a66..47e3da0 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionRequestImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/ActionRequestImpl.java
@@ -1,34 +1,39 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.container.impl;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.PortletRequest;
-
-import org.apache.pluto.container.PortletActionResponseContext;
-import org.apache.pluto.container.PortletRequestContext;
-
-/**
- * Implementation of the <code>javax.portlet.ActionRequest</code> interface.
- */
-public class ActionRequestImpl extends ClientDataRequestImpl implements ActionRequest
-{
-    public ActionRequestImpl(PortletRequestContext requestContext, PortletActionResponseContext responseContext)
-    {
-        super(requestContext, responseContext, PortletRequest.ACTION_PHASE);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.container.impl;
+
+import javax.portlet.ActionParameters;
+import javax.portlet.ActionRequest;
+import javax.portlet.PortletRequest;
+
+import org.apache.pluto.container.PortletActionResponseContext;
+import org.apache.pluto.container.PortletRequestContext;
+
+/**
+ * Implementation of the <code>javax.portlet.ActionRequest</code> interface.
+ */
+public class ActionRequestImpl extends ClientDataRequestImpl implements ActionRequest
+{
+    public ActionRequestImpl(PortletRequestContext requestContext, PortletActionResponseContext responseContext)
+    {
+        super(requestContext, responseContext, PortletRequest.ACTION_PHASE);
+    }
+
+   public ActionParameters getActionParameters() {
+      return requestContext.getActionParameters();
+   }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java
index aa9f3db..3b62f64 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableActionParametersImpl.java
@@ -37,6 +37,13 @@ public class MutableActionParametersImpl extends MutablePortletParametersImpl
    private static final Logger   LOGGER     = LoggerFactory.getLogger(MutableActionParametersImpl.class);
    private static final boolean  isTrace    = LOGGER.isDebugEnabled();
 
+   // called to force class loading in Container thread
+   public static final void load() {
+      if (isTrace) {
+         LOGGER.debug("Loaded.");
+      }
+   };
+
    /**
     * @param urlProvider
     * @param windowId

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
index 72e47ea..0bd1ae8 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableRenderParametersImpl.java
@@ -38,6 +38,13 @@ public class MutableRenderParametersImpl extends MutablePortletParametersImpl
       implements MutableRenderParameters {
    private static final Logger   LOGGER     = LoggerFactory.getLogger(MutableRenderParametersImpl.class);
    private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+
+   // called to force class loading in Container thread
+   public static final void load() {
+      if (isTrace) {
+         LOGGER.debug("Loaded.");
+      }
+   };
    
    private final Set<String> prpNames;
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java
index 4ce2d27..4e9ec91 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/MutableResourceParametersImpl.java
@@ -37,6 +37,13 @@ public class MutableResourceParametersImpl extends MutablePortletParametersImpl
    private static final Logger   LOGGER     = LoggerFactory.getLogger(MutableResourceParametersImpl.class);
    private static final boolean  isTrace    = LOGGER.isDebugEnabled();
 
+   // called to force class loading in Container thread
+   public static final void load() {
+      if (isTrace) {
+         LOGGER.debug("Loaded.");
+      }
+   };
+
    /**
     * @param urlProvider
     * @param windowId

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
index 04a2c96..fbb9226 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletRequestImpl.java
@@ -35,6 +35,7 @@ import javax.portlet.PortletMode;
 import javax.portlet.PortletPreferences;
 import javax.portlet.PortletRequest;
 import javax.portlet.PortletSession;
+import javax.portlet.RenderParameters;
 import javax.portlet.WindowState;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
@@ -77,10 +78,10 @@ public abstract class PortletRequestImpl implements PortletRequest
     // Private Member Variables ------------------------------------------------
 
     /** The PortalContext within which this request is occuring. */
-    private final PortalContext portalContext;
+    protected final PortalContext portalContext;
 
-    private final PortletRequestContext requestContext;
-    private final PortletResponseContext responseContext;
+    protected final PortletRequestContext requestContext;
+    protected final PortletResponseContext responseContext;
 
     /** The portlet session. */
     private PortletSession portletSession;
@@ -302,13 +303,12 @@ public abstract class PortletRequestImpl implements PortletRequest
         return requestContext.getPreferredLocale();
     }
 
-    @SuppressWarnings("unchecked")
     public Enumeration<Locale> getLocales()
     {
         Locale preferredLocale = getLocale();
         ArrayList<Locale> locales = new ArrayList<Locale>();
         locales.add(preferredLocale);
-        for (Enumeration e = getServletRequest().getLocales(); e.hasMoreElements(); )
+        for (Enumeration<Locale> e = getServletRequest().getLocales(); e.hasMoreElements(); )
         {
             Locale locale = (Locale)e.nextElement();
             if (!locale.equals(preferredLocale))
@@ -467,7 +467,6 @@ public abstract class PortletRequestImpl implements PortletRequest
         return cloneParameterMap(requestContext.getPrivateParameterMap());
     }
 
-    @SuppressWarnings("unchecked")
     public Enumeration<String> getProperties(String name)
     {
         ArgumentUtility.validateNotNull("propertyName", name);
@@ -477,7 +476,7 @@ public abstract class PortletRequestImpl implements PortletRequest
             Locale preferredLocale = getLocale();
             ArrayList<String> locales = new ArrayList<String>();
             locales.add(preferredLocale.toString());
-            for (Enumeration e = getServletRequest().getLocales(); e.hasMoreElements(); )
+            for (Enumeration<Locale> e = getServletRequest().getLocales(); e.hasMoreElements(); )
             {
                 Locale locale = (Locale)e.nextElement();
                 if (!locale.equals(preferredLocale))
@@ -707,4 +706,8 @@ public abstract class PortletRequestImpl implements PortletRequest
         ArgumentUtility.validateNotEmpty("name", name);
         requestContext.setAttribute(name, null);
     }
+
+    public RenderParameters getRenderParameters() {
+       return requestContext.getRenderParameters();
+    }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java
index 97d0a3a..d449415 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/RenderParametersImpl.java
@@ -39,6 +39,13 @@ public class RenderParametersImpl extends PortletParametersImpl implements
       RenderParameters {
    private static final Logger   LOGGER     = LoggerFactory.getLogger(RenderParametersImpl.class);
    private static final boolean  isTrace    = LOGGER.isDebugEnabled();
+
+   // called to force class loading in Container thread
+   public static final void load() {
+      if (isTrace) {
+         LOGGER.debug("Loaded.");
+      }
+   };
    
    private final Set<String> prpNames;
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java
index d490324..ea60246 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceParametersImpl.java
@@ -38,6 +38,13 @@ public class ResourceParametersImpl extends PortletParametersImpl implements
    private static final Logger   LOGGER     = LoggerFactory.getLogger(ResourceParametersImpl.class);
    private static final boolean  isTrace    = LOGGER.isDebugEnabled();
 
+   // called to force class loading in Container thread
+   public static final void load() {
+      if (isTrace) {
+         LOGGER.debug("Loaded.");
+      }
+   };
+
    /**
     * For creating a new object from scratch
     * 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceRequestImpl.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceRequestImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceRequestImpl.java
index b6863ee..aab4426 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceRequestImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/ResourceRequestImpl.java
@@ -21,8 +21,8 @@ import java.util.Map;
 
 import javax.portlet.CacheControl;
 import javax.portlet.PortletRequest;
+import javax.portlet.ResourceParameters;
 import javax.portlet.ResourceRequest;
-import javax.servlet.http.HttpServletRequest;
 
 import org.apache.pluto.container.PortletResourceRequestContext;
 import org.apache.pluto.container.PortletResourceResponseContext;
@@ -77,7 +77,6 @@ public class ResourceRequestImpl extends ClientDataRequestImpl implements Resour
         return getServletRequest().getHeader("accept");
     }
 
-    @SuppressWarnings("unchecked")
     public Enumeration<String> getResponseContentTypes()
     {
         return getServletRequest().getHeaders("accept");
@@ -116,4 +115,8 @@ public class ResourceRequestImpl extends ClientDataRequestImpl implements Resour
       }
       return val;
    }
+
+   public ResourceParameters getResourceParameters() {
+      return requestContext.getResourceParameters();
+   }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletRequestContextImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletRequestContextImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletRequestContextImpl.java
index ebb86e6..2d2eb23 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletRequestContextImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletRequestContextImpl.java
@@ -23,7 +23,9 @@ import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 
+import javax.portlet.ActionParameters;
 import javax.portlet.PortletConfig;
+import javax.portlet.RenderParameters;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletRequest;
 import javax.servlet.http.Cookie;
@@ -32,8 +34,15 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.pluto.container.PortletContainer;
 import org.apache.pluto.container.PortletRequestContext;
+import org.apache.pluto.container.PortletURLProvider;
 import org.apache.pluto.container.PortletWindow;
+import org.apache.pluto.container.impl.ActionParametersImpl;
+import org.apache.pluto.container.impl.MutableActionParametersImpl;
+import org.apache.pluto.container.impl.MutableRenderParametersImpl;
+import org.apache.pluto.container.impl.MutableResourceParametersImpl;
 import org.apache.pluto.container.impl.PortletURLImpl;
+import org.apache.pluto.container.impl.RenderParametersImpl;
+import org.apache.pluto.container.impl.ResourceParametersImpl;
 import org.apache.pluto.driver.core.PortalRequestContext;
 import org.apache.pluto.driver.url.PortalURL;
 import org.apache.pluto.driver.url.PortletParameterFactory;
@@ -54,15 +63,23 @@ public class PortletRequestContextImpl implements PortletRequestContext {
    private ServletContext      servletContext;
    private Cookie              cookies[];
    
-   // Nasty trick to make sure the URL provider is loaded first by the container classloader
+   // make sure thethese classes are loaded first by the container classloader
    // so that the logs from these classes land in the Pluto log file.
    static {
       PortletURLProviderImpl.load();
       PortletURLImpl.load();
+      RenderParametersImpl.load();
+      ActionParametersImpl.load();
+      ResourceParametersImpl.load();
+      MutableRenderParametersImpl.load();
+      MutableActionParametersImpl.load();
+      MutableResourceParametersImpl.load();
    }
 
-   protected PortletWindow       window;
-   protected PortletParameterFactory paramFactory;
+   protected PortletWindow             window;
+   protected String                    windowId;
+   protected PortletURLProvider        urlProvider;
+   protected PortletParameterFactory   paramFactory;
 
    public PortletRequestContextImpl(PortletContainer container,
          HttpServletRequest containerRequest,
@@ -72,8 +89,9 @@ public class PortletRequestContextImpl implements PortletRequestContext {
       this.containerRequest = containerRequest;
       this.containerResponse = containerResponse;
       this.window = window;
-      this.url = PortalRequestContext.getContext(containerRequest)
-            .createPortalURL();
+      this.windowId = window.getId().getStringId();
+      this.url = PortalRequestContext.getContext(containerRequest).createPortalURL();
+      this.urlProvider = new PortletURLProviderImpl(url, window);
       this.paramFactory = url.getPortletParameterFactory();
    }
 
@@ -207,4 +225,12 @@ public class PortletRequestContextImpl implements PortletRequestContext {
    public HttpServletResponse getServletResponse() {
       return servletResponse;
    }
+
+   public RenderParameters getRenderParameters() {
+      return new RenderParametersImpl(urlProvider, windowId);
+   }
+
+   public ActionParameters getActionParameters() {
+      return new ActionParametersImpl(urlProvider, windowId);
+   }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletResourceRequestContextImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletResourceRequestContextImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletResourceRequestContextImpl.java
index 50c5d32..b008e51 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletResourceRequestContextImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletResourceRequestContextImpl.java
@@ -18,12 +18,14 @@ package org.apache.pluto.driver.services.container;
 
 import java.util.Map;
 
+import javax.portlet.ResourceParameters;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.pluto.container.PortletContainer;
 import org.apache.pluto.container.PortletResourceRequestContext;
 import org.apache.pluto.container.PortletWindow;
+import org.apache.pluto.container.impl.ResourceParametersImpl;
 
 /**
  * @version $Id$
@@ -66,4 +68,8 @@ public class PortletResourceRequestContextImpl extends PortletRequestContextImpl
    public String getPageState() {
       return pageState;
    }
+
+   public ResourceParameters getResourceParameters() {
+      return new ResourceParametersImpl(urlProvider, windowId);
+   }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
index fa95b7c..3225566 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
@@ -70,8 +70,25 @@ public class PortletURLProviderImpl implements PortletURLProvider {
       paramTypeMap.put(ParamType.RENDER, PortalURLParameter.PARAM_TYPE_RENDER);
       paramTypeMap.put(ParamType.RESOURCE, PortalURLParameter.PARAM_TYPE_RESOURCE);
    }
-
    
+   private final static HashMap<URLType, TYPE> urlTypeMap = new HashMap<PortalURL.URLType, PortletURLProvider.TYPE>();
+   static {
+      urlTypeMap.put(URLType.Action, TYPE.ACTION);
+      urlTypeMap.put(URLType.PartialAction, TYPE.ACTION);
+      urlTypeMap.put(URLType.AjaxAction, TYPE.ACTION);
+      urlTypeMap.put(URLType.Portal, TYPE.RENDER);
+      urlTypeMap.put(URLType.Render, TYPE.RENDER);
+      urlTypeMap.put(URLType.Resource, TYPE.RESOURCE);
+   }
+
+   /**
+    * Constructs a URL provider that allows updates to the underlying URL. Used for
+    * creating portlet URLs and for the portlet responses.
+    * 
+    * @param url
+    * @param type
+    * @param portletWindow
+    */
    public PortletURLProviderImpl(PortalURL url, TYPE type,
          PortletWindow portletWindow) {
       this.url = url.clone();
@@ -117,12 +134,18 @@ public class PortletURLProviderImpl implements PortletURLProvider {
          break;
       case RESOURCE:
          this.url.setType(URLType.Resource);
-         this.url.clearResourceParameters(window);
+         this.url.clearParameters(window, PortalURLParameter.PARAM_TYPE_RESOURCE);
+         this.url.clearParameters(window, PortalURLParameter.PARAM_TYPE_ACTION);
          this.url.setCacheability(ResourceURL.PAGE);
          break;
       default:
          this.url.setType(URLType.Render);
-         this.url.clearParameters(window);
+         if (url.isVersion3(window)) {
+            this.url.clearParameters(window, PortalURLParameter.PARAM_TYPE_RESOURCE);
+            this.url.clearParameters(window, PortalURLParameter.PARAM_TYPE_ACTION);
+         } else {
+            this.url.clearParameters(window);
+         }
       }
 
       if (isTrace) {
@@ -133,6 +156,29 @@ public class PortletURLProviderImpl implements PortletURLProvider {
 
    }
 
+   /**
+    * Creates a "read-only" URL provider that is used to provide portlet requests
+    * with info.
+    * 
+    * @param url
+    * @param windowId
+    */
+   public PortletURLProviderImpl(PortalURL url, PortletWindow portletWindow) {
+      this.url = url;
+      this.type = urlTypeMap.get(url.getType());
+      this.window = portletWindow.getId().getStringId();
+      this.paramFactory = this.url.getPortletParameterFactory();
+
+      if (isDebug) {
+         StringBuilder txt = new StringBuilder("Created 'read-only' URL provider.");
+         txt.append(" type=").append(this.type);
+         txt.append(", URL type=").append(url.getType());
+         txt.append(", window=").append(window);
+         txt.append(", URL target=").append(url.getTargetWindow());
+         LOGGER.debug(txt.toString());
+      }
+   }
+
    public PortalURL apply() {
 
       if (isDebug) {

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
index d9df81d..5999686 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
@@ -504,10 +504,10 @@ public class RelativePortalURLImpl implements PortalURL {
     * org.apache.pluto.driver.url.PortalURL#clearResourceParameters(java.lang
     * .String)
     */
-   public void clearResourceParameters(String window) {
+   public void clearParameters(String window, String paramType) {
       HashSet<PortalURLParameter> rem = new HashSet<PortalURLParameter>();
       for (PortalURLParameter pup : parameters) {
-         if (pup.getType().equals(PortalURLParameter.PARAM_TYPE_RESOURCE)
+         if (pup.getType().equals(paramType)
                && pup.getWindowId().equals(window)) {
             rem.add(pup);
          }
@@ -515,6 +515,7 @@ public class RelativePortalURLImpl implements PortalURL {
       if (isTrace) {
          StringBuilder txt = new StringBuilder("Removing ");
          txt.append(rem.size()).append(" elements. Window ID: ").append(window);
+         txt.append(", Parameter type: ").append(paramType);
          LOG.debug(txt.toString());
       }
       parameters.removeAll(rem);

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
index 5d30540..d31948c 100644
--- a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
+++ b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
@@ -170,5 +170,5 @@ public interface PortalURL extends Cloneable {
    /**
     * @param window
     */
-   public void clearResourceParameters(String window);	
+   public void clearParameters(String window, String paramType);	
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/ActionRequest.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/ActionRequest.java b/portlet-api/src/main/java/javax/portlet/ActionRequest.java
index 4400d77..8c71e72 100644
--- a/portlet-api/src/main/java/javax/portlet/ActionRequest.java
+++ b/portlet-api/src/main/java/javax/portlet/ActionRequest.java
@@ -1,48 +1,75 @@
-/*  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;
-
-
-/**
- * The <CODE>ActionRequest</CODE> represents the request sent to the portlet
- * to handle an action.<br>
- * It extends the ClientDataRequest interface and provides action request
- * information to portlets.
- * <p>
- * The portlet container creates an <CODE>ActionRequest</CODE> object and
- * passes it as argument to the portlet's <CODE>processAction</CODE> method.
- * 
- * @see ClientDataRequest
- */
-public interface ActionRequest extends ClientDataRequest
-{
-	/**
-	 * Predefined action name for usage with the
-	 * <code>@ProcessAction</code> annotation.
-	 * 
-	 * @since 2.0
-	 */
-	public static final String ACTION_NAME = "javax.portlet.action";
-}
+/*  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;
+
+
+/**
+ * <span class="changed_modified_3_0">The</span> 
+ * <CODE>ActionRequest</CODE> represents the request sent to the portlet
+ * to handle an action.<br>
+ * It extends the ClientDataRequest interface and provides action request
+ * information to portlets.
+ * <p>
+ * The portlet container creates an <CODE>ActionRequest</CODE> object and
+ * passes it as argument to the portlet's <CODE>processAction</CODE> method.
+ * 
+ * @see ClientDataRequest
+ */
+public interface ActionRequest extends ClientDataRequest
+{
+   /**
+    * Predefined action name for usage with the
+    * <code>@ProcessAction</code> annotation.
+    * 
+    * @since 2.0
+    */
+   public static final String ACTION_NAME = "javax.portlet.action";
+
+
+   /**
+    * <div class="changed_added_3_0">
+    * Gets the action parameters set for this request.
+    * <p>
+    * Action parameters are additional portlet parameters added to the 
+    * URL triggering the request that extend the state information provided by 
+    * the render parameters.
+    * <p>
+    * Action parameters can also contain information provided by the client,
+    * for example, form parameters provided when a form is submitted. 
+    * <p>
+    * {@link PortletParameters} provides a description of the parameter concept.
+    * </div>
+    * 
+    * @return   an immutable object representing
+    *           the action parameters
+    * @since    3.0
+    * @see      ActionParameters 
+    * @see      MutableActionParameters 
+    * @see      ActionURL 
+    */
+
+   public ActionParameters getActionParameters();
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/MutablePortletState.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/MutablePortletState.java b/portlet-api/src/main/java/javax/portlet/MutablePortletState.java
new file mode 100644
index 0000000..c7ecf24
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/MutablePortletState.java
@@ -0,0 +1,137 @@
+package javax.portlet;
+
+
+
+/**
+ * <div class="changed_added_3_0">
+ * Provides read-write access to the portlet state.
+ * The portlet state is represented by the render parameters,
+ * portlet mode and window state.
+ * <p>
+ * The mutable portlet state is available through certain portlet response and 
+ * portlet URL interfaces.
+ * <p>
+ * When changed on one of these interfaces, the modified portlet state becomes
+ * active according to the rules of the originating object.
+ * If the portlet state is modified on a response, it becomes active for
+ * subsequent portlet render phases.
+ * If the portlet state is modified on a URL, it becomes active when the URL
+ * containing the modified state is activated.
+ * <p>
+ * For example, the methods defined here can be used to set a new portlet mode and 
+ * render parameters on a {@link PortletURL} object. 
+ * When the portlet URL containing this modified portlet state is activated,
+ * the portlet will have the portlet mode and render parameter values set as they
+ * were applied to the portlet URL.
+ * </div>
+ *
+ * @since 3.0
+ * @see      PortletState 
+ * @see      MutablePortletParameters 
+ */
+public interface MutablePortletState extends PortletState, Mutable {
+
+
+   /**
+    * <div class="changed_added_3_0">
+    * Gets the mutable render parameters.
+    * </div>
+    * 
+    * @return   a <code>MutableRenderParameters</code> object representing
+    *           the private and public render parameters
+    * @since    3.0
+    * @see      PortletParameters 
+    * @see      RenderParameters 
+    * @see      MutablePortletParameters 
+    * @see      MutableRenderParameters 
+    */
+
+   public MutableRenderParameters getRenderParameters();
+
+
+   /**
+    * <div class="changed_added_3_0">
+    * Sets the window state of a portlet to the given window state.
+    * <p>
+    * Possible values are the standard window states and any custom window
+    * states supported by the portal and the portlet. Standard window states
+    * are:
+    * <ul>
+    * <li>MINIMIZED
+    * <li>NORMAL
+    * <li>MAXIMIZED
+    * </ul>
+    * <p>
+    * Not more than one window state can be set.
+    * If more than one window state is set, only the last one set
+    * is valid.
+    * </div>
+    * 
+    * @param windowState
+    *            the new portlet window state
+    * 
+    * @exception WindowStateException
+    *                   if the portlet cannot switch to this state,
+    *                   because the portal does not support this state, the portlet has not 
+    *                   declared in its deployment descriptor that it supports this state, or the current
+    *                   user is not allowed to switch to this state.
+    *                   The <code>PortletRequest.isWindowStateAllowed()</code> method can be used
+    *                   to check if the portlet can set a given window state.
+    * @exception java.lang.IllegalStateException
+    *                if the method is invoked after <code>sendRedirect</code>
+    *                has been called.
+    * @exception java.lang.IllegalArgumentException
+    *                if the input parameter is <code>null</code>.
+    * 
+    * @since 3.0
+    * 
+    */
+
+   public void setWindowState(WindowState windowState)
+         throws WindowStateException;
+
+   /**
+    * <div class="changed_added_3_0">
+    * Sets the portlet mode of a portlet to the given portlet mode.
+    * <p>
+    * Possible values are the standard portlet modes and any custom portlet
+    * modes supported by the portal and the portlet. Portlets must declare in
+    * the deployment descriptor the portlet modes they support for each markup
+    * type. Standard portlet modes are:
+    * <ul>
+    * <li>EDIT
+    * <li>HELP
+    * <li>VIEW
+    * </ul>
+    * <p>
+    * Not more than one portlet mode can be set.
+    * If more than one portlet mode is set, only the last one set
+    * is valid.
+    * <p>
+    * Note: The portlet may still be called in a different portlet mode in the
+    * next render call, depending on the portlet container / portal.
+    * </div>
+    * 
+    * @param portletMode
+    *            the new portlet mode
+    * 
+    * @exception PortletModeException
+    *                   if the portlet cannot switch to this mode,
+    *                   because the portal does not support this mode, the portlet has not
+    *                   declared in its deployment descriptor that it supports this mode for the current markup,
+    *                   or the current user is not allowed to switch to this mode.
+    *                   The <code>PortletRequest.isPortletModeAllowed()</code> method can be used
+    *                   to check if the portlet can set a given portlet mode.
+    * @exception java.lang.IllegalStateException
+    *                if the method is invoked after <code>sendRedirect</code>
+    *                has been called.
+    * @exception java.lang.IllegalArgumentException
+    *                if the input parameter is <code>null</code>.
+    *                
+    * @since 3.0
+    */
+
+   public void setPortletMode(PortletMode portletMode)
+         throws PortletModeException;
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/PortletRequest.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/PortletRequest.java b/portlet-api/src/main/java/javax/portlet/PortletRequest.java
index 6653538..1ec5121 100644
--- a/portlet-api/src/main/java/javax/portlet/PortletRequest.java
+++ b/portlet-api/src/main/java/javax/portlet/PortletRequest.java
@@ -44,7 +44,7 @@ import java.util.Locale;
  * @see RenderRequest
  * @see ResourceRequest
  */
-public interface PortletRequest
+public interface PortletRequest extends PortletState
 {
     
    
@@ -325,24 +325,6 @@ public interface PortletRequest
 
 
   /**
-   * Returns the current portlet mode of the portlet.
-   *
-   * @return   the portlet mode
-   */
-
-  public PortletMode getPortletMode ();
-
-
-  /**
-   * Returns the current window state of the portlet.
-   *
-   * @return   the window state
-   */
-
-  public WindowState getWindowState ();
-
-
-  /**
    * Returns the preferences object associated with the portlet.
    *
    * @return the portlet preferences

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/PortletState.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/PortletState.java b/portlet-api/src/main/java/javax/portlet/PortletState.java
new file mode 100644
index 0000000..9e04522
--- /dev/null
+++ b/portlet-api/src/main/java/javax/portlet/PortletState.java
@@ -0,0 +1,70 @@
+package javax.portlet;
+
+/**
+ * <div class="changed_added_3_0">
+ * Provides read-only access to the portlet state.
+ * The portlet state is represented by the render parameters,
+ * portlet mode and window state.
+ * <p>
+ * During render or resource request processing, the portlet state is constant and 
+ * can be accessed through methods provided by this interface.
+ * <p>
+ * During portlet action or event request ptocessing, the portlet state can be modified for 
+ * subsequent render phase processing.
+ * During the portlet render or resource phases, URLs containing modified portlet state 
+ * can be created.
+ * When a portlet URL containing modified portlet state is triggered, the corresponding portlet
+ * phase is executed with the modified portlet state.
+ * <p>
+ * The portlet state is modified through {@link MutablePortletState}.
+ * </div> 
+ * @since      3.0
+ * @see        MutablePortletState
+ * @see        PortletParameters
+ */
+public interface PortletState {
+   
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Gets the render parameters.
+    * </div>
+    * 
+    * @return   an immutable <code>RenderParameters</code> object representing
+    *           the private and public render parameters
+    * @since    3.0
+    * @see      PortletParameters 
+    * @see      RenderParameters 
+    */
+   
+   public RenderParameters getRenderParameters();
+
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Returns the current portlet mode of the portlet.
+    * </div>
+    *
+    * @return     the portlet mode. If the portlet mode is not available, 
+    *             {@link PortletMode#UNDEFINED} is returned.
+    * @see        PortletMode
+    * @since      3.0
+    */
+
+   public PortletMode getPortletMode();
+
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Returns the current window state of the portlet.
+    * </div>
+    *
+    * @return     the window state. If the window state is not available, 
+    *             {@link WindowState#UNDEFINED} is returned.
+    * @see        WindowState
+    * @since      3.0
+    */
+
+   public WindowState getWindowState();
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/ResourceRequest.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/ResourceRequest.java b/portlet-api/src/main/java/javax/portlet/ResourceRequest.java
index 5aa77d0..f7918cc 100644
--- a/portlet-api/src/main/java/javax/portlet/ResourceRequest.java
+++ b/portlet-api/src/main/java/javax/portlet/ResourceRequest.java
@@ -1,210 +1,233 @@
-/*  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;
-
-/**
- * <span class="changed_modified_3_0">The</span>
- * <code>ResourceRequest</code> interface represents the request
- * send to the portlet for rendering resources.
- * 
- * It extends the ClientDataRequest interface and provides resource request
- * information to portlets.
- * <p>
- * The portlet container creates an <CODE>ResourceRequest</CODE> object and
- * passes it as argument to the portlet's <CODE>serveResource</CODE> method.
- * <p>
- * The <code>ResourceRequest</code> is provided with the current portlet mode, window state, 
- * and render parameters that the portlet can access via the 
- * <code>PortletResourceRequest</code> with <code>getPortletMode</code> and, 
- * <code>getWindowState</code>, or one of the <code>getParameter</code> methods.   
- * ResourceURLs cannot change the current portlet mode, window state or 
- * render parameters. Parameters set on a resource URL are not render parameters 
- * but parameters for serving this resource and will last only for only 
- * this the current serveResource request.<br>
- * If a parameter is set that has the same name as a render parameter that this 
- * resource URL contains, the render parameter must be the last entry in the 
- * parameter value array. 
- * 
- * @see ClientDataRequest
- * @see ResourceServingPortlet
- * @since 2.0
- */
-public interface ResourceRequest extends ClientDataRequest {
-
-    /**
-     * This property is set by the container if the container
-     * has a cached response for the given validation tag. The property can be
-     * retrieved using the <code>getProperty</code> method. 
-     * <P>
-     * The value is <code>"portlet.ETag "</code>.
-     */
-    public static final String ETAG = "portlet.ETag";
-
-    /**
-     * Returns the validation tag if the portlet container
-     * has a cached response for this validation tag, or
-     * <code>null</code> if no cached response exists.
-     * <p>
-     * This call returns the same value as 
-     * <code>ResourceRequest.getProperty(ResourceRequest.ETAG)</code>.
-     * 
-     * @return  the validation tag if the portlet container
-     *          has a cached response for this validation tag, or
-     *          <code>null</code> if no cached response exists.
-     */
-    public String getETag();
-    
-    /**
-     * Returns the resource ID set on the ResourceURL or <code>null</code>
-     * if no resource ID was set on the URL.
-     * 
-     * @return  the resource ID set on the ResourceURL,or <code>null</code>
-     *          if no resource ID was set on the URL. 
-     */
-    public String getResourceID();
-    
-    /**
-     * Returns a <code>Map</code> of the private render parameters of this request.
-     * Private parameters are not shared with other portlets or components.  
-     * The returned parameters are "x-www-form-urlencoded" decoded.
-     * <p>
-     * The parameters returned do not include the resource parameters that
-     * the portlet may have set on the resource URL triggering this
-     * <code>serveResource</code> call.
-     * <p>
-     * The values in the returned <code>Map</code> are from type
-     * String array (<code>String[]</code>).
-     * <p>
-     * If no private parameters exist this method returns an empty <code>Map</code>.
-     *
-     * @return     an immutable <code>Map</code> containing private parameter names as 
-     *             keys and private parameter values as map values, or an empty <code>Map</code>
-     *             if no private parameters exist. The keys in the parameter
-     *             map are of type String. The values in the parameter map are of type
-     *             String array (<code>String[]</code>).
-    *             
-    * @deprecated As of version 3.0. Use {@link PortletRequest#getRenderParameters()} instead.
-     */
-
-   @Deprecated
-    public java.util.Map<String, String[]> getPrivateRenderParameterMap();
-    
-   /**
-    * <div class="changed_added_3_0">
-    * Returns a <code>String</code> representing the current page state.
-    * <p>
-    * The content of the returned value is unspecified. It is to be passed to the
-    * Portlet Hub in order to conclude a Partial Action processing sequence. 
-    * <code>null</code> is a valid return value.
-    * <p>
-    * This call is only valid during Partial Action processing. If called at other times,
-    * the returned value is unspecified.
-    * <p>
-    * The Partial Action processing sequence provides support for infrastructure components
-    * such as a JSF Portlet Bridge to obtain page state information for use by the
-    * JavaScript Portlet Hub component.
-    * </div>
-    * 
-    * @return String to be passed to the Portlet Hub to conclude a Partial Action
-    *         processing sequence.
-    */
-   public String getPageState();
-
-    /**
-     * Returns the portal preferred content type for the response.
-     * <p>
-     * The returned content type should be based on the HTTP Accept header 
-     * provided by the client.
-     * 
-     * @return preferred content type of the response
-     */
-
-    public String getResponseContentType();
-
-
-    /**
-     * Gets a list of content types which the portal accepts for the response.
-     * This list is ordered with the most preferable types listed first.
-     * <p>
-     * The returned content types should be based on the HTTP Accept header 
-     * provided by the client.
-     *
-     * @return ordered list of content types for the response
-     */
-
-    public java.util.Enumeration<String> getResponseContentTypes();
-
-	/**
-	 * Returns the cache level of this resource request.
-	 * <p>
-	 * Possible return values are: 
-	 * <code>ResourceURL.FULL, ResourceURL.PORTLET</code> 
-	 * or <code>ResourceURL.PAGE</code>.
-	 * 
-     * @return  the cache level of this resource request.
-     */
-	public String getCacheability();
-
-
-   /**
-    * <span class="changed_modified_3_0">Returns</span> 
-    * the current portlet mode of the portlet.
-    * <div class="changed_added_3_0">
-    * <p>
-    * If called during a request where the cache level is set to 
-    * <code>ResourceURL.FULL</code>, the portlet mode will not
-    * be available. 
-    * </div>
-    *
-    * @return   the portlet mode.
-    * <span class="changed_added_3_0">
-    *           The portlet mode UNDEFINED will be returned if the cache level is
-    *           set to <code>ResourceURL.FULL</code>.  
-    * </span>
-    */
-
-   public PortletMode getPortletMode ();
-
-
-   /**
-    * <span class="changed_modified_3_0">Returns</span> 
-    * the current window state of the portlet.
-    * <div class="changed_added_3_0">
-    * <p>
-    * If called during a request where the cache level is set to 
-    * <code>ResourceURL.FULL</code>, the window state will not
-    * be available. 
-    * </div>
-    *
-    * @return   the window state.
-    * <span class="changed_added_3_0">
-    *           The window state UNDEFINED will be returned if the cache level is
-    *           set to <code>ResourceURL.FULL</code>.  
-    * </span>
-    */
-
-   public WindowState getWindowState ();
-
-}
+/*  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;
+
+/**
+ * <span class="changed_modified_3_0">The</span>
+ * <code>ResourceRequest</code> interface represents the request
+ * send to the portlet for rendering resources.
+ * 
+ * It extends the ClientDataRequest interface and provides resource request
+ * information to portlets.
+ * <p>
+ * The portlet container creates an <CODE>ResourceRequest</CODE> object and
+ * passes it as argument to the portlet's <CODE>serveResource</CODE> method.
+ * <p>
+ * The <code>ResourceRequest</code> is provided with the current portlet mode, window state, 
+ * and render parameters that the portlet can access via the 
+ * <code>PortletResourceRequest</code> with <code>getPortletMode</code> and, 
+ * <code>getWindowState</code>, or one of the <code>getParameter</code> methods.   
+ * ResourceURLs cannot change the current portlet mode, window state or 
+ * render parameters. Parameters set on a resource URL are not render parameters 
+ * but parameters for serving this resource and will last only for only 
+ * this the current serveResource request.<br>
+ * If a parameter is set that has the same name as a render parameter that this 
+ * resource URL contains, the render parameter must be the last entry in the 
+ * parameter value array. 
+ * 
+ * @see ClientDataRequest
+ * @see ResourceServingPortlet
+ * @since 2.0
+ */
+public interface ResourceRequest extends ClientDataRequest {
+
+   /**
+    * This property is set by the container if the container
+    * has a cached response for the given validation tag. The property can be
+    * retrieved using the <code>getProperty</code> method. 
+    * <P>
+    * The value is <code>"portlet.ETag "</code>.
+    */
+   public static final String ETAG = "portlet.ETag";
+
+   /**
+    * Returns the validation tag if the portlet container
+    * has a cached response for this validation tag, or
+    * <code>null</code> if no cached response exists.
+    * <p>
+    * This call returns the same value as 
+    * <code>ResourceRequest.getProperty(ResourceRequest.ETAG)</code>.
+    * 
+    * @return  the validation tag if the portlet container
+    *          has a cached response for this validation tag, or
+    *          <code>null</code> if no cached response exists.
+    */
+   public String getETag();
+
+   /**
+    * Returns the resource ID set on the ResourceURL or <code>null</code>
+    * if no resource ID was set on the URL.
+    * 
+    * @return  the resource ID set on the ResourceURL,or <code>null</code>
+    *          if no resource ID was set on the URL. 
+    */
+   public String getResourceID();
+
+   /**
+    * Returns a <code>Map</code> of the private render parameters of this request.
+    * Private parameters are not shared with other portlets or components.  
+    * The returned parameters are "x-www-form-urlencoded" decoded.
+    * <p>
+    * The parameters returned do not include the resource parameters that
+    * the portlet may have set on the resource URL triggering this
+    * <code>serveResource</code> call.
+    * <p>
+    * The values in the returned <code>Map</code> are from type
+    * String array (<code>String[]</code>).
+    * <p>
+    * If no private parameters exist this method returns an empty <code>Map</code>.
+    *
+    * @return     an immutable <code>Map</code> containing private parameter names as 
+    *             keys and private parameter values as map values, or an empty <code>Map</code>
+    *             if no private parameters exist. The keys in the parameter
+    *             map are of type String. The values in the parameter map are of type
+    *             String array (<code>String[]</code>).
+    *             
+    * @deprecated As of version 3.0. Use {@link PortletRequest#getRenderParameters()} instead.
+    */
+
+   @Deprecated
+   public java.util.Map<String, String[]> getPrivateRenderParameterMap();
+
+
+   /**
+    * <div class="changed_added_3_0">
+    * Gets the resource parameters set for this request.
+    * <p>
+    * Resource parameters are additional portlet parameters added to the 
+    * URL triggering the request that extend the state information provided by 
+    * the render parameters.
+    * <p>
+    * {@link PortletParameters} provides a description of the parameter concept.
+    * </div>
+    * 
+    * @return   an immutable <code>ResourceParameters</code> object representing
+    *           the resource parameters
+    * @since    3.0
+    * @see      PortletParameters 
+    * @see      MutableResourceParameters 
+    * @see      ResourceURL 
+    */
+
+   public ResourceParameters getResourceParameters();
+   
+   /**
+    * <div class="changed_added_3_0">
+    * Returns a <code>String</code> representing the current page state.
+    * <p>
+    * The content of the returned value is unspecified. It is to be passed to the
+    * Portlet Hub in order to conclude a Partial Action processing sequence. 
+    * <code>null</code> is a valid return value.
+    * <p>
+    * This call is only valid during Partial Action processing. If called at other times,
+    * the returned value is unspecified.
+    * <p>
+    * The Partial Action processing sequence provides support for infrastructure components
+    * such as a JSF Portlet Bridge to obtain page state information for use by the
+    * JavaScript Portlet Hub component.
+    * </div>
+    * 
+    * @return String to be passed to the Portlet Hub to conclude a Partial Action
+    *         processing sequence.
+    */
+   public String getPageState();
+
+
+   /**
+    * Returns the portal preferred content type for the response.
+    * <p>
+    * The returned content type should be based on the HTTP Accept header 
+    * provided by the client.
+    * 
+    * @return preferred content type of the response
+    */
+
+   public String getResponseContentType();
+
+
+   /**
+    * Gets a list of content types which the portal accepts for the response.
+    * This list is ordered with the most preferable types listed first.
+    * <p>
+    * The returned content types should be based on the HTTP Accept header 
+    * provided by the client.
+    *
+    * @return ordered list of content types for the response
+    */
+
+   public java.util.Enumeration<String> getResponseContentTypes();
+
+   /**
+    * Returns the cache level of this resource request.
+    * <p>
+    * Possible return values are: 
+    * <code>ResourceURL.FULL, ResourceURL.PORTLET</code> 
+    * or <code>ResourceURL.PAGE</code>.
+    * 
+    * @return  the cache level of this resource request.
+    */
+   public String getCacheability();
+
+
+   /**
+    * <span class="changed_modified_3_0">Returns</span> 
+    * the current portlet mode of the portlet.
+    * <div class="changed_added_3_0">
+    * <p>
+    * If called during a request where the cache level is set to 
+    * <code>ResourceURL.FULL</code>, the portlet mode will not
+    * be available. 
+    * </div>
+    *
+    * @return   the portlet mode.
+    * <span class="changed_added_3_0">
+    *           The portlet mode UNDEFINED will be returned if the cache level is
+    *           set to <code>ResourceURL.FULL</code>.  
+    * </span>
+    */
+
+   public PortletMode getPortletMode ();
+
+
+   /**
+    * <span class="changed_modified_3_0">Returns</span> 
+    * the current window state of the portlet.
+    * <div class="changed_added_3_0">
+    * <p>
+    * If called during a request where the cache level is set to 
+    * <code>ResourceURL.FULL</code>, the window state will not
+    * be available. 
+    * </div>
+    *
+    * @return   the window state.
+    * <span class="changed_added_3_0">
+    *           The window state UNDEFINED will be returned if the cache level is
+    *           set to <code>ResourceURL.FULL</code>.  
+    * </span>
+    */
+
+   public WindowState getWindowState ();
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/filter/ActionRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/ActionRequestWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/ActionRequestWrapper.java
index 9d54e25..41fb116 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/ActionRequestWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/ActionRequestWrapper.java
@@ -29,10 +29,13 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
 
+import javax.portlet.ActionParameters;
 import javax.portlet.ActionRequest;
+import javax.portlet.PortletParameters;
 
 /**
- * The <code>ActionRequestWrapper</code> provides a convenient 
+ * <span class="changed_modified_3_0">The</span> 
+ * <code>ActionRequestWrapper</code> provides a convenient 
  * implementation of the <code>ActionRequest</code> interface 
  * that can be subclassed by developers wishing to adapt the request.
  * This class implements the Wrapper or Decorator pattern. 
@@ -139,4 +142,14 @@ public class ActionRequestWrapper extends PortletRequestWrapper implements Actio
         return request.getMethod();
     }
 
+    /**
+     * <div class="changed_added_3_0">
+     *  The default behavior of this method is to call 
+     * <code>getActionParameters()</code> on the wrapped request object.
+     * </div>
+     */
+   public ActionParameters getActionParameters() {
+      return request.getActionParameters();
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
index 7245eee..e198c2f 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/PortletRequestWrapper.java
@@ -31,14 +31,17 @@ import java.util.Map;
 
 import javax.portlet.PortalContext;
 import javax.portlet.PortletMode;
+import javax.portlet.PortletParameters;
 import javax.portlet.PortletPreferences;
 import javax.portlet.PortletRequest;
 import javax.portlet.PortletSession;
+import javax.portlet.RenderParameters;
 import javax.portlet.WindowState;
 import javax.servlet.http.Cookie;
 
 /**
- * The <code>PortletRequestWrapper</code> provides a convenient 
+ * <span class="changed_modified_3_0">The</span> 
+ * <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. 
@@ -53,9 +56,10 @@ public class PortletRequestWrapper implements PortletRequest {
     
     /** 
      * Require having a request for constructing
-     * the wrapper.
-     *
+    * the wrapper
      */
+   
+   @SuppressWarnings("unused")
     private PortletRequestWrapper() {
     }
     
@@ -123,9 +127,20 @@ public class PortletRequestWrapper implements PortletRequest {
     }
 
     /**
+    * <div class="changed_modified_3_0"> 
+    * The default behavior of this method is to call 
+    * <code>getRenderParameters()</code> on the wrapped request object.
+    * </div>
+    */
+   public RenderParameters getRenderParameters() {
+      return request.getRenderParameters();
+   }
+
+   /**
      * The default behavior of this method is to call 
      * <code>getParameter(String name)</code> on the wrapped request object.
      */
+   @Deprecated
     public String getParameter(String name) {
         return request.getParameter(name);
     }
@@ -134,6 +149,7 @@ public class PortletRequestWrapper implements PortletRequest {
      * The default behavior of this method is to call 
      * <code>getParameterMap()</code> on the wrapped request object.
      */
+   @Deprecated
     public Map<String, String[]> getParameterMap() {
         return request.getParameterMap();
     }
@@ -142,6 +158,7 @@ public class PortletRequestWrapper implements PortletRequest {
      * The default behavior of this method is to call 
      * <code>getParameterNames()</code> on the wrapped request object.
      */
+   @Deprecated
     public Enumeration<String> getParameterNames() {
         return request.getParameterNames();
     }
@@ -150,6 +167,7 @@ public class PortletRequestWrapper implements PortletRequest {
      * The default behavior of this method is to call 
      * <code>getParameterValues(name)</code> on the wrapped request object.
      */
+   @Deprecated
     public String[] getParameterValues(String name) {
         return request.getParameterValues(name);
     }
@@ -388,6 +406,7 @@ public class PortletRequestWrapper implements PortletRequest {
      *  The default behavior of this method is to call 
      * <code>getPrivateParameterMap()</code> on the wrapped request object.
      */
+   @Deprecated 
 	public Map<String, String[]> getPrivateParameterMap() {
 		return request.getPrivateParameterMap();
 	}
@@ -396,6 +415,7 @@ public class PortletRequestWrapper implements PortletRequest {
      *  The default behavior of this method is to call 
      * <code>getPublicParameterMap()</code> on the wrapped request object.
      */
+   @Deprecated
 	public Map<String, String[]> getPublicParameterMap() {
 		return request.getPublicParameterMap();
 	}


[3/5] portals-pluto git commit: Added new parameter structures to the Requests. Added V3 parameter test portlet to the PortletV3Demo portlet application.

Posted by ms...@apache.org.
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/23df6c27/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
----------------------------------------------------------------------
diff --git a/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java b/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
index b56aeb5..5c26e7b 100644
--- a/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
+++ b/portlet-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
@@ -30,10 +30,13 @@ import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
 import java.util.Map;
 
+import javax.portlet.PortletParameters;
+import javax.portlet.ResourceParameters;
 import javax.portlet.ResourceRequest;
 
 /**
- * The <code>ResourceRequestWrapper</code> provides a convenient 
+ * <span class="changed_modified_3_0">The</span>  
+ * <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. 
@@ -160,8 +163,9 @@ public class ResourceRequestWrapper extends PortletRequestWrapper implements Res
      * The default behavior of this method is to call 
      * <code>getPrivateRenderParameterMap()</code> on the wrapped request object.
      */
+   @Deprecated
 	public Map<String, String[]> getPrivateRenderParameterMap() {
-		return request.getPrivateParameterMap();
+		return request.getPrivateRenderParameterMap();
 	}
 
     /**
@@ -172,6 +176,16 @@ public class ResourceRequestWrapper extends PortletRequestWrapper implements Res
         return request.getCacheability();
     }
 
+   /**
+    * <div class="changed_modified_3_0">  
+    *  The default behavior of this method is to call 
+    * <code>getResourceParameters()</code> on the wrapped response object.
+    * </div>
+    */
+   public ResourceParameters getResourceParameters() {
+      return request.getResourceParameters();
+   }
+
    /* (non-Javadoc)
     * @see javax.portlet.ResourceRequest#getPageState()
     */