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

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

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequest.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequest.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequest.java
new file mode 100644
index 0000000..e42dc4d
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequest.java
@@ -0,0 +1,944 @@
+/*  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.Locale;
+
+
+/**
+ * The <CODE>PortletRequest</CODE> defines the base interface to provide client
+ * request information to a portlet. The portlet container uses two specialized
+ * versions of this interface when invoking a portlet, <CODE>ActionRequest</CODE>
+ * and <CODE>RenderRequest</CODE>. The portlet container creates these objects and 
+ * passes them as  arguments to the portlet's <CODE>processAction</CODE> and
+ * <CODE>render</CODE> methods.
+ * 
+ * @see ActionRequest
+ * @see RenderRequest
+ */
+public interface PortletRequest
+{
+    
+  /** Used to retrieve user information attributes with the 
+   * <code>getAttribute</code> call. The user information is returned 
+   * as a <code>Map</code> object. The portlet must define the 
+   * user information attribute it is interested in inside the 
+   * <code>user-attribute</code> section of the deployment descriptor.
+   * If an attribute is not supported
+   * by the current runtime system it will not show up in the user
+   * attribute map.<BR>
+   * If the user-attribute is supported by the runtime system, but not 
+   * defined for a particular user, then for that user the attribute 
+   * exists in the returned map and the attribute has a <code>null</code> value.
+   * <p>
+   * If the user-attribute is not defined for the current user it
+   * will not show up in the Map.
+   * <p>
+   * The value is <code>javax.portlet.userinfo</code>.
+   */
+  public static final String USER_INFO = "javax.portlet.userinfo";
+
+  /**
+   * Used to retrieve an instance of the <code>javax.ccpp.Profile</code>
+   * with the <code>getAttribute</code> call. The returned profile is based
+   * on the current portlet request and may contain additional CC/PP 
+   * information set by the portal / portlet container.   
+   * <p>
+   * The value is <code>javax.portlet.ccpp</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String CCPP_PROFILE = "javax.portlet.ccpp";
+
+  /**
+   * String identifier for Basic authentication. Value "BASIC".
+   */
+  public static final String BASIC_AUTH = "BASIC";
+
+  /**
+   * String identifier for Form based authentication. Value "FORM".
+   */
+  public static final String FORM_AUTH = "FORM";
+
+  /**
+   * String identifier for Certification based authentication. Value "CLIENT_CERT".
+   */
+  public static final String CLIENT_CERT_AUTH = "CLIENT_CERT";
+
+  /**
+   * String identifier for Digest based authentication. Value "DIGEST".
+   */
+  public static final String DIGEST_AUTH = "DIGEST";
+
+  /**
+   * P3P user information constants.
+   * <p>
+   * Note: these are only available in the Java SE 5.0 supported version
+   * of the API.
+   * 
+   * @since 2.0
+   */
+  public enum P3PUserInfos {
+      USER_BDATE_YMD_YEAR("user.bdate.ymd.year"), USER_BDATE_YMD_MONTH("user.bdate.ymd.month"),
+      USER_BDATE_YMD_DAY("user.bdate.ymd.day"), USER_BDATE_HMS_HOUR("user.bdate.hms.hour"),
+	  USER_BDATE_HMS_MINUTE("user.bdate.hms.minute"), USER_BDATE_HMS_SECOND("user.bdate.hms.second"),
+	  USER_BDATE_FRACTIONSECOND("user.bdate.fractionsecond"), USER_BDATE_TIMEZONE("user.bdate.timezone"),
+	  USER_GENDER("user.gender"), USER_EMPLOYER("user.employer"), 
+      USER_DEPARTMENT("user.department"), USER_JOBTITLE("user.jobtitle"), 
+      USER_NAME_PREFIX("user.name.prefix"), USER_NAME_GIVEN("user.name.given"), 
+      USER_NAME_FAMILY("user.name.family"), USER_NAME_MIDDLE("user.name.middle"),
+      USER_NAME_SUFFIX("user.name.suffix"), USER_NAME_NICKNAME("user.name.nickName"),
+      USER_LOGIN_ID("user.login.id"),
+      USER_HOMEINFO_POSTAL_NAME("user.home-info.postal.name"), 
+      USER_HOMEINFO_POSTAL_STREET("user.home-info.postal.street"),
+      USER_HOMEINFO_POSTAL_CITY("user.home-info.postal.city"), 
+      USER_HOMEINFO_POSTAL_STATEPROV("user.home-info.postal.stateprov"),
+      USER_HOMEINFO_POSTAL_POSTALCODE("user.home-info.postal.postalcode"),
+      USER_HOMEINFO_POSTAL_COUNTRY("user.home-info.postal.country"), 
+      USER_HOMEINFO_POSTAL_ORGANIZATION("user.home-info.postal.organization"), 
+      USER_HOMEINFO_TELECOM_TELEPHONE_INTCODE("user.home-info.telecom.telephone.intcode"),
+      USER_HOMEINFO_TELECOM_TELEPHONE_LOCCODE("user.home-info.telecom.telephone.loccode"),
+      USER_HOMEINFO_TELECOM_TELEPHONE_NUMBER("user.home-info.telecom.telephone.number"),
+      USER_HOMEINFO_TELECOM_TELEPHONE_EXT("user.home-info.telecom.telephone.ext"),
+      USER_HOMEINFO_TELECOM_TELEPHONE_COMMENT("user.home-info.telecom.telephone.comment"),
+      USER_HOMEINFO_TELECOM_FAX_INTCODE("user.home-info.telecom.fax.intcode"),
+      USER_HOMEINFO_TELECOM_FAX_LOCCODE("user.home-info.telecom.fax.loccode"),
+      USER_HOMEINFO_TELECOM_FAX_NUMBER("user.home-info.telecom.fax.number"),
+      USER_HOMEINFO_TELECOM_FAX_EXT("user.home-info.telecom.fax.ext"),
+      USER_HOMEINFO_TELECOM_FAX_COMMENT("user.home-info.telecom.fax.comment"),
+      USER_HOMEINFO_TELECOM_MOBILE_INTCODE("user.home-info.telecom.mobile.intcode"),
+      USER_HOMEINFO_TELECOM_MOBILE_LOCCODE("user.home-info.telecom.mobile.loccode"),
+      USER_HOMEINFO_TELECOM_MOBILE_NUMBER("user.home-info.telecom.mobile.number"),
+      USER_HOMEINFO_TELECOM_MOBILE_EXT("user.home-info.telecom.mobile.ext"),
+      USER_HOMEINFO_TELECOM_MOBILE_COMMENT("user.home-info.telecom.mobile.comment"),
+      USER_HOMEINFO_TELECOM_PAGER_INTCODE("user.home-info.telecom.pager.intcode"),
+      USER_HOMEINFO_TELECOM_PAGER_LOCCODE("user.home-info.telecom.pager.loccode"),
+      USER_HOMEINFO_TELECOM_PAGER_NUMBER("user.home-info.telecom.pager.number"),
+      USER_HOMEINFO_TELECOM_PAGER_EXT("user.home-info.telecom.pager.ext"),
+      USER_HOMEINFO_TELECOM_PAGER_COMMENT("user.home-info.telecom.pager.comment"),
+      USER_HOMEINFO_ONLINE_EMAIL("user.home-info.online.email"),
+      USER_HOMEINFO_ONLINE_URI("user.home-info.online.uri"),
+      USER_BUSINESSINFO_POSTAL_NAME("user.business-info.postal.name"), 
+      USER_BUSINESSINFO_POSTAL_STREET("user.business-info.postal.street"),
+      USER_BUSINESSINFO_POSTAL_CITY("user.business-info.postal.city"), 
+      USER_BUSINESSINFO_POSTAL_STATEPROV("user.business-info.postal.stateprov"),
+      USER_BUSINESSINFO_POSTAL_POSTALCODE("user.business-info.postal.postalcode"),
+      USER_BUSINESSINFO_POSTAL_COUNTRY("user.business-info.postal.country"), 
+      USER_BUSINESSINFO_POSTAL_ORGANIZATION("user.business-info.postal.organization"), 
+      USER_BUSINESSINFO_TELECOM_TELEPHONE_INTCODE("user.business-info.telecom.telephone.intcode"),
+      USER_BUSINESSINFO_TELECOM_TELEPHONE_LOCCODE("user.business-info.telecom.telephone.loccode"),
+      USER_BUSINESSINFO_TELECOM_TELEPHONE_NUMBER("user.business-info.telecom.telephone.number"),
+      USER_BUSINESSINFO_TELECOM_TELEPHONE_EXT("user.business-info.telecom.telephone.ext"),
+      USER_BUSINESSINFO_TELECOM_TELEPHONE_COMMENT("user.business-info.telecom.telephone.comment"),
+      USER_BUSINESSINFO_TELECOM_FAX_INTCODE("user.business-info.telecom.fax.intcode"),
+      USER_BUSINESSINFO_TELECOM_FAX_LOCCODE("user.business-info.telecom.fax.loccode"),
+      USER_BUSINESSINFO_TELECOM_FAX_NUMBER("user.business-info.telecom.fax.number"),
+      USER_BUSINESSINFO_TELECOM_FAX_EXT("user.business-info.telecom.fax.ext"),
+      USER_BUSINESSINFO_TELECOM_FAX_COMMENT("user.business-info.telecom.fax.comment"),
+      USER_BUSINESSINFO_TELECOM_MOBILE_INTCODE("user.business-info.telecom.mobile.intcode"),
+      USER_BUSINESSINFO_TELECOM_MOBILE_LOCCODE("user.business-info.telecom.mobile.loccode"),
+      USER_BUSINESSINFO_TELECOM_MOBILE_NUMBER("user.business-info.telecom.mobile.number"),
+      USER_BUSINESSINFO_TELECOM_MOBILE_EXT("user.business-info.telecom.mobile.ext"),
+      USER_BUSINESSINFO_TELECOM_MOBILE_COMMENT("user.business-info.telecom.mobile.comment"),
+      USER_BUSINESSINFO_TELECOM_PAGER_INTCODE("user.business-info.telecom.pager.intcode"),
+      USER_BUSINESSINFO_TELECOM_PAGER_LOCCODE("user.business-info.telecom.pager.loccode"),
+      USER_BUSINESSINFO_TELECOM_PAGER_NUMBER("user.business-info.telecom.pager.number"),
+      USER_BUSINESSINFO_TELECOM_PAGER_EXT("user.business-info.telecom.pager.ext"),
+      USER_BUSINESSINFO_TELECOM_PAGER_COMMENT("user.business-info.telecom.pager.comment"),
+      USER_BUSINESSINFO_ONLINE_EMAIL("user.business-info.online.email"),
+      USER_BUSINESSINFO_ONLINE_URI("user.business-info.online.uri");
+      P3PUserInfos(String value) {this.value = value; }
+      private final String value;
+      public String toString() {return value;}
+  }
+  
+  /**
+   * String identifier for the portlet action lifecycle phase. In this
+   * phase the portlet request and response are from type
+   * <code>ActionRequest</code> and <code>ActionResponse</code>.
+   * <p>
+   * The value of the constant is <code>ACTION_PHASE</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String ACTION_PHASE = "ACTION_PHASE";
+  
+  /**
+   * String identifier for the portlet event lifecycle phase. In this
+   * phase the portlet request and response are from type
+   * <code>EventRequest</code> and <code>EventResponse</code>.
+   * <p>
+   * The value of the constant is <code>EVENT_PHASE</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String EVENT_PHASE = "EVENT_PHASE";
+  
+  /**
+   * String identifier for the portlet render lifecycle phase. In this
+   * phase the portlet request and response are from type
+   * <code>RenderRequest</code> and <code>RenderResponse</code>.
+   * <p>
+   * The value of the constant is <code>RENDER_PHASE</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String RENDER_PHASE = "RENDER_PHASE";
+  
+  /**
+   * String identifier for the portlet resource serving lifecycle phase. In this
+   * phase the portlet request and response are from type
+   * <code>ResourceRequest</code> and <code>ResourceResponse</code>.
+   * <p>
+   * The value of the constant is <code>RESOURCE_PHASE</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String RESOURCE_PHASE = "RESOURCE_PHASE";
+    
+  /**
+   * Provides the portlet lifecycle phase of the current request
+   * as request attribute.
+   * <p>
+   * Valid values are: ACTION_PHASE, EVENT_PHASE, RENDER_PHASE,
+   * RESOURCE_SERVING_PHASE.
+   * <p>
+   * The value of the constant is <code>javax.portlet.lifecylce_phase</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String LIFECYCLE_PHASE = "javax.portlet.lifecycle_phase";
+  
+  
+  /**
+   * The RENDER_PART portlet request attribute is set by portals
+   * that are streaming based and therefore need to split the
+   * render phase into two parts: first the RENDER_HEADERS part
+   * where the portlet should only set the header related data
+   * and the portlet title, and second the RENDER_MARKUP part
+   * in which the portlet should produce its markup.
+   * <p>
+   * Non-streaming portals will not set this attribute and thus
+   * the portlet should set headers, portlet title and produce
+   * its markup in a single render request.
+   * <p>
+   * The value of the constant is <code>javax.portlet.render_part</code>.
+   * 
+   *  @since 2.0
+   */
+  public static final String RENDER_PART = "javax.portlet.render_part";
+  
+  /**
+   * The RENDER_HEADERS is a possible value of the RENDER_PART
+   * request attribute and denotes that the portlet should set
+   * the intended headers and the portlet title of this render
+   * request.
+   * <p>
+   * The value of the constant is <code>RENDER_HEADERS</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String RENDER_HEADERS = "RENDER_HEADERS";
+
+  /**
+   * The RENDER_MARKUP is a possible value of the RENDER_PART
+   * request attribute and denotes that the portlet should
+   * produce its markup for this render request.
+   * <p>
+   * The value of the constant is <code>RENDER_MARKUP</code>.
+   * 
+   * @since 2.0
+   */
+  public static final String RENDER_MARKUP = "RENDER_MARKUP";
+
+  /**
+   * The action scope ID that the portlet container uses
+   * for storing the current action scope as render parameter
+   * if the <code>javax.portlet.actionScopedRequestAttributes</code>
+   * container runtime option is used by the portlet.
+   * <p>
+   * The value is <code>javax.portlet.as</code>.
+   * @since 2.0
+   */
+  public static final String ACTION_SCOPE_ID = "javax.portlet.as";
+  
+  
+  /**
+   * Returns true, if the given window state is valid
+   * to be set for this portlet in the context
+   * of the current request.
+   *
+   * @param  state    window state to checked
+   *
+   * @return    true, if it is valid for this portlet
+   *             in this request to change to the
+   *            given window state
+   *
+   */
+  public boolean isWindowStateAllowed(WindowState state);
+
+
+/**
+   * Returns true, if the given portlet mode is a valid
+   * one to set for this portlet  in the context
+   * of the current request.
+   *
+   * @param  mode    portlet mode to check
+   *
+   * @return    true, if it is valid for this portlet
+   *             in this request to change to the
+   *            given portlet mode
+   *
+   */
+
+  public boolean isPortletModeAllowed(PortletMode mode);
+
+
+  /**
+   * 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
+   */
+  public PortletPreferences getPreferences ();
+
+
+  /**
+   * Returns the current portlet session or, if there is no current session,
+   * creates one and returns the new session.
+   *  <p>
+   * Creating a new portlet session will result in creating
+   * a new <code>HttpSession</code> on which the portlet session is based on.
+   *
+   * @return the portlet session
+   */
+
+  public PortletSession getPortletSession ();
+
+
+  /**
+   * Returns the current portlet session or, if there is no current session
+   * and the given flag is <CODE>true</CODE>, creates one and returns
+   * the new session.
+   * <P>
+   * If the given flag is <CODE>false</CODE> and there is no current
+   * portlet session, this method returns <CODE>null</CODE>.
+   *  <p>
+   * Creating a new portlet session will result in creating
+   * a new <code>HttpSession</code> on which the portlet session is based on.
+   * 
+   * @param create
+   *               <CODE>true</CODE> to create a new session, <BR>
+   *               <CODE>false</CODE> to return <CODE>null</CODE> if there
+   *               is no current session
+   * @return the portlet session
+   * 
+   */
+
+  public PortletSession getPortletSession (boolean create);
+
+
+  /**
+   * Returns the value of the specified request property
+   * as a <code>String</code>. If the request did not include a property
+   * of the specified name, this method returns <code>null</code>.
+   * <p>
+   * A portlet can access portal/portlet-container specific properties 
+   * through this method and, if available, the
+   * headers of the HTTP client request.
+   * <p>
+   * This method should only be used if the 
+   * property has only one value. If the property might have
+   * more than one value, use {@link #getProperties}.
+   * <p>
+   * If this method is used with a multivalued
+   * parameter, the value returned is equal to the first value
+   * in the Enumeration returned by <code>getProperties</code>.
+   *
+   * @param name		a <code>String</code> specifying the
+   *				property name
+   *
+   * @return			a <code>String</code> containing the
+   *				value of the requested
+   *				property, or <code>null</code>
+   *				if the request does not
+   *				have a property of that name.
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */			
+
+  public String getProperty(String name); 
+
+
+  /**
+   * Returns all the values of the specified request property
+   * as a <code>Enumeration</code> of <code>String</code> objects.
+   * <p>
+   * If the request did not include any properties
+   * of the specified name, this method returns an empty
+   * <code>Enumeration</code>.
+   * The property name is case insensitive. You can use
+   * this method with any request property.
+   *
+   * @param name		a <code>String</code> specifying the
+   *				property name
+   *
+   * @return		a <code>Enumeration</code> containing
+   *                  	the values of the requested property. If
+   *                  	the request does not have any properties of
+   *                  	that name return an empty <code>Enumeration</code>.
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */			
+  
+  public java.util.Enumeration<String> getProperties(String name); 
+    
+    
+  /**
+   *
+   * Returns a <code>Enumeration</code> of all the property names
+   * this request contains. If the request has no
+   * properties, this method returns an empty <code>Enumeration</code>.
+   *
+   *
+   * @return			an <code>Enumeration</code> of all the
+   *				property names sent with this
+   *				request; if the request has
+   *				no properties, an empty <code>Enumeration</code>.
+   */
+
+  public java.util.Enumeration<String> getPropertyNames();
+    
+    
+  /**
+   * Returns the context of the calling portal.
+   *
+   * @return the context of the calling portal
+   */
+
+  public PortalContext getPortalContext();
+
+
+  /**
+   * Returns the name of the authentication scheme used for the 
+   * connection between client and portal,
+   * for example, <code>BASIC_AUTH</code>, <code>CLIENT_CERT_AUTH</code>, 
+   * a custom one or <code>null</code> if there was no authentication.
+   *
+   * @return		one of the static members <code>BASIC_AUTH</code>, 
+   *			<code>FORM_AUTH</code>, <code>CLIENT_CERT_AUTH</code>, 
+   *                    <code>DIGEST_AUTH</code> (suitable for == comparison) 
+   *			indicating the authentication scheme, 
+   *                    a custom one, or 
+   *			<code>null</code> if the request was 
+   *			not authenticated.     
+   */
+
+  public java.lang.String getAuthType();
+  
+
+   /**
+    * Returns the context path which is the path prefix associated with the deployed 
+    * portlet application. If the portlet application is rooted at the
+    * base of the web server URL namespace (also known as "default" context), 
+    * this path must be an empty string. Otherwise, it must be the path the
+    * portlet application is rooted to, the path must start with a '/' and 
+    * it must not end with a '/' character.
+    * <p>
+    * To encode a URL the {@link PortletResponse#encodeURL} method must be used.
+    *
+    * @return		a <code>String</code> specifying the
+    *			portion of the request URL that indicates the context
+    *			of the request
+    *
+    * @see PortletResponse#encodeURL
+    */
+
+  public String getContextPath();
+
+
+  /**
+   * Returns the login of the user making this request, if the user 
+   * has been authenticated, or null if the user has not been authenticated.
+   *
+   * @return		a <code>String</code> specifying the login
+   *			of the user making this request, or <code>null</code>
+   *			if the user login is not known.
+   *
+   */
+
+  public java.lang.String getRemoteUser();
+
+
+  /**
+   * Returns a java.security.Principal object containing the name of the 
+   * current authenticated user.
+   *
+   * @return		a <code>java.security.Principal</code> containing
+   *			the name of the user making this request, or
+   *			<code>null</code> if the user has not been 
+   *			authenticated.
+   */
+
+  public java.security.Principal getUserPrincipal();
+
+
+  /**
+   * Returns a boolean indicating whether the authenticated user is 
+   * included in the specified logical "role".  Roles and role membership can be
+   * defined using deployment descriptors.  If the user has not been
+   * authenticated, the method returns <code>false</code>.
+   *
+   * @param role		a <code>String</code> specifying the name
+   *				of the role
+   *
+   * @return		a <code>boolean</code> indicating whether
+   *			the user making this request belongs to a given role;
+   *			<code>false</code> if the user has not been 
+   *			authenticated.
+   */
+
+  public boolean isUserInRole(java.lang.String role);
+
+
+  /**
+   *
+   * Returns the value of the named attribute as an <code>Object</code>,
+   * or <code>null</code> if no attribute of the given name exists. 
+   * <p>
+   * Attribute names should follow the same conventions as package
+   * names. This specification reserves names matching <code>java.*</code>,
+   * and <code>javax.*</code>. 
+   * <p>
+   * In a distributed portlet web application the <code>Object</code>
+   * needs to be serializable.
+   *
+   * @param name	a <code>String</code> specifying the name of 
+   *			the attribute
+   *
+   * @return		an <code>Object</code> containing the value 
+   *			of the attribute, or <code>null</code> if
+   *			the attribute does not exist.
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   *
+   */
+
+  public Object getAttribute(String name);
+
+
+  /**
+   * Returns an <code>Enumeration</code> containing the
+   * names of the attributes available to this request. 
+   * This method returns an empty <code>Enumeration</code>
+   * if the request has no attributes available to it.
+   * 
+   *
+   * @return		an <code>Enumeration</code> of strings 
+   *			containing the names 
+   * 			of the request attributes, or an empty 
+   *                    <code>Enumeration</code> if the request 
+   *                    has no attributes available to it.
+   */
+  
+  public java.util.Enumeration<String> getAttributeNames();
+
+
+  /**
+   * Returns the value of a request parameter as a <code>String</code>,
+   * or <code>null</code> if the parameter does not exist. Request parameters
+   * are extra information sent with the request. The returned parameter 
+   * are "x-www-form-urlencoded" decoded.
+   * <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 #getParameterValues}.
+   * <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>getParameterValues</code>.
+   *
+   *
+   *
+   * @param name 	a <code>String</code> specifying the 
+   *			name of the parameter
+   *
+   * @return		a <code>String</code> representing the 
+   *			single value of the parameter
+   *
+   * @see 		#getParameterValues
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   *
+   */
+  
+  public String getParameter(String name);
+
+
+  /**
+   *
+   * Returns an <code>Enumeration</code> of <code>String</code>
+   * objects containing the names of the parameters contained
+   * in this request. If the request has 
+   * no parameters, the method returns an 
+   * empty <code>Enumeration</code>. 
+   * <p>
+   * Only parameters targeted to the current portlet are returned.
+   *
+   *
+   * @return		an <code>Enumeration</code> of <code>String</code>
+   *			objects, each <code>String</code> containing
+   * 			the name of a request parameter; or an 
+   *			empty <code>Enumeration</code> if the
+   *			request has no parameters.
+   */
+
+  public java.util.Enumeration<String> getParameterNames();
+
+
+  /**
+   * Returns an array of <code>String</code> objects containing 
+   * all of the values the given request parameter has, or 
+   * <code>null</code> if the parameter does not exist.
+   * The returned parameters are "x-www-form-urlencoded" decoded.
+   * <p>
+   * If the parameter has a single value, the array has a length
+   * of 1.
+   *
+   *
+   * @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.
+   *
+   * @see		#getParameter
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   *
+   */
+
+  public String[] getParameterValues(String name);
+
+
+  /** 
+   * Returns a <code>Map</code> of the parameters of this request.
+   * Request parameters are extra information sent with the request.  
+   * The returned parameters are "x-www-form-urlencoded" decoded.
+   * <p>
+   * The values in the returned <code>Map</code> are from type
+   * String array (<code>String[]</code>).
+   * <p>
+   * If no parameters exist this method returns an empty <code>Map</code>.
+   *
+   * @return     an immutable <code>Map</code> containing parameter names as 
+   *             keys and parameter values as map values, or an empty <code>Map</code>
+   *             if no 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>).
+   */
+
+  public java.util.Map<String, String[]> getParameterMap();
+
+
+  /**
+   * Returns a boolean indicating whether this request was made 
+   * using a secure channel between client and the portal, such as HTTPS.
+   * 
+   * @return  true, if the request was made using a secure channel.
+   */
+
+  public boolean isSecure();
+
+
+  /**
+   * Stores an attribute in this request.
+   *
+   * <p>Attribute names should follow the same conventions as
+   * package names. Names beginning with <code>java.*</code>,
+   * <code>javax.*</code>, and <code>com.sun.*</code> are
+   * reserved.
+   *<br> If the value passed into this method is <code>null</code>, 
+   * the effect is the same as calling {@link #removeAttribute}.
+   *
+   *
+   * @param name			a <code>String</code> specifying 
+   *					the name of the attribute
+   *
+   * @param o				the <code>Object</code> to be stored
+   *
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */
+  
+  public void setAttribute(String name, Object o);
+
+
+  /**
+   *
+   * Removes an attribute from this request.  This method is not
+   * generally needed, as attributes only persist as long as the request
+   * is being handled.
+   *
+   * <p>Attribute names should follow the same conventions as
+   * package names. Names beginning with <code>java.*</code>,
+   * <code>javax.*</code>, and <code>com.sun.*</code> are
+   * reserved.
+   *
+   * @param name			a <code>String</code> specifying 
+   *					the name of the attribute to be removed
+   *
+   *
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */
+
+  public void removeAttribute(String name);
+
+   
+  /**
+   *
+   * Returns the session ID indicated in the client request.
+   * This session ID may not be a valid one, it may be an old 
+   * one that has expired or has been invalidated.
+   * If the client request
+   * did not specify a session ID, this method returns
+   * <code>null</code>.
+   *
+   * @return		a <code>String</code> specifying the session
+   *			ID, or <code>null</code> if the request did
+   *			not specify a session ID
+   *
+   * @see		#isRequestedSessionIdValid
+   *
+   */
+
+  public String getRequestedSessionId();
+
+
+  /**
+   *
+   * Checks whether the requested session ID is still valid.
+   *
+   * @return			<code>true</code> if this
+   *				request has an id for a valid session
+   *				in the current session context;
+   *				<code>false</code> otherwise
+   *
+   * @see			#getRequestedSessionId
+   * @see			#getPortletSession
+   */
+
+  public boolean isRequestedSessionIdValid();
+
+
+  /**
+   * Returns the portal preferred content type for the response.
+   * <p>
+   * The following restrictions apply:
+   * <ul>
+   * <li>The content type only includes the MIME type, not the
+   * character set. The character set of the response
+   * can be retrieved via the {@link RenderResponse#getCharacterEncoding}.</li>
+   * <li>Only content types that the portlet has defined in its
+   * deployment descriptor are valid return values for
+   * this method call. If the portlet has defined
+   * <code>'*'</code> or <code>'* / *'</code> as supported content
+   * types, these may also be valid return values.</li>
+   * </ul>
+   * 
+   * @return preferred MIME 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 following restrictions apply:
+   * <ul>
+   * <li>The content type only includes the MIME type, not the
+   * character set.</li>
+   * <li>Only content types that the portlet has defined in its
+   * deployment descriptor are valid return values for
+   * this method call. If the portlet has defined
+   * <code>'*'</code> or <code>'* / *'</code> as supported content
+   * types, these may also be valid return values.</li>
+   * </ul>
+   *
+   * @return ordered list of MIME types for the response
+   */
+
+  public java.util.Enumeration<String> getResponseContentTypes();
+
+
+  /**
+   * Returns the preferred Locale in which the portal will accept content.
+   * The Locale may be based on the Accept-Language header of the client.
+   *
+   * @return  the preferred Locale in which the portal will accept content.
+   */
+
+  public java.util.Locale getLocale();
+
+
+  /**
+   * Returns an Enumeration of Locale objects indicating, in decreasing
+   * order starting with the preferred locale in which the portal will
+   * accept content for this request.
+   * The Locales may be based on the Accept-Language header of the client.
+   * 
+   * @return  an Enumeration of Locales, in decreasing order, in which 
+   *           the portal will accept content for this request
+   */
+
+  public java.util.Enumeration<Locale> getLocales();
+
+
+  /**
+   * Returns the name of the scheme used to make this request.
+   * For example, <code>http</code>, <code>https</code>, or <code>ftp</code>.
+   * Different schemes have different rules for constructing URLs,
+   * as noted in RFC 1738.
+   *
+   * @return		a <code>String</code> containing the name 
+   *			of the scheme used to make this request
+   */
+
+  public String getScheme();
+    
+
+  /**
+   * Returns the host name of the server that received the request.
+   *
+   * @return		a <code>String</code> containing the name 
+   *			of the server to which the request was sent
+   */
+
+  public String getServerName();
+    
+    
+  /**
+   * Returns the port number on which this request was received.
+   *
+   * @return		an integer specifying the port number
+   */
+
+  public int getServerPort();
+
+  /**
+   * Returns the portlet window ID. The portlet window ID is 
+   * unique for this portlet window and is constant for the lifetime
+   * of the portlet window.
+   * <p>
+   * This ID is the same that is used by the portlet container for
+   * scoping the portlet-scope session attributes.
+   * 
+   * @since 2.0
+   * @return  the portlet window ID
+   */
+  public String getWindowID();
+  
+  
+  /**
+   * Returns an array containing all of the Cookie properties. 
+   * <p>
+   * This method returns <code>null</code> if no cookies exist.
+   * 
+   * @since 2.0
+   * @return  array of cookie properties, or 
+   *          <code>null</code> if no cookies exist.
+   * @see MimeResponse#addProperty(Cookie) 
+   */
+  public javax.servlet.http.Cookie[] getCookies();
+  
+  /**
+   * Returns a <code>Map</code> of the private 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 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>.
+   *
+   * @since 2.0
+   * @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>).
+   */
+  public java.util.Map<String, String[]> getPrivateParameterMap();
+  
+  /**
+   * Returns a <code>Map</code> of the public parameters of this request.
+   * Public parameters may be shared with other portlets or components and
+   * defined in the portlet deployment descriptor with the 
+   * <code>supported-public-render-parameter</code> element.  
+   * The returned parameters are "x-www-form-urlencoded" decoded.
+   * <p>
+   * The values in the returned <code>Map</code> are from type
+   * String array (<code>String[]</code>).
+   * <p>
+   * If no public parameters exist this method returns an empty <code>Map</code>.
+   *
+   * @since 2.0
+   * @return     an immutable <code>Map</code> containing public parameter names as 
+   *             keys and public parameter values as map values, or an empty <code>Map</code>
+   *             if no public 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>).
+   */
+  public java.util.Map<String, String[]> getPublicParameterMap();
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequestDispatcher.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequestDispatcher.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequestDispatcher.java
new file mode 100644
index 0000000..8205872
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletRequestDispatcher.java
@@ -0,0 +1,142 @@
+/*  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>PortletRequestDispatcher</code> interface defines an object that
+ * receives requests from the client and sends them to the specified resources
+ * (such as a servlet, HTML file, or JSP file) on the server. The portlet
+ * container creates the <code>PortletRequestDispatcher</code> object, which
+ * is used as a wrapper around a server resource located at a particular path or
+ * given by a particular name.
+ * 
+ */
+
+public interface PortletRequestDispatcher {
+
+    /**
+     * 
+     * Includes the content of a resource (servlet, JSP page, HTML file) in the
+     * response. In essence, this method enables programmatic server-side
+     * includes.
+     * <p>
+     * The included servlet cannot set or change the response status code or set
+     * headers; any attempt to make a change is ignored.
+     * <p>
+     * This method is kept in order to provide backward compatibility with
+     * version 1.0. Please use {@link #include(PortletRequest, PortletResponse)} instead
+     * of this method.
+     * 
+     * @param request
+     *            a {@link RenderRequest} object that contains the client
+     *            request. Must be either the render request passed to the
+     *            portlet in <code>render</code> or a wrapped version of this
+     *            render request.
+     * 
+     * @param response
+     *            a {@link RenderResponse} object that contains the render
+     *            response. Must be either the render response passed to the
+     *            portlet in <code>render</code> or a wrapped version of this
+     *            render response.
+     * 
+     * @exception PortletException
+     *                if the included resource throws a ServletException, or
+     *                other exceptions that are not Runtime- or IOExceptions.
+     * 
+     * @exception java.io.IOException
+     *                if the included resource throws this exception
+     * 
+     *  
+     */
+
+    public void include(RenderRequest request, RenderResponse response)
+            throws PortletException, java.io.IOException;
+
+    /**
+     * 
+     * Includes the content of a resource (servlet, JSP page, HTML file) in the
+     * response. In essence, this method enables programmatic server-side
+     * includes.
+     * <p>
+     * The included servlet cannot set or change the response status code or set
+     * headers; any attempt to make a change is ignored.
+     * 
+     * 
+     * @param request
+     *            a {@link PortletRequest} object that contains the portlet
+     *            request. Must be either the original request passed to the
+     *            portlet or a wrapped version of this request.
+     * 
+     * @param response
+     *            a {@link PortletResponse} object that contains the portlet
+     *            response. Must be either the portlet response passed to the
+     *            portlet or a wrapped version of this response.
+     * 
+     * @exception PortletException
+     *                if the included resource throws a ServletException, or
+     *                other exceptions that are not Runtime- or IOExceptions.
+     * 
+     * @exception java.io.IOException
+     *                if the included resource throws this exception
+     *                
+     * @since 2.0
+     */
+
+    public void include(PortletRequest request, PortletResponse response)
+            throws PortletException, java.io.IOException;
+
+    /**
+     * Forwards a portlet request from a portlet to another resource (servlet, JSP file, or HTML file) 
+     * on the server. This method allows the portlet to do preliminary processing of a 
+     * request and another resource to generate the response.
+     * <p>
+     * The <code>forward</code> method should be called before the response has been 
+     * committed to the portlet container (before response body output has been flushed). 
+     * If the response already has been committed, this method throws an 
+     * <code>IllegalStateException</code>. Uncommitted output in the response buffer 
+     * is automatically cleared before the forward.
+     * <p>
+     * The request and response parameters must be either the same objects as were passed to 
+     * the calling portlet or be wrapped versions of these.
+     * 
+     * @param request  a request object that represents the request to the 
+     *                 portlet
+     * @param response a reponse object that contains the portlet response
+     *  
+     * @exception PortletException
+     *                if the included resource throws a ServletException, or
+     *                other exceptions that are not Runtime- or IOExceptions.
+     * @exception java.io.IOException
+     *                if the included resource throws this exception
+     * @exception java.lang.IllegalStateException
+     *                if the response was already committed
+     * @since 2.0
+     */
+    public void forward(PortletRequest request, PortletResponse response)
+    throws PortletException, java.io.IOException;
+
+    
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletResponse.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletResponse.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletResponse.java
new file mode 100644
index 0000000..6dccbf0
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletResponse.java
@@ -0,0 +1,196 @@
+/*  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>PortletResponse</CODE> defines the base interface to assist a
+ * portlet in creating and sending a response to the client. The portlet
+ * container uses specialized versions of this interface when invoking a
+ * portlet.
+ * The portlet container creates these objects and passes them as arguments to
+ * the portlet's <CODE>processAction, processEvent, serveResource</CODE> and <CODE>render</CODE> methods.
+ * 
+ * @see ActionResponse
+ * @see RenderResponse
+ * @see EventResponse
+ * @see ResourceResponse
+ */
+public interface PortletResponse {
+
+
+	/**
+     * Adds a String property to an existing key to be returned to the portal.
+     * If there are no property values already associated with the key, 
+     * a new key is created.
+     * <p>
+     * This method allows response properties to have multiple values.
+     * <p>
+     * Response properties can be viewed as header values set for the portal application. 
+     * If these header values are intended to be transmitted to the client they should be 
+     * set before the response is committed.
+     * 
+     * @param key
+     *            the key of the property to be returned to the portal
+     * @param value
+     *            the value of the property to be returned to the portal
+     * 
+     * @exception java.lang.IllegalArgumentException
+     *                if key is <code>null</code>.
+     */
+
+	public void addProperty(String key, String value);
+
+
+	/**
+     * Sets a String property to be returned to the portal.
+     * <p>
+     * Response properties can be viewed as header values set for the portal application. 
+     * If these header values are intended to be transmitted to the client they should be 
+     * set before the response is committed.
+     * <p>
+     * This method resets all properties previously added with the same key.
+     * 
+     * @param key
+     *            the key of the property to be returned to the portal
+     * @param value
+     *            the value of the property to be returned to the portal
+     * 
+     * @exception java.lang.IllegalArgumentException
+     *                if key is <code>null</code>.
+     */
+
+	public void setProperty(String key, String value);
+
+	/**
+     * Returns the encoded URL of the resource, like servlets, JSPs, images and
+     * other static files, at the given path.
+     * <p>
+     * Portlets should encode all resource URLs pointing to resources in the
+     * portlet application via this method in order to ensure that they get
+     * served via the portal application.
+     * <p>
+     * Some portal/portlet-container implementation may require those URLs to
+     * contain implementation specific data encoded in it. Because of that,
+     * portlets should use this method to create such URLs.
+     * <p>
+     * The <code>encodeURL</code> method may include the session ID and other
+     * portal/portlet-container specific information into the URL. If encoding
+     * is not needed, it returns the URL unchanged.
+     * <p>
+     * Portlet developer should be aware that the returned URL might not be a well formed
+     * URL but a special token at the time the portlet is generating its content. 
+     * Thus portlets should not add additional parameters on the resulting URL or 
+     * expect to be able to parse the URL. As a result, the outcome of the encodeURL 
+     * call may be different than calling encodeURL in the servlet world.
+     * 
+     * @param path
+     *            the URI path to the resource. This must be either an absolute
+     *            URL (e.g.
+     *            <code>http://my.co/myportal/mywebap/myfolder/myresource.gif</code>)
+     *            or a full path URI (e.g.
+     *            <code>/myportal/mywebap/myfolder/myresource.gif</code>).
+     * 
+     * @exception java.lang.IllegalArgumentException
+     *                if path doesn't have a leading slash or is not an absolute
+     *                URL
+     * 
+     * @return the encoded resource URL as string, may not be a valid URL
+     */
+
+	public String encodeURL(String path);
+
+	/**
+     * The value returned by this method should be prefixed or appended to
+     * elements, such as JavaScript variables or function names, to ensure they
+     * are unique in the context of the portal page.
+     * <p>
+     * The namespace value must be constant for the lifetime of the portlet
+     * window.
+     * 
+     * @return the namespace
+     */
+
+	public String getNamespace();
+
+    /**
+     * Adds a HTTP Cookie property to the response.<br>
+     * The portlet should note that the cookie may not make
+     * it to the client, but may be stored at the portal.
+     * <p>
+     * This method allows response properties to have multiple cookies.
+     * <p>
+     *
+     * @param  cookie the cookie to be added to the response
+     * 
+     * @exception  java.lang.IllegalArgumentException 
+     *                            if cookie is <code>null</code>.
+     * @since 2.0
+     */
+
+    public void addProperty(javax.servlet.http.Cookie cookie);
+
+
+    /**
+     * Adds an XML DOM element property to the response.
+     * <p>
+     * If a DOM element with the provided key already exists
+     * the provided element will be stored in addition to the
+     * existing element under the same key.
+     * <p>
+     * If the element is <code>null</code> the key is removed from
+     * the response.
+     * <p>
+     * Response XML DOM element properties can be viewed as 
+     * additional response document sections
+     * set for the portal application. 
+     * If these header values are intended to be transmitted to the client they should be 
+     * set before the response is committed.
+     *
+     * @param key
+     *            the key of the property to be returned to the portal
+     * @param  element
+     *            the XML DOM element to be added to the response
+     *
+     * @exception  java.lang.IllegalArgumentException
+     *                            if key is <code>null</code>.
+     * @since 2.0
+     */
+   void addProperty(String key, org.w3c.dom.Element element);
+   
+   /**
+    * Creates an element of the type specified to be used in the 
+    * {@link #addProperty(String,Element)} method. 
+    * 
+    * @param tagName	name of the element type to instantiate
+    * @return  A new Element object with the nodeName attribute set to tagName, 
+    *          and localName, prefix, and namespaceURI set to null.
+    * @throws org.w3c.dom.DOMException
+    *     INVALID_CHARACTER_ERR: Raised if the specified name 
+    *     contains an illegal character.
+    */
+   org.w3c.dom.Element createElement(String tagName) throws org.w3c.dom.DOMException;
+
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSecurityException.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSecurityException.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSecurityException.java
new file mode 100644
index 0000000..75104c9
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSecurityException.java
@@ -0,0 +1,91 @@
+/*  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;
+
+/**
+ * A portlet should throw a <CODE>PortletSecurityException</CODE>
+ * when a call fails because of security reasons.<br>
+ * Additionally it can be thrown by the portal/portlet-container.
+ */
+
+public class PortletSecurityException extends PortletException
+{
+
+  private static final long serialVersionUID = 1L;
+
+  private PortletSecurityException ()
+  {
+  }
+
+  /**
+   * Constructs a new security exception with the given text. The
+   * portlet container may use the text write it to a log.
+   *
+   * @param   text
+   *          the exception text
+   */
+
+  public PortletSecurityException (String text)
+  {
+    super (text);
+  }
+
+  /**
+   * Constructs a new portlet security exception when the portlet needs to do
+   * the following:
+   * <ul>
+   * <il>throw an exception 
+   * <li>include a message about the "root cause" that interfered
+   *     with its normal operation
+   * <li>include a description message
+   * </ul>
+   *
+   * @param   text
+   *          the exception text
+   * @param   cause
+   *          the root cause
+   */
+  
+  public PortletSecurityException (String text, Throwable cause)
+  {
+    super(text, cause);
+  }
+
+  /**
+   * Constructs a new portlet security exception when the portlet needs to throw an
+   * exception. The exception message is based on the localized message
+   * of the underlying exception.
+   *
+   * @param   cause
+   *          the root cause
+   */
+
+  public PortletSecurityException (Throwable cause)
+  {
+    super(cause);
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSession.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSession.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSession.java
new file mode 100644
index 0000000..1b6e088
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSession.java
@@ -0,0 +1,417 @@
+/*  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.Map;
+
+
+
+/**
+ * The <CODE>PortletSession</CODE> interface provides a way to identify a user
+ * across more than one request and to store transient information about that user.
+ * <p>
+ * A <code>PortletSession</code> is created per user client per portlet application.
+ * <p>
+ * A portlet can bind an object attribute into a <code>PortletSession</code> by name.
+ * The <code>PortletSession</code> interface defines two scopes for storing objects:
+ * <ul>
+ * <li><code>APPLICATION_SCOPE</code>
+ * <li><code>PORTLET_SCOPE</code>
+ * </ul>
+ * All objects stored in the session using the <code>APPLICATION_SCOPE</code> 
+ * must be available to all the portlets, servlets and 
+ * JSPs that belongs to the same portlet application and that handles a 
+ * request identified as being a part of the same session.
+ * Objects stored in the session using the <code>PORTLET_SCOPE</code> must be
+ * available to the portlet during requests for the same portlet window
+ * that the objects where stored from. Attributes stored in the
+ * <code>PORTLET_SCOPE</code> are not protected from other web components
+ * of the portlet application. They are just conveniently namespaced.
+ * <P>
+ * The portlet session is based on the <code>HttpSession</code>. Therefore all
+ * <code>HttpSession</code> listeners do apply to the portlet session and
+ * attributes set in the portlet session are visible in the <code>HttpSession</code>
+ * and vice versa.
+ */
+public interface PortletSession
+{
+
+  /**
+   * This constant defines an application wide scope for the session attribute.
+   * <code>APPLICATION_SCOPE</code> session attributes enable Portlets 
+   * within one portlet application to share data.
+   * <p>
+   * Portlets may need to prefix attributes set in this scope with some
+   * ID, to avoid overwriting each other's attributes in the
+   * case where two portlets of the same portlet definition
+   * are created.
+   * <p>
+   * Value: <code>0x01</code>
+   */
+  public static final int APPLICATION_SCOPE = 0x01;
+
+  /**
+   * This constant defines the scope of the session attribute to be
+   * private to the portlet and its included resources. 
+   * <p>
+   * Value: <code>0x02</code>
+   */
+  public static final int PORTLET_SCOPE = 0x02;
+
+
+
+  /**
+   * Returns the object bound with the specified name in this session
+   * under the <code>PORTLET_SCOPE</code>, or <code>null</code> if no 
+   * object is bound under the name in that scope.
+   *
+   * @param name		a string specifying the name of the object
+   *
+   * @return			the object with the specified name for
+   *                            the <code>PORTLET_SCOPE</code>.
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on an
+   *					invalidated session.
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */
+
+  public java.lang.Object getAttribute(java.lang.String name);
+
+  
+  /**
+   * Returns the object bound with the specified name in this session, 
+   * or <code>null</code> if no object is bound under the name in the given scope.
+   *
+   * @param name		a string specifying the name of the object
+   * @param scope               session scope of this attribute
+   *
+   * @return			the object with the specified name
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on an
+   *					invalidated session, or the scope is unknown to the container.
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */
+
+  public java.lang.Object getAttribute(java.lang.String name,int scope);
+
+
+  /**
+   * Returns an <code>Enumeration</code> of String objects containing the names of 
+   * all the objects bound to this session under the <code>PORTLET_SCOPE</code>, or an
+   * empty <code>Enumeration</code> if no attributes are available.
+   *
+   * @return			an <code>Enumeration</code> of 
+   *				<code>String</code> objects specifying the
+   *				names of all the objects bound to
+   *				this session, or an empty <code>Enumeration</code> 
+   *                if no attributes are available.
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on an
+   *					invalidated session   
+   */
+  
+  public java.util.Enumeration<String> getAttributeNames();
+
+
+  /**
+   * Returns an <code>Enumeration</code> of String objects containing the names of 
+   * all the objects bound to this session in the given scope, or an
+   * empty <code>Enumeration</code> if no attributes are available in the
+   * given scope.
+   *
+   * @param scope               session scope of the attribute names
+   *
+   * @return			an <code>Enumeration</code> of 
+   *				<code>String</code> objects specifying the
+   *				names of all the objects bound to
+   *				this session, or an empty <code>Enumeration</code> 
+   *                            if no attributes are available in the given scope.
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on an
+   *					invalidated session, or the scope is unknown to the container.      
+   */
+  
+  public java.util.Enumeration<String> getAttributeNames(int scope);
+
+  /**
+   * Returns the time when this session was created, measured in 
+   * milliseconds since midnight January 1, 1970 GMT.  
+   *
+   * @return				a <code>long</code> specifying
+   * 					when this session was created,
+   *					expressed in 
+   *					milliseconds since 1/1/1970 GMT
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on an
+   *					invalidated session
+   */
+
+  public long getCreationTime();
+  
+
+  /**
+   * Returns a string containing the unique identifier assigned to this session. 
+   *
+   * @return				a string specifying the identifier
+   *					assigned to this session
+   */
+  
+  public java.lang.String getId();
+  
+
+  /**
+   * Returns the last time the client sent a request associated with this session, 
+   * as the number of milliseconds since midnight January 1, 1970 GMT.  
+   *
+   * <p>Actions that your portlet takes, such as getting or setting
+   * a value associated with the session, do not affect the access
+   * time.
+   *
+   * @return				a <code>long</code>
+   *					representing the last time 
+   *					the client sent a request associated
+   *					with this session, expressed in 
+   *					milliseconds since 1/1/1970 GMT
+   */
+  
+  public long getLastAccessedTime();
+
+
+  /**
+   * Returns the maximum time interval, in seconds, for which the portlet container 
+   * keeps this session open between client accesses. After this interval, 
+   * the portlet container invalidates the session.  The maximum time 
+   * interval can be set
+   * with the <code>setMaxInactiveInterval</code> method.
+   * A negative time indicates the session should never timeout.
+   *
+   * @return		an integer specifying the number of
+   *			seconds this session remains open
+   *			between client requests
+   *
+   * @see		#setMaxInactiveInterval
+   */
+
+  public int getMaxInactiveInterval();
+
+
+  /**
+   * Invalidates this session (all scopes) and unbinds any objects bound to it.  
+   * <p>
+   * Invalidating the portlet session will result in invalidating the underlying
+   * <code>HttpSession</code>
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on a
+   *					session which has already been invalidated
+   */
+
+  public void invalidate();
+
+
+
+  /**
+   * Returns true if the client does not yet know about the session or 
+   * if the client chooses not to join the session. 
+   *
+   * @return 				<code>true</code> if the 
+   *					server has created a session, 
+   *					but the client has not joined yet.
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on a
+   *					session which has already been invalidated
+   *
+   */
+
+  public boolean isNew();
+  
+
+  /**
+   * Removes the object bound with the specified name under
+   * the <code>PORTLET_SCOPE</code> from
+   * this session. If the session does not have an object
+   * bound with the specified name, this method does nothing.
+   * 
+   * @param name   the name of the object to be
+   *               removed from this session in the 
+   *               <code> PORTLET_SCOPE</code>.
+   *
+   * @exception java.lang.IllegalStateException
+   *                   if this method is called on a
+   *                   session which has been invalidated
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */
+  
+  public void removeAttribute(String name) ;
+
+
+  /**
+   * Removes the object bound with the specified name and the given scope from
+   * this session. If the session does not have an object
+   * bound with the specified name, this method does nothing.
+   * 
+   * @param name   the name of the object to be
+   *               removed from this session
+   * @param scope  session scope of this attribute
+   *
+   * @exception java.lang.IllegalStateException
+   *                   if this method is called on a
+   *                   session which has been invalidated
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */
+  
+  public void removeAttribute(String name, int scope) ;
+
+
+  /**
+   * Binds an object to this session under the <code>PORTLET_SCOPE</code>, using the name specified.  
+   * If an object of the same name in this scope is already bound to the session,
+   * that object is replaced.
+   *
+   * <p>After this method has been executed, and if the new object
+   * implements <code>HttpSessionBindingListener</code>,
+   * the container calls 
+   * <code>HttpSessionBindingListener.valueBound</code>. The container then   
+   * notifies any <code>HttpSessionAttributeListeners</code> in the web 
+   * application.
+   * <p>If an object was already bound to this session 
+   * that implements <code>HttpSessionBindingListener</code>, its 
+   * <code>HttpSessionBindingListener.valueUnbound</code> method is called.
+   *
+   * <p>If the value is <code>null</code>, this has the same effect as calling 
+   * <code>removeAttribute()</code>.
+   *
+   *
+   * @param name		the name to which the object is bound under
+   *                            the <code>PORTLET_SCOPE</code>;
+   *				this cannot be <code>null</code>.
+   * @param value		the object to be bound
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on a
+   *					session which has been invalidated
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code>.
+   */
+  
+  public void setAttribute(java.lang.String name, java.lang.Object value);
+
+
+  /**
+   * Binds an object to this session in the given scope, using the name specified.  
+   * If an object of the same name in this scope is already bound to the session,
+   * that object is replaced.
+   *
+   * <p>After this method has been executed, and if the new object
+   * implements <code>HttpSessionBindingListener</code>,
+   * the container calls 
+   * <code>HttpSessionBindingListener.valueBound</code>. The container then   
+   * notifies any <code>HttpSessionAttributeListeners</code> in the web 
+   * application.
+   * <p>If an object was already bound to this session 
+   * that implements <code>HttpSessionBindingListener</code>, its 
+   * <code>HttpSessionBindingListener.valueUnbound</code> method is called.
+   *
+   * <p>If the value is <code>null</code>, this has the same effect as calling 
+   * <code>removeAttribute()</code>.
+   *
+   *
+   * @param name		the name to which the object is bound;
+   *				this cannot be <code>null</code>.
+   * @param value		the object to be bound
+   * @param scope               session scope of this attribute
+   *
+   * @exception java.lang.IllegalStateException	if this method is called on a
+   *					session which has been invalidated
+   * @exception  java.lang.IllegalArgumentException 
+   *                            if name is <code>null</code> or scope is unknown to the container.
+   */
+  
+  public void setAttribute(java.lang.String name, java.lang.Object value, int scope);
+
+
+  /**
+   * Specifies the time, in seconds, between client requests, before the 
+   * portlet container invalidates this session. A negative time
+   * indicates the session should never timeout.
+   *
+   * @param interval		An integer specifying the number
+   * 				of seconds 
+   */
+
+  public void setMaxInactiveInterval(int interval);
+
+
+  /**
+   * Returns the portlet application context associated with this session.
+   *
+   * @return   the portlet application context
+   */
+
+  public PortletContext getPortletContext ();
+
+  /** 
+   * Returns a <code>Map</code> of the session attributes in
+   * the portlet session scope.
+   * <p>
+   * The keys are of type <code>String</code> and the values in the 
+   * returned <code>Map</code> are from type <code>Object</code>.
+   * <p>
+   * If no session attributes exist this method returns an empty <code>Map</code>.
+   *
+   * @return     an immutable <code>Map</code> containing the session attributes in the  
+   *             portlet session scope as keys and attribute values as map values, or an empty <code>Map</code>
+   *             if no session attributes exist. The keys in the
+   *             map are of type String, the values of type
+   *             Object.
+   *  @since 2.0
+   */
+  public Map<String, Object> getAttributeMap();  
+
+  /** 
+   * Returns a <code>Map</code> of the session attributes in
+   * the given session scope.
+   * <p>
+   * The keys are of type <code>String</code> and the values in the 
+   * returned <code>Map</code> are from type <code>Object</code>.
+   * <p>
+   * If no session attributes exist this method returns an empty <code>Map</code>.
+   *
+   * @param scope               session scope of this attribute
+   * 
+   * @return     an immutable <code>Map</code> containing the session attributes in the  
+   *             given scope as keys and attribute values as map values, or an empty <code>Map</code>
+   *             if no session attributes exist. The keys in the
+   *             map are of type String, the values of type
+   *             Object.
+   *  @since 2.0
+   */
+  public Map<String, Object> getAttributeMap(int scope);  
+
+}
+
+

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSessionUtil.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSessionUtil.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSessionUtil.java
new file mode 100644
index 0000000..bfd5312
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletSessionUtil.java
@@ -0,0 +1,90 @@
+/*  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>PortletSessionUtil</CODE>  class helps identify and decode
+ * attributes in the <CODE>PORTLET_SCOPE</CODE> scope of the PortletSession
+ * when accessed through the HttpSession an from within calls to methods
+ * of the HttpSessionBindingListener interface.
+ */
+public class PortletSessionUtil
+{
+
+  private static final String PORTLET_SCOPE_NAMESPACE = "javax.portlet.p.";
+  
+  /**
+   * Returns the attribute name of an attribute in the 
+   * <code>PORTLET_SCOPE</code>. If the attribute is in the
+   * <code>APPLICATION_SCOPE</code> it returns the attribute name unchanged.
+   *
+   * @param name		a string specifying the name of the
+   *                            encoded portlet attribute
+   *
+   * @return			the decoded attribute name
+   */
+
+  public static java.lang.String decodeAttributeName(java.lang.String name)
+  {
+    if (name.startsWith(PORTLET_SCOPE_NAMESPACE)) {
+      int index = name.indexOf('?');
+      if (index>-1) {
+	name = name.substring(index+1);
+      }
+    }
+    return name;
+  }
+
+
+  /**
+   * Returns the portlet attribute scope from an encoded portlet
+   * attribute.
+   * <br>Possible return values are:
+   * <ul>
+   * <li><code>PortletSession.APPLICATION_SCOPE</code></li>
+   * <li><code>PortletSession.PORTLET_SCOPE</code></li>
+   * </ul>
+   *
+   * @param name		a string specifying the name of the
+   *                            encoded portlet attribute
+   *
+   * @return			the decoded attribute scope
+   * @see PortletSession
+   */
+
+  public static int decodeScope(java.lang.String name)
+  {
+    int scope = PortletSession.APPLICATION_SCOPE; // APP
+    if (name.startsWith(PORTLET_SCOPE_NAMESPACE)) {
+      int index = name.indexOf('?');
+      if (index>-1) {
+	scope = PortletSession.PORTLET_SCOPE; // PORTLET
+      }
+    }
+    return scope;
+  }
+}
+
+

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURL.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURL.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURL.java
new file mode 100644
index 0000000..2382f66
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURL.java
@@ -0,0 +1,143 @@
+/*  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>PortletURL</CODE> interface represents a URL
+ * that reference the portlet itself.
+ * <p>
+ * A PortletURL is created through the <CODE>RenderResponse</CODE>
+ * or <code>ResourceResponse</code>.
+ * Parameters, a portlet mode, a window state and a security level
+ * can be added to <CODE>PortletURL</CODE> objects. 
+ * <P>
+ * There are two types of PortletURLs:
+ * <ul>
+ * <li>Action URLs, they are created with <CODE>createActionURL</CODE>, and 
+ *     trigger an action request followed by a render request.
+ * <li>Render URLs, they are created with <CODE>createRenderURL</CODE>, and
+ *     trigger a render request.
+ * </ul>
+ * <p>
+ * The string representation of a PortletURL does not need to be a valid 
+ * URL at the time the portlet is generating its content. It may contain  
+ * special tokens that will be converted to a valid URL, by the portal, 
+ * before the content is returned to the client.
+ */
+public interface PortletURL extends BaseURL
+{
+
+
+
+  /**
+   * Indicates the window state the portlet should be in, if this 
+   * portlet URL triggers a request.
+   * <p>
+   * A URL can not have more than one window state attached to it.
+   * If more than one window state is set only the last one set
+   * is attached to the URL.
+   * 
+   * @param windowState
+   *               the 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.
+   * @see PortletRequest#isWindowStateAllowed
+   */
+  public void setWindowState (WindowState windowState)
+    throws WindowStateException;
+
+
+  /**
+   * Indicates the portlet mode the portlet must be in, if this
+   * portlet URL triggers a request.
+   * <p>
+   * A URL can not have more than one portlet mode attached to it.
+   * If more than one portlet mode is set only the last one set
+   * is attached to the URL.
+   * 
+   * @param portletMode
+   *               the 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.
+   * @see PortletRequest#isPortletModeAllowed
+   */
+  public void setPortletMode (PortletMode portletMode)
+    throws PortletModeException;
+
+
+  /**
+   * Returns the currently set portlet mode on this PortletURL.
+   *             
+   * @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 PortletURL.
+   *             
+   * @since 2.0
+   *
+   * @return   the window state, or <code>null</code> if none is set
+   */
+
+  public WindowState getWindowState ();
+
+  /**
+	* Removes the specified public render parameter.
+	* The name must reference a public render parameter defined
+	* in the portlet deployment descriptor under the
+	* <code>public-render-parameter</code> element with the
+	* <code>identifier</code> mapping to the parameter name.
+	* <p>
+	* Note that calling this method on a PortletURL of type
+	* Action URL does not have any effect.
+	* 
+	* @param name			a <code>String</code> specifying 
+	*					the name of the public render parameter to be removed
+	*
+	* @exception  java.lang.IllegalArgumentException 
+	*                            if name is <code>null</code>.
+	* @since 2.0
+	*/
+  public void removePublicRenderParameter(String name); 
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURLGenerationListener.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURLGenerationListener.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURLGenerationListener.java
new file mode 100644
index 0000000..146554b
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PortletURLGenerationListener.java
@@ -0,0 +1,66 @@
+/*  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;
+
+/**
+ * Portlet applications can register portlet URL listeners in order to filter URLs 
+ * before they get generated.
+ * In order to receive a callback from the portlet container before a 
+ * portlet URL is generated the portlet application needs to implement this 
+ * interface and register it in the deployment descriptor with the
+ * <code>listener</code> element.
+ *
+ * @since 2.0
+ */
+public interface PortletURLGenerationListener {
+
+	/**
+	 * Callback being called by the portlet container
+	 * before <code>toString</code> or <code>write</code>
+	 * are executed on action URLs.
+	 * 
+	 * @param actionURL  action URL to be generated
+	 */
+	public void filterActionURL(PortletURL actionURL);
+
+	/**
+	 * Callback being called by the portlet container
+	 * before <code>toString</code> or <code>write</code>
+	 * are executed on render URLs.
+	 * 
+	 * @param renderURL  render URL to be generated
+	 */
+	public void filterRenderURL(PortletURL renderURL);
+	
+	/**
+	 * Callback being called by the portlet container
+	 * before <code>toString</code> or <code>write</code>
+	 * are executed on resource URLs.
+	 * 
+	 * @param resourceURL  resource URL to be generated
+	 */
+	public void filterResourceURL(ResourceURL resourceURL);
+	
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/PreferencesValidator.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/PreferencesValidator.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/PreferencesValidator.java
new file mode 100644
index 0000000..8d3e687
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/PreferencesValidator.java
@@ -0,0 +1,53 @@
+/*  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>PreferencesValidator</CODE> allows to validate the set of
+ * preferences of the associated portlet just before they are
+ * stored in the persistent store.
+ * <p>
+ * The portlet container invokes the <code>validate</code> method as 
+ * part of the invocation of the <code>store</code> method of the
+ * <code>PortletPreferences</code>.
+ */
+public interface PreferencesValidator
+{
+
+  /**
+   * If the preferences values are successfully validated the call to this method
+   * must finish gracefully. Otherwise it must throw a <code>ValidatorException</code>.
+   *
+   * @param  preferences   preferences to validate
+   *
+   * @throws  ValidatorException  if the given preferences contains invalid
+   *                              settings
+   *
+   */
+
+  public void validate(PortletPreferences preferences)
+    throws ValidatorException;  
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f0a1530f/portlet-api_2.0_spec/src/main/java/javax/portlet/ProcessAction.java
----------------------------------------------------------------------
diff --git a/portlet-api_2.0_spec/src/main/java/javax/portlet/ProcessAction.java b/portlet-api_2.0_spec/src/main/java/javax/portlet/ProcessAction.java
new file mode 100644
index 0000000..e3c95d6
--- /dev/null
+++ b/portlet-api_2.0_spec/src/main/java/javax/portlet/ProcessAction.java
@@ -0,0 +1,52 @@
+/*  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.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for marking a method for processing
+ * a specific action.
+ * The <code>GenericPortlet</code> tries to dispatch to methods annotated 
+ * with the tag <code>@ProcessAction</code> for any received
+ * <code>processAction</code> call.
+ *
+ * @since 2.0
+ */
+@Target(ElementType.METHOD)
+@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
+public @interface ProcessAction {
+	/**
+	 * Name of the action.
+	 * Must be set on the 
+	 * <code>ActionURL</code> as value of the 
+	 * parameter <code>javax.portlet.action</code>.
+	 * 
+	 * @return  action name
+	 */
+	String name();
+}