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 de...@apache.org on 2007/12/14 12:05:41 UTC

svn commit: r604161 [1/5] - in /portals/pluto/branches/1.1-286-trunk-merge: ./ pluto-container/src/main/java/org/apache/pluto/internal/impl/ pluto-container/src/main/java/org/apache/pluto/wrappers/ pluto-portal-driver/src/main/java/org/apache/pluto/dri...

Author: dettborn
Date: Fri Dec 14 03:05:38 2007
New Revision: 604161

URL: http://svn.apache.org/viewvc?rev=604161&view=rev
Log:
update to api rev.30
and commend out a line in TCKDriverServlet.java

Modified:
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceRequestImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java
    portals/pluto/branches/1.1-286-trunk-merge/pom.xml
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/pom.xml
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionRequest.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/GenericPortlet.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/MimeResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortalContext.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/Portlet.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletConfig.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletContext.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletException.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletMode.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletModeException.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletPreferences.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletRequest.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletRequestDispatcher.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletSecurityException.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletSession.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletSessionUtil.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletURL.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PreferencesValidator.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ReadOnlyException.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/RenderRequest.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/RenderResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ResourceRequest.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ResourceResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/UnavailableException.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ValidatorException.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/WindowState.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/WindowStateException.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/ActionFilter.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/EventFilter.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/FilterChain.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/PortletFilter.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/PortletResponseWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/RenderFilter.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/RenderResponseWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/ResourceFilter.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/ResourceRequestWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/ResourceResponseWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/filter/package.html
    portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/package.html

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java Fri Dec 14 03:05:38 2007
@@ -22,6 +22,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.ResourceBundle;
 
 import javax.portlet.PortletConfig;
@@ -169,5 +170,10 @@
 			}
 		}
 		return Collections.enumeration(locals);
+	}
+
+	public Map<String, String[]> getContainerRuntimeOptions() {
+		// TODO Auto-generated method stub
+		return null;
 	}
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java Fri Dec 14 03:05:38 2007
@@ -324,7 +324,7 @@
 	}
 
 
-	public Map<String, String[]> getContainerRuntimeOptions() {
+	public java.util.Enumeration<String> getContainerRuntimeOptions() {
 		Map<String,String[]> appRuntimeOptions = getApplicationRuntimeOptions();
 		Map<String,String[]> portletRuntimeOptions = getPortletRuntimeOptions();
 		
@@ -345,7 +345,8 @@
 					resultMap.put(option, portletRuntimeOptions.get(option));
 			}
 		}
-		return resultMap;
+		//return resultMap;
+		return null;
 	}
 }
 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceRequestImpl.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceRequestImpl.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceRequestImpl.java Fri Dec 14 03:05:38 2007
@@ -172,4 +172,9 @@
 	public Map<String, String[]> getPrivateRenderParameterMap() {
 		return super.getPrivateParameterMap();
 	}
+
+	public String getCacheability() {
+		// TODO Auto-generated method stub
+		return null;
+	}
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java Fri Dec 14 03:05:38 2007
@@ -107,5 +107,10 @@
 		// TODO Auto-generated method stub
 		return null;
 	}
+
+	public void addProperty(Cookie cookie) {
+		// TODO Auto-generated method stub
+		
+	}
 }
 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-portal-driver/src/main/java/org/apache/pluto/driver/TCKDriverServlet.java Fri Dec 14 03:05:38 2007
@@ -112,8 +112,8 @@
                 String contextPath = "/" + portletNames[i].substring(0, index);
                 String portletName = portletNames[i].substring(index + 1);
                 pageConfig.addPortlet(contextPath, portletName);
-                adminConfig.getPortletRegistryAdminService()
-                		.addPortletApplication(contextPath);
+//                adminConfig.getPortletRegistryAdminService()
+//                		.addPortletApplication(contextPath);
             }
 
             adminConfig.getRenderConfigAdminService().addPage(pageConfig);

Modified: portals/pluto/branches/1.1-286-trunk-merge/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pom.xml?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pom.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pom.xml Fri Dec 14 03:05:38 2007
@@ -230,7 +230,7 @@
         <pluto.container.name>Pluto</pluto.container.name>
         <javax.portlet.version.major>2</javax.portlet.version.major>
         <javax.portlet.version.minor>0</javax.portlet.version.minor>
-    	<portlet-api.version>2.0-r26</portlet-api.version>
+    	<portlet-api.version>2.0-r30</portlet-api.version>
         <servlet-api.version>2.4</servlet-api.version>
         <jsp-api.version>2.0</jsp-api.version>
         <jstl.version>1.1.2</jstl.version>

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/pom.xml?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/pom.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/pom.xml Fri Dec 14 03:05:38 2007
@@ -33,7 +33,7 @@
   <groupId>javax.portlet</groupId>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>portlet-api</artifactId>
-  <version>2.0-r26</version>
+  <version>2.0-r30</version>
   <packaging>jar</packaging>
   <name>Portlet 2.0 API</name> 
   <description>The Java Portlet API version 2.0 developed by the Java Community Process JSR-286 Expert Group.</description>

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionRequest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionRequest.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionRequest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionRequest.java Fri Dec 14 03:05:38 2007
@@ -1,52 +1,54 @@
-/*  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.
- */
-/*
- * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
- * implementations. This file may change or vanish in the final version of the JSR 286 specification.
- */
-/*
- * 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!
- */
-/**
-  * Copyright 2006 IBM Corporation.
-  */
-
-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.
-	 */
-	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.
+ */
+/*
+ * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
+ * implementations. This file may change or vanish in the final version of the JSR 286 specification.
+ */
+/*
+ * 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!
+ */
+/**
+  * Copyright 2006 IBM Corporation.
+  */
+
+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";
+}

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionResponse.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionResponse.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionResponse.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/ActionResponse.java Fri Dec 14 03:05:38 2007
@@ -115,6 +115,8 @@
    *                    if an input or output exception occurs.
    * @exception	java.lang.IllegalArgumentException	
    *                    if a relative path URL is given
+   *                    
+   * @since 2.0
    */
 
   public void sendRedirect(String location, String renderUrlParamName)

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/GenericPortlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/GenericPortlet.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/GenericPortlet.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/GenericPortlet.java Fri Dec 14 03:05:38 2007
@@ -46,7 +46,13 @@
  * the <CODE>Portlet</CODE> interface.
  * <p>
  * It provides an abstract class to be subclassed to create portlets. A subclass
- * of <CODE>GenericPortlet</CODE> should override at least one method, usually
+ * of <CODE>GenericPortlet</CODE> should either use one of the following annotations:
+ * <ul>
+ * <li><code>@ProcessAction</code></li>
+ * <li><code>@ProcessEvent</code></li>
+ * <li><code>@RenderMode</code></li>
+ * </ul>
+ * or override at least one method, usually
  * one of the following:
  * <ul>
  * <li>processAction, to handle action requests</li>
@@ -90,10 +96,10 @@
 	 * <p>
 	 * The default implementation stores the <code>PortletConfig</code> object
 	 * and checks for annotated methods with the annotations
-	 * </ul>
-	 * <li>ProcessAction</li>
-	 * <li>ProcessEvent</li>
-	 * <li>RenderMode</li>
+	 * <ul>
+	 * <li>@ProcessAction</li>
+	 * <li>@ProcessEvent</li>
+	 * <li>@RenderMode</li>
 	 * </ul>
 	 * and stores these in a hashmap for later dispatching.
 	 * <p>
@@ -127,6 +133,7 @@
 		this.init();
 	}
 
+
 	/**
 	 * 
 	 * A convenience method which can be overridden so that there's no need to
@@ -154,7 +161,13 @@
 	 * URL created (by the portlet) with the
 	 * <code>RenderResponse.createActionURL()</code> method.
 	 * <p>
-	 * The default implementation throws an exception.
+	 * The default implementation tries to dispatch to a method
+	 * annotated with <code>@ProcessAction</name> that matches the action parameter 
+	 * value <code>ActionRequest.ACTION_NAME</code> or, if no
+	 * such method is found throws a <code>PortletException</code>.<br>
+ 	 * Note that the annotated methods needs to be public in order
+	 * to be allowed to be called by <code>GenericPortlet</code>.
+
 	 * 
 	 * @param request
 	 *            the action request
@@ -257,7 +270,7 @@
 	 * Portlets can overwrite this method to provide dynamic titles (e.g. based
 	 * on locale, client, and session information). Examples are:
 	 * <UL>
-	 * <LI>language-dependant titles for multi-lingual portals</li>
+	 * <LI>language-dependent titles for multi-lingual portals</li>
 	 * <LI>shorter titles for WAP phones</li>
 	 * <LI>the number of messages in a mailbox portlet</li>
 	 * </UL>
@@ -293,8 +306,9 @@
 	 * method does not invoke any of the portlet mode rendering methods.
 	 * <p>
 	 * For handling custom portlet modes the portlet should either use the
-	 * <code>@RenderMode</name> annotation or override this
-	 * method.
+	 * <code>@RenderMode</code> annotation or override this
+	 * method. Note that the annotated methods needs to be public in order
+	 * to be allowed to be called by <code>GenericPortlet</code>.
 	 * 
 	 * @param request
 	 *            the render request
@@ -495,8 +509,7 @@
 	}
 
 	/**
-	 * Returns a String containing the value of the named initialization
-	 * parameter, or null if the parameter does not exist.
+	 * Returns a String containing the value of the named initialization	 * parameter, or null if the parameter does not exist.
 	 * 
 	 * @param name
 	 *            a <code>String</code> specifying the name of the
@@ -573,6 +586,13 @@
 		return config.getSupportedLocales();
 	}
 
+	/* (non-Javadoc)
+	 * @see javax.portlet.PortletConfig#getContainerRuntimeOptions()
+	 */
+	public Map<String, String[]> getContainerRuntimeOptions() {
+		return config.getContainerRuntimeOptions();
+	}
+
 	// -------------------------------------------------------------------------
 	// V 2.0 additions
 	// -------------------------------------------------------------------------
@@ -598,10 +618,13 @@
 	}
 
 	/**
-	 * Default event processing. Tries to dispatch to an event method with
-	 * annotation<BR>
-	 * <code>@ProcessEvent(name=<event name>)</code> and the signature<br>
-	 *                     <code>public void <methodname> (EventRequest, EventResponse) throws PortletException, java.io.IOException</code>.
+	 * The default implementation tries to dispatch to a method
+	 * annotated with <code>@ProcessEvent</name> that matches the 
+	 * event name or, if no
+	 * such method is found just sets the current render parameters on
+	 * the response.<br>
+ 	 * Note that the annotated methods needs to be public in order
+	 * to be allowed to be called by <code>GenericPortlet</code>.
 	 * 
 	 * @see javax.portlet.EventPortlet#processEvent(javax.portlet.EventRequest,
 	 *      javax.portlet.EventResponse)

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/MimeResponse.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/MimeResponse.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/MimeResponse.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/MimeResponse.java Fri Dec 14 03:05:38 2007
@@ -178,24 +178,16 @@
     public String getContentType();
 
     /**
-     * Sets the MIME type for the render response. The portlet must set the
+     * Sets the MIME type for the response. The portlet must set the
      * content type before calling {@link #getWriter} or
      * {@link #getPortletOutputStream}.
      * <p>
      * Calling <code>setContentType</code> after <code>getWriter</code> or
      * <code>getOutputStream</code> does not change the content type.
-     * <p>
-     * The portlet container will ignore any character encoding
-     * specified as part of the content type for <code>render</code>
-     * calls.
      * 
      * @param type
      *            the content MIME type
      * 
-     * @throws java.lang.IllegalArgumentException
-     *             for <code>render</code> calls if the given type is not in the list 
-     *             returned by <code>PortletRequest.getResponseContentTypes</code>
-     * 
      * @see PortletRequest#getResponseContentTypes
      * @see #getContentType
      */
@@ -218,7 +210,7 @@
     /**
      * Returns a PrintWriter object that can send character text to the portal.
      * <p>
-     * Before calling this method the content type of the render response must
+     * Before calling this method the content type of the render response should
      * be set using the {@link #setContentType} method.
      * <p>
      * Either this method or {@link #getPortletOutputStream} may be called to
@@ -231,8 +223,7 @@
      *                if an input or output exception occurred
      * @exception java.lang.IllegalStateException
      *                if the <code>getPortletOutputStream</code> method has
-     *                been called on this response, or if no content type was
-     *                set using the <code>setContentType</code> method.
+     *                been called on this response.
      * 
      * @see #setContentType
      * @see #getPortletOutputStream
@@ -353,8 +344,7 @@
      * 
      * @exception java.lang.IllegalStateException
      *                if the <code>getWriter</code> method has been called on
-     *                this response, or if no content type was set using the
-     *                <code>setContentType</code> method.
+     *                this response.
      * 
      * @exception java.io.IOException
      *                if an input or output exception occurred
@@ -431,23 +421,6 @@
     public CacheControl getCacheControl();
 
     
-    /**
-     * 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);
-
 
 
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortalContext.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortalContext.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortalContext.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortalContext.java Fri Dec 14 03:05:38 2007
@@ -1,126 +1,126 @@
-/*  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.
- */
-/*
- * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
- * implementations. This file may change or vanish in the final version of the JSR 286 specification.
- */
-/*
- * 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!
- */
-/**
-  * Copyright 2006 IBM Corporation.
-  */
-
-package javax.portlet;
-
-
-
-/**
- * The <CODE>PortalContext</CODE> interface gives the portlet
- * the ability to retrieve information about the portal calling this portlet.
- * <p>
- * The portlet can only read the <CODE>PortalContext</CODE> data.
- */
-public interface PortalContext
-{
-	/**
-     * Property indicating if the portal application supports the
-     * <code>MimeResponse</code> property <code>MARKUP_HEAD_ELEMENT</code>.
-     * <p>
-     * A non-null value indicates that the portal application supports
-     * the <code>MARKUP_HEAD_ELEMENT</code> property.
-     * <p>
-     * The value is <code>"javax.portlet.markup.head.element.support"</code>.
-     *
-     * @since 2.0
-     */
-	public static final String MARKUP_HEAD_ELEMENT_SUPPORT = "javax.portlet.markup.head.element.support";
-  
-	
-  /**
-   * Returns the portal property with the given name, 
-   * or a <code>null</code> if there is 
-   * no property by that name.
-   *
-   * @param  name    property name
-   *
-   * @return  portal property with key <code>name</code>
-   *
-   * @exception	java.lang.IllegalArgumentException	
-   *                      if name is <code>null</code>.
-   */
-
-  public java.lang.String getProperty(java.lang.String name);
-
-
-  /**
-   * Returns all portal property names, or an empty 
-   * <code>Enumeration</code> if there are no property names.
-   *
-   * @return  All portal property names as an 
-   *          <code>Enumeration</code> of <code>String</code> objects
-   */
-  public java.util.Enumeration<String> getPropertyNames();
-
-
-  /**
-   * Returns all supported portlet modes by the portal
-   * as an enumeration of <code>PortletMode</code> objects.
-   * <p>
-   * The portlet modes must at least include the
-   * standard portlet modes <code>EDIT, HELP, VIEW</code>.
-   *
-   * @return  All supported portal modes by the portal
-   *          as an enumeration of <code>PortletMode</code> objects.
-   */
-
-  public java.util.Enumeration<PortletMode> getSupportedPortletModes();
-
-
-  /**
-   * Returns all supported window states by the portal
-   * as an enumertation of <code>WindowState</code> objects.
-   * <p>
-   * The window states must at least include the
-   * standard window states <code> MINIMIZED, NORMAL, MAXIMIZED</code>.
-   *
-   * @return  All supported window states by the portal
-   *          as an enumertation of <code>WindowState</code> objects.
-   */
-
-  public java.util.Enumeration<WindowState> getSupportedWindowStates();
-
-
-  /**
-   * Returns information about the portal like vendor, version, etc.
-   * <p>
-   * The form of the returned string is <I>servername/versionnumber</I>. For 
-   * example, the reference implementation Pluto may return the string 
-   * <CODE>Pluto/1.0</CODE>.
-   * <p>
-   * The portlet container may return other optional information  after the 
-   * primary string in parentheses, for example, <CODE>Pluto/1.0 
-   * (JDK 1.3.1; Windows NT 4.0 x86)</CODE>.
-   * 
-   * @return a <CODE>String</CODE> containing at least the portal name and version number
-   */
-
-  public java.lang.String getPortalInfo();
-}
+/*  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.
+ */
+/*
+ * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
+ * implementations. This file may change or vanish in the final version of the JSR 286 specification.
+ */
+/*
+ * 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!
+ */
+/**
+  * Copyright 2006 IBM Corporation.
+  */
+
+package javax.portlet;
+
+
+
+/**
+ * The <CODE>PortalContext</CODE> interface gives the portlet
+ * the ability to retrieve information about the portal calling this portlet.
+ * <p>
+ * The portlet can only read the <CODE>PortalContext</CODE> data.
+ */
+public interface PortalContext
+{
+	/**
+     * Property indicating if the portal application supports the
+     * <code>MimeResponse</code> property <code>MARKUP_HEAD_ELEMENT</code>.
+     * <p>
+     * A non-null value indicates that the portal application supports
+     * the <code>MARKUP_HEAD_ELEMENT</code> property.
+     * <p>
+     * The value is <code>"javax.portlet.markup.head.element.support"</code>.
+     *
+     * @since 2.0
+     */
+	public static final String MARKUP_HEAD_ELEMENT_SUPPORT = "javax.portlet.markup.head.element.support";
+  
+	
+  /**
+   * Returns the portal property with the given name, 
+   * or a <code>null</code> if there is 
+   * no property by that name.
+   *
+   * @param  name    property name
+   *
+   * @return  portal property with key <code>name</code>
+   *
+   * @exception	java.lang.IllegalArgumentException	
+   *                      if name is <code>null</code>.
+   */
+
+  public java.lang.String getProperty(java.lang.String name);
+
+
+  /**
+   * Returns all portal property names, or an empty 
+   * <code>Enumeration</code> if there are no property names.
+   *
+   * @return  All portal property names as an 
+   *          <code>Enumeration</code> of <code>String</code> objects
+   */
+  public java.util.Enumeration<String> getPropertyNames();
+
+
+  /**
+   * Returns all supported portlet modes by the portal
+   * as an enumeration of <code>PortletMode</code> objects.
+   * <p>
+   * The portlet modes must at least include the
+   * standard portlet modes <code>EDIT, HELP, VIEW</code>.
+   *
+   * @return  All supported portal modes by the portal
+   *          as an enumeration of <code>PortletMode</code> objects.
+   */
+
+  public java.util.Enumeration<PortletMode> getSupportedPortletModes();
+
+
+  /**
+   * Returns all supported window states by the portal
+   * as an enumertation of <code>WindowState</code> objects.
+   * <p>
+   * The window states must at least include the
+   * standard window states <code> MINIMIZED, NORMAL, MAXIMIZED</code>.
+   *
+   * @return  All supported window states by the portal
+   *          as an enumertation of <code>WindowState</code> objects.
+   */
+
+  public java.util.Enumeration<WindowState> getSupportedWindowStates();
+
+
+  /**
+   * Returns information about the portal like vendor, version, etc.
+   * <p>
+   * The form of the returned string is <I>servername/versionnumber</I>. For 
+   * example, the reference implementation Pluto may return the string 
+   * <CODE>Pluto/1.0</CODE>.
+   * <p>
+   * The portlet container may return other optional information  after the 
+   * primary string in parentheses, for example, <CODE>Pluto/1.0 
+   * (JDK 1.3.1; Windows NT 4.0 x86)</CODE>.
+   * 
+   * @return a <CODE>String</CODE> containing at least the portal name and version number
+   */
+
+  public java.lang.String getPortalInfo();
+}

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/Portlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/Portlet.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/Portlet.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/Portlet.java Fri Dec 14 03:05:38 2007
@@ -1,192 +1,192 @@
-/*  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.
- */
-/*
- * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
- * implementations. This file may change or vanish in the final version of the JSR 286 specification.
- */
-/*
- * 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!
- */
-/**
-  * Copyright 2006 IBM Corporation.
-  */
-
-package javax.portlet;
-
-import java.io.IOException;
-
-
-/**
- * The <CODE>Portlet</CODE> interface is used by the portlet container to
- * invoke the portlets. Every portlet has to implement this interface,
- * either by directly implementing it, or by using an existing class 
- * implementing the Portlet interface.
- * <P>
- * A portlet is a Java technology-based web component. It is managed by the portlet container and
- * processes requests and generates dynamic content as response. Portlets are used by portals as
- * pluggable user interface components.
- * <p>
- * The content generated by a portlet is called a fragment. A fragment is a piece of
- * markup (e.g. HTML, XHTML, WML) adhering to certain rules and can be aggregated
- * with other fragments into a complete document. The content of a portlet is normally
- * aggregated with the content of other portlets into the portal page. 
- * <P>
- * The portlet container instantiates portlets, manages their lifecycle 
- * and invoking them to process requests. The lifecycle consists of:
- * <ul>
- * <li>initializing the portlet using using the <code>init</code> method
- * <li>request processsing
- * <li>taking the portlet out of service using the <code>destroy</code> method
- * </ul>
- * <p>
- * Request processing is divided into two types:
- * <ul>
- * <li>action requests handled through the <code>processAction</code> method, 
- *     to perform actions targeted to the portlet
- * <li>render requests handled through the <code>render</code> method, 
- *     to perform the render operation
- * </ul>
- */
-public interface Portlet
-{
-
-
-  /**
-   * Called by the portlet container to indicate to a portlet that the 
-   * portlet is being placed into service.
-   *
-   * <p>The portlet container calls the <code>init</code>
-   * method exactly once after instantiating the portlet.
-   * The <code>init</code> method must complete successfully
-   * before the portlet can receive any requests.
-   *
-   * <p>The portlet container cannot place the portlet into service
-   * if the <code>init</code> method
-   * <ol>
-   * <li>Throws a <code>PortletException</code>
-   * <li>Does not return within a time period defined by the portlet container.
-   * </ol>
-   *
-   *
-   * @param config			a <code>PortletConfig</code> object 
-   *					containing the portlet's
-   * 					configuration and initialization parameters
-   *
-   * @exception PortletException 	if an exception has occurred that
-   *					interferes with the portlet's normal
-   *					operation.
-   * @exception UnavailableException 	if the portlet cannot perform the initialization at this time.
-   *
-   *
-   */
-
-  public void init(PortletConfig config) throws PortletException;
-
-
-
-
-  /**
-   * Called by the portlet container to allow the portlet to process
-   * an action request. This method is called if the client request was
-   * originated by a URL created (by the portlet) with the 
-   * <code>RenderResponse.createActionURL()</code> method.
-   * <p>
-   * Typically, in response to an action request, a portlet updates state 
-   * based on the information sent in the action request parameters.
-   * In an action the portlet may:
-   * <ul>
-   * <li>issue a redirect
-   * <li>change its window state
-   * <li>change its portlet mode
-   * <li>modify its persistent state
-   * <li>set render parameters
-   * </ul>
-   * <p>
-   * A client request triggered by an action URL translates into one 
-   * action request and many render requests, one per portlet in the portal page.
-   * The action processing must be finished before the render requests
-   * can be issued.
-   *
-   * @param request
-   *                 the action request
-   * @param response
-   *                 the action response
-   * @exception  PortletException
-   *                   if the portlet has problems fulfilling the
-   *                   request
-   * @exception  UnavailableException 	
-   *                   if the portlet is unavailable to process the action at this time
-   * @exception  PortletSecurityException  
-   *                   if the portlet cannot fullfill this request because of security reasons
-   * @exception  IOException
-   *                   if the streaming causes an I/O problem
-   */
-  public void processAction (ActionRequest request, ActionResponse response) 
-    throws PortletException, java.io.IOException;
-
-
-
-  /**
-   * Called by the portlet container to allow the portlet to generate
-   * the content of the response based on its current state.
-   *
-   * @param   request
-   *          the render request
-   * @param   response
-   *          the render response
-   *
-   * @exception   PortletException
-   *              if the portlet has problems fulfilling the
-   *              rendering request
-   * @exception  UnavailableException 	
-   *                   if the portlet is unavailable to perform render at this time
-   * @exception  PortletSecurityException  
-   *                   if the portlet cannot fullfill this request because of security reasons
-   * @exception  java.io.IOException
-   *              if the streaming causes an I/O problem
-   */
-
-  public void render (RenderRequest request, RenderResponse response) 
-    throws PortletException, java.io.IOException;
-
-
-  /**
-   *
-   * Called by the portlet container to indicate to a portlet that the
-   * portlet is being taken out of service.  
-   * <p>
-   * Before the portlet container calls the destroy method, it should 
-   * allow any threads that are currently processing requests within 
-   * the portlet object to complete execution. To avoid
-   * waiting forever, the portlet container can optionally wait for 
-   * a predefined time before destroying the portlet object.
-   *
-   * <p>This method enables the portlet to do the following:
-   * <ul>
-   * <li>clean up any resources that it holds (for example, memory,
-   * file handles, threads) 
-   * <li>make sure that any persistent state is
-   * synchronized with the portlet current state in memory.
-   * </ul>
-   */
-  
-  public void destroy();
-}
-
+/*  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.
+ */
+/*
+ * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
+ * implementations. This file may change or vanish in the final version of the JSR 286 specification.
+ */
+/*
+ * 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!
+ */
+/**
+  * Copyright 2006 IBM Corporation.
+  */
+
+package javax.portlet;
+
+import java.io.IOException;
+
+
+/**
+ * The <CODE>Portlet</CODE> interface is used by the portlet container to
+ * invoke the portlets. Every portlet has to implement this interface,
+ * either by directly implementing it, or by using an existing class 
+ * implementing the Portlet interface.
+ * <P>
+ * A portlet is a Java technology-based web component. It is managed by the portlet container and
+ * processes requests and generates dynamic content as response. Portlets are used by portals as
+ * pluggable user interface components.
+ * <p>
+ * The content generated by a portlet is called a fragment. A fragment is a piece of
+ * markup (e.g. HTML, XHTML, WML) adhering to certain rules and can be aggregated
+ * with other fragments into a complete document. The content of a portlet is normally
+ * aggregated with the content of other portlets into the portal page. 
+ * <P>
+ * The portlet container instantiates portlets, manages their lifecycle 
+ * and invoking them to process requests. The lifecycle consists of:
+ * <ul>
+ * <li>initializing the portlet using using the <code>init</code> method
+ * <li>request processsing
+ * <li>taking the portlet out of service using the <code>destroy</code> method
+ * </ul>
+ * <p>
+ * Request processing is divided into two types:
+ * <ul>
+ * <li>action requests handled through the <code>processAction</code> method, 
+ *     to perform actions targeted to the portlet
+ * <li>render requests handled through the <code>render</code> method, 
+ *     to perform the render operation
+ * </ul>
+ */
+public interface Portlet
+{
+
+
+  /**
+   * Called by the portlet container to indicate to a portlet that the 
+   * portlet is being placed into service.
+   *
+   * <p>The portlet container calls the <code>init</code>
+   * method exactly once after instantiating the portlet.
+   * The <code>init</code> method must complete successfully
+   * before the portlet can receive any requests.
+   *
+   * <p>The portlet container cannot place the portlet into service
+   * if the <code>init</code> method
+   * <ol>
+   * <li>Throws a <code>PortletException</code>
+   * <li>Does not return within a time period defined by the portlet container.
+   * </ol>
+   *
+   *
+   * @param config			a <code>PortletConfig</code> object 
+   *					containing the portlet's
+   * 					configuration and initialization parameters
+   *
+   * @exception PortletException 	if an exception has occurred that
+   *					interferes with the portlet's normal
+   *					operation.
+   * @exception UnavailableException 	if the portlet cannot perform the initialization at this time.
+   *
+   *
+   */
+
+  public void init(PortletConfig config) throws PortletException;
+
+
+
+
+  /**
+   * Called by the portlet container to allow the portlet to process
+   * an action request. This method is called if the client request was
+   * originated by a URL created (by the portlet) with the 
+   * <code>RenderResponse.createActionURL()</code> method.
+   * <p>
+   * Typically, in response to an action request, a portlet updates state 
+   * based on the information sent in the action request parameters.
+   * In an action the portlet may:
+   * <ul>
+   * <li>issue a redirect
+   * <li>change its window state
+   * <li>change its portlet mode
+   * <li>modify its persistent state
+   * <li>set render parameters
+   * </ul>
+   * <p>
+   * A client request triggered by an action URL translates into one 
+   * action request and many render requests, one per portlet in the portal page.
+   * The action processing must be finished before the render requests
+   * can be issued.
+   *
+   * @param request
+   *                 the action request
+   * @param response
+   *                 the action response
+   * @exception  PortletException
+   *                   if the portlet has problems fulfilling the
+   *                   request
+   * @exception  UnavailableException 	
+   *                   if the portlet is unavailable to process the action at this time
+   * @exception  PortletSecurityException  
+   *                   if the portlet cannot fullfill this request because of security reasons
+   * @exception  IOException
+   *                   if the streaming causes an I/O problem
+   */
+  public void processAction (ActionRequest request, ActionResponse response) 
+    throws PortletException, java.io.IOException;
+
+
+
+  /**
+   * Called by the portlet container to allow the portlet to generate
+   * the content of the response based on its current state.
+   *
+   * @param   request
+   *          the render request
+   * @param   response
+   *          the render response
+   *
+   * @exception   PortletException
+   *              if the portlet has problems fulfilling the
+   *              rendering request
+   * @exception  UnavailableException 	
+   *                   if the portlet is unavailable to perform render at this time
+   * @exception  PortletSecurityException  
+   *                   if the portlet cannot fullfill this request because of security reasons
+   * @exception  java.io.IOException
+   *              if the streaming causes an I/O problem
+   */
+
+  public void render (RenderRequest request, RenderResponse response) 
+    throws PortletException, java.io.IOException;
+
+
+  /**
+   *
+   * Called by the portlet container to indicate to a portlet that the
+   * portlet is being taken out of service.  
+   * <p>
+   * Before the portlet container calls the destroy method, it should 
+   * allow any threads that are currently processing requests within 
+   * the portlet object to complete execution. To avoid
+   * waiting forever, the portlet container can optionally wait for 
+   * a predefined time before destroying the portlet object.
+   *
+   * <p>This method enables the portlet to do the following:
+   * <ul>
+   * <li>clean up any resources that it holds (for example, memory,
+   * file handles, threads) 
+   * <li>make sure that any persistent state is
+   * synchronized with the portlet current state in memory.
+   * </ul>
+   */
+  
+  public void destroy();
+}
+

Modified: portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletConfig.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletConfig.java?rev=604161&r1=604160&r2=604161&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletConfig.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/portlet2-api/src/main/java/javax/portlet/PortletConfig.java Fri Dec 14 03:05:38 2007
@@ -1,220 +1,262 @@
-/*  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.
- */
-/*
- * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
- * implementations. This file may change or vanish in the final version of the JSR 286 specification.
- */
-/*
- * 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!
- */
-/**
-  * Copyright 2006 IBM Corporation.
-  */
-
-package javax.portlet;
-
-
-
-
-/**
- * The <CODE>PortletConfig</CODE> interface provides the portlet with
- * its configuration. The configuration holds information about the
- * portlet that is valid for all users. The configuration is retrieved
- * from the portlet definition in the deployment descriptor.
- * The portlet can only read the configuration data.
- * <p>
- * The configuration information contains the portlet name, the portlet 
- * initialization parameters, the portlet resource bundle and the portlet 
- * application context.
- * 
- * @see Portlet
- */
-public interface PortletConfig
-{
-
-
-  /**
-   * Returns the name of the portlet.
-   * <P>
-   * The name may be provided via server administration, assigned in the
-   * portlet application deployment descriptor with the <code>portlet-name</code>
-   * tag.
-   *
-   * @return   the portlet name
-   */
-
-  public String getPortletName ();
-
-
-  /**
-   * Returns the <code>PortletContext</code> of the portlet application 
-   * the portlet is in.
-   *
-   * @return   a <code>PortletContext</code> object, used by the 
-   *           caller to interact with its portlet container
-   *
-   * @see PortletContext
-   */
-
-  public PortletContext getPortletContext ();
-
-
-  /**
-   * Gets the resource bundle for the given locale based on the
-   * resource bundle defined in the deployment descriptor
-   * with <code>resource-bundle</code> tag or the inlined resources
-   * defined in the deployment descriptor.
-   *
-   * @param    locale    the locale for which to retrieve the resource bundle
-   * 
-   * @return   the resource bundle for the given locale
-   *
-   */
-
-  public java.util.ResourceBundle getResourceBundle(java.util.Locale locale);
-
-
-  /**
-   * Returns a String containing the value of the named initialization parameter, 
-   * or null if the parameter does not exist.
-   *
-   * @param name	a <code>String</code> specifying the name
-   *			of the initialization parameter
-   *
-   * @return		a <code>String</code> containing the value 
-   *			of the initialization parameter
-   *
-   * @exception	java.lang.IllegalArgumentException	
-   *                      if name is <code>null</code>.
-   */
-
-  public String getInitParameter(java.lang.String name);
-
-
-  /**
-   * Returns the names of the portlet initialization parameters as an 
-   * <code>Enumeration</code> of String objects, or an empty <code>Enumeration</code> if the 
-   * portlet has no initialization parameters.    
-   *
-   * @return		an <code>Enumeration</code> of <code>String</code> 
-   *			objects containing the names of the portlet 
-   *			initialization parameters, or an empty <code>Enumeration</code> if the 
-   *                    portlet has no initialization parameters. 
-   */
-
-  public java.util.Enumeration<String> getInitParameterNames();
-  
-
-  /**
-   * Returns the names of the public render parameters supported by the portlet
-   * as an <code>Enumeration</code> of <code>String</code> objects, 
-   * or an empty <code>Enumeration</code> if the 
-   * portlet has not defined public render parameters.
-   * <p>
-   * Public render parameters are defined in the portlet deployment descriptor
-   * with the <code>supported-public-render-parameter</code> element.    
-   *
-   * @return		an <code>Enumeration</code> of <code>String</code> 
-   *			objects containing the names of the public 
-   *			render parameters, or an empty <code>Enumeration</code> if the 
-   *                    portlet has not defined support for any public render parameters
-   *                    in the portlet deployment descriptor.
-   * @since 2.0 
-   */
-
-  public java.util.Enumeration<String> getPublicRenderParameterNames();
-  
-  
-  /**
-   * Returns the default namespace for events and public render parameters.
-   * This namespace is defined in the portlet deployment descriptor
-   * with the <code>default-namespace</code> element.
-   * <p>
-   * If no default namespace is defined in the portlet deployment
-   * descriptor this methods returns the XML default namespace 
-   * <code>XMLConstants.NULL_NS_URI</code>.
-   * 
-   * @return the default namespace defined in the portlet deployment
-   *         descriptor, or <code>XMLConstants.NULL_NS_URI</code> is non is
-   *         defined.
-   * @since 2.0
-   */
-  public java.lang.String getDefaultNamespace();
-  
-  
-  /**
-   * Returns the QNames of the publishing events supported by the portlet
-   * as an <code>Enumeration</code> of <code>QName</code> objects, 
-   * or an empty <code>Enumeration</code> if the 
-   * portlet has not defined any publishing events.    
-   * <p>
-   * Publishing events are defined in the portlet deployment descriptor
-   * with the <code>supported-publishing-event</code> element.    
-   * <p>
-   * Note that this call does not return any events published that have not been
-   * declared in the deployment descriptor as supported.
-   * 
-   * @return		an <code>Enumeration</code> of <code>QName</code> 
-   *			objects containing the names of the publishing events, 
-   *			or an empty <code>Enumeration</code> if the 
-   *                    portlet has not defined any support for publishing events in
-   *                    the deployment descriptor.
-   * @since 2.0 
-   */
-  public java.util.Enumeration<javax.xml.namespace.QName> getPublishingEventQNames();
-
-  
-  /**
-   * Returns the QNames of the processing events supported by the portlet
-   * as an <code>Enumeration</code> of <code>QName</code> objects, 
-   * or an empty <code>Enumeration</code> if the 
-   * portlet has not defined any processing events.    
-   * <p>
-   * Processing events are defined in the portlet deployment descriptor
-   * with the <code>supported-processing-event</code> element.    
-   * 
-   * @return		an <code>Enumeration</code> of <code>QName</code> 
-   *			objects containing the names of the processing events, 
-   *			or an empty <code>Enumeration</code> if the 
-   *                    portlet has not defined any support for processing events in
-   *                    the deployment descriptor.
-   * @since 2.0 
-   */
-  public java.util.Enumeration<javax.xml.namespace.QName> getProcessingEventQNames();
-
-  /**
-   * Returns the locales supported by the portlet
-   * as an <code>Enumeration</code> of <code>Locale</code> objects, 
-   * or an empty <code>Enumeration</code> if the 
-   * portlet has not defined any supported locales.    
-   * <p>
-   * Supported locales are defined in the portlet deployment descriptor
-   * with the <code>supported-locale</code> element.    
-   * 
-   * @return		an <code>Enumeration</code> of <code>Locale</code> 
-   *			objects containing the supported locales, 
-   *			or an empty <code>Enumeration</code> if the 
-   *                    portlet has not defined any supported locales in
-   *                    the deployment descriptor.
-   * @since 2.0
-   */
-  public java.util.Enumeration<java.util.Locale> getSupportedLocales();
-}
-
+/*  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.
+ */
+/*
+ * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
+ * implementations. This file may change or vanish in the final version of the JSR 286 specification.
+ */
+/*
+ * 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!
+ */
+/**
+  * Copyright 2006 IBM Corporation.
+  */
+
+package javax.portlet;
+
+
+
+
+/**
+ * The <CODE>PortletConfig</CODE> interface provides the portlet with
+ * its configuration. The configuration holds information about the
+ * portlet that is valid for all users. The configuration is retrieved
+ * from the portlet definition in the deployment descriptor.
+ * The portlet can only read the configuration data.
+ * <p>
+ * The configuration information contains the portlet name, the portlet 
+ * initialization parameters, the portlet resource bundle and the portlet 
+ * application context.
+ * 
+ * @see Portlet
+ */
+public interface PortletConfig
+{
+
+
+  /**
+   * Returns the name of the portlet.
+   * <P>
+   * The name may be provided via server administration, assigned in the
+   * portlet application deployment descriptor with the <code>portlet-name</code>
+   * tag.
+   *
+   * @return   the portlet name
+   */
+
+  public String getPortletName ();
+
+
+  /**
+   * Returns the <code>PortletContext</code> of the portlet application 
+   * the portlet is in.
+   *
+   * @return   a <code>PortletContext</code> object, used by the 
+   *           caller to interact with its portlet container
+   *
+   * @see PortletContext
+   */
+
+  public PortletContext getPortletContext ();
+
+
+  /**
+   * Gets the resource bundle for the given locale based on the
+   * resource bundle defined in the deployment descriptor
+   * with <code>resource-bundle</code> tag or the inlined resources
+   * defined in the deployment descriptor.
+   *
+   * @param    locale    the locale for which to retrieve the resource bundle
+   * 
+   * @return   the resource bundle for the given locale
+   *
+   */
+
+  public java.util.ResourceBundle getResourceBundle(java.util.Locale locale);
+
+
+  /**
+   * Returns a String containing the value of the named initialization parameter, 
+   * or null if the parameter does not exist.
+   *
+   * @param name	a <code>String</code> specifying the name
+   *			of the initialization parameter
+   *
+   * @return		a <code>String</code> containing the value 
+   *			of the initialization parameter
+   *
+   * @exception	java.lang.IllegalArgumentException	
+   *                      if name is <code>null</code>.
+   */
+
+  public String getInitParameter(java.lang.String name);
+
+
+  /**
+   * Returns the names of the portlet initialization parameters as an 
+   * <code>Enumeration</code> of String objects, or an empty <code>Enumeration</code> if the 
+   * portlet has no initialization parameters.    
+   *
+   * @return		an <code>Enumeration</code> of <code>String</code> 
+   *			objects containing the names of the portlet 
+   *			initialization parameters, or an empty <code>Enumeration</code> if the 
+   *                    portlet has no initialization parameters. 
+   */
+
+  public java.util.Enumeration<String> getInitParameterNames();
+  
+
+  /**
+   * Returns the names of the public render parameters supported by the portlet
+   * as an <code>Enumeration</code> of <code>String</code> objects, 
+   * or an empty <code>Enumeration</code> if the 
+   * portlet has not defined public render parameters.
+   * <p>
+   * Public render parameters are defined in the portlet deployment descriptor
+   * with the <code>supported-public-render-parameter</code> element.    
+   *
+   * @return		an <code>Enumeration</code> of <code>String</code> 
+   *			objects containing the names of the public 
+   *			render parameters, or an empty <code>Enumeration</code> if the 
+   *                    portlet has not defined support for any public render parameters
+   *                    in the portlet deployment descriptor.
+   * @since 2.0 
+   */
+
+  public java.util.Enumeration<String> getPublicRenderParameterNames();
+  
+  
+  /**
+   * Returns the default namespace for events and public render parameters.
+   * This namespace is defined in the portlet deployment descriptor
+   * with the <code>default-namespace</code> element.
+   * <p>
+   * If no default namespace is defined in the portlet deployment
+   * descriptor this methods returns the XML default namespace 
+   * <code>XMLConstants.NULL_NS_URI</code>.
+   * 
+   * @return the default namespace defined in the portlet deployment
+   *         descriptor, or <code>XMLConstants.NULL_NS_URI</code> is non is
+   *         defined.
+   * @since 2.0
+   */
+  public java.lang.String getDefaultNamespace();
+  
+  
+  /**
+   * Returns the QNames of the publishing events supported by the portlet
+   * as an <code>Enumeration</code> of <code>QName</code> objects, 
+   * or an empty <code>Enumeration</code> if the 
+   * portlet has not defined any publishing events.    
+   * <p>
+   * Publishing events are defined in the portlet deployment descriptor
+   * with the <code>supported-publishing-event</code> element.    
+   * <p>
+   * Note that this call does not return any events published that have not been
+   * declared in the deployment descriptor as supported.
+   * <p>
+   * If the event was defined using the <code>name</code> element instead of 
+   * the <code>qname</code> element the defined default namespace 
+   * is added as namespace for the returned QName.
+   * 
+   * @return		an <code>Enumeration</code> of <code>QName</code> 
+   *			objects containing the names of the publishing events, 
+   *			or an empty <code>Enumeration</code> if the 
+   *                    portlet has not defined any support for publishing events in
+   *                    the deployment descriptor.
+   * @since 2.0 
+   */
+  public java.util.Enumeration<javax.xml.namespace.QName> getPublishingEventQNames();
+
+  
+  /**
+   * Returns the QNames of the processing events supported by the portlet
+   * as an <code>Enumeration</code> of <code>QName</code> objects, 
+   * or an empty <code>Enumeration</code> if the 
+   * portlet has not defined any processing events.    
+   * <p>
+   * Processing events are defined in the portlet deployment descriptor
+   * with the <code>supported-processing-event</code> element.    
+   * <p>
+   * If the event was defined using the <code>name</code> element instead of 
+   * the <code>qname</code> element the defined default namespace 
+   * is added as namespace for the returned QName.
+   *   
+   * @return		an <code>Enumeration</code> of <code>QName</code> 
+   *			objects containing the names of the processing events, 
+   *			or an empty <code>Enumeration</code> if the 
+   *                    portlet has not defined any support for processing events in
+   *                    the deployment descriptor.
+   * @since 2.0 
+   */
+  public java.util.Enumeration<javax.xml.namespace.QName> getProcessingEventQNames();
+
+  /**
+   * Returns the locales supported by the portlet
+   * as an <code>Enumeration</code> of <code>Locale</code> objects, 
+   * or an empty <code>Enumeration</code> if the 
+   * portlet has not defined any supported locales.    
+   * <p>
+   * Supported locales are defined in the portlet deployment descriptor
+   * with the <code>supported-locale</code> element.    
+   * 
+   * @return		an <code>Enumeration</code> of <code>Locale</code> 
+   *			objects containing the supported locales, 
+   *			or an empty <code>Enumeration</code> if the 
+   *                    portlet has not defined any supported locales in
+   *                    the deployment descriptor.
+   * @since 2.0
+   */
+  public java.util.Enumeration<java.util.Locale> getSupportedLocales();
+  
+  /**
+   * Returns the container runtime options
+   * and values for this portlet.
+   * <p>
+   * The portlet can set container runtime
+   * options in the <code>portlet.xml</code> via the
+   * <code>container-runtime-option</code> element with a name and a
+   * value on the application and portlet level.<br>
+   * If a container runtime option is set on the portlet application 
+   * level and on the portlet level with the same name the setting 
+   * on the portlet level takes precedence and overwrites the one 
+   * set on the portal application level.
+   * <p>
+   * The map returned from this method will provide the subset the
+   * portlet container supports of the options the portlet has specified 
+   * in the <code>portlet.xml</code>. Options that the portlet container
+   * does not support will not be returned in this map.
+   * <p>
+   * The map will contain name of the runtime option as key of type String
+   * and the runtime options as values of type String array (<code>String[]</code>)
+   * with the values specified in the <code>portlet.xml</code> deployment descriptor.
+   * 
+   * @since 2.0
+   *  
+   * @return  an immutable <code>Map</code> containing portlet
+   *          container runtime options names as keys and the 
+   *          container runtime values as map values, or an empty <code>Map</code>
+   *          if no portlet container runtime options are set
+   *          in the <code>portlet.xml</code> or supported by this portlet container. 
+   *          The keys in the map are of type String. The values in the map are of type
+   *          String array (<code>String[]</code>).
+   */
+  public java.util.Map<String, String[]> getContainerRuntimeOptions();
+}
+