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 dd...@apache.org on 2004/10/08 21:30:59 UTC
svn commit: rev 54107 - in portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto: . core
Author: ddewolf
Date: Fri Oct 8 12:30:58 2004
New Revision: 54107
Modified:
portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainer.java
portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerException.java
portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerFactory.java
portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletWindow.java
portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/InternalActionResponse.java
portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/PortletInvoker.java
Log:
Adding JavaDocs.
Modified: portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainer.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainer.java (original)
+++ portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainer.java Fri Oct 8 12:30:58 2004
@@ -126,5 +126,9 @@
*/
public String getName();
+ /**
+ * Retreive the container services associated with this container.
+ * @return
+ */
public PortletContainerServices getContainerServices();
}
Modified: portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerException.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerException.java (original)
+++ portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerException.java Fri Oct 8 12:30:58 2004
@@ -23,6 +23,7 @@
* Thrown when an internal portlet container exception occurs within Pluto.
* This type of exception indicates an error from which the container is not
* able to recover.
+ *
* @version 1.0
*/
public class PortletContainerException extends Exception {
Modified: portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerFactory.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerFactory.java (original)
+++ portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletContainerFactory.java Fri Oct 8 12:30:58 2004
@@ -24,12 +24,14 @@
* Factory used to create new PortletContainer instances. The factor constructs
* the underlying pluto container implementation by using the the given
* container services.
+ *
* @author <a href="ddewolf@apache.org">David H. DeWolf</a>
* @version 1.0
* @since Sep 18, 2004
*/
public class PortletContainerFactory {
+ /** Internal Logger. */
private static final Log LOG =
LogFactory.getLog(PortletContainerFactory.class);
Modified: portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletWindow.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletWindow.java (original)
+++ portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/PortletWindow.java Fri Oct 8 12:30:58 2004
@@ -22,19 +22,48 @@
import org.apache.pluto.om.ObjectID;
/**
+ * Thin representation of the portlet window for which the container
+ * request should be processed. The PortletWindow is used internally
+ * to map the request to the configured Portlet Application and Portlet.
+ *
+ * @see org.apache.pluto.core.InternalPortletWindow
+ * @see org.apache.pluto.binding.PortletDD
+ *
* @author <a href="ddewolf@apache.org">David H. DeWolf</a>
* @version 1.0
* @since Sep 22, 2004
*/
public interface PortletWindow {
+ /**
+ * Retrieve this windows unique id which will be
+ * used to communicate back to the referencing portal.
+ * @return unique id.
+ */
ObjectID getId();
+ /**
+ * Retrieve the context path in which the Portlet resides.
+ * @return context path
+ */
String getContextPath();
+ /**
+ * Retrieve the name of the portlet as configured in the
+ * <code>portlet.xml</code>.
+ * @return the name of the portlet.
+ */
String getPortletName();
+ /**
+ * Retrieve the current window state for this window.
+ * @return
+ */
WindowState getWindowState();
+ /**
+ * Retrieve the current portlet mode for this window.
+ * @return
+ */
PortletMode getPortletMode();
}
Modified: portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/InternalActionResponse.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/InternalActionResponse.java (original)
+++ portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/InternalActionResponse.java Fri Oct 8 12:30:58 2004
@@ -24,13 +24,37 @@
import javax.portlet.PortletMode;
import javax.portlet.WindowState;
+/**
+ * ActionResponse implemntation.
+ *
+ */
public interface InternalActionResponse extends InternalPortletResponse {
+
+ /**
+ * Retrieve the render parameters associated with
+ * this response.
+ *
+ * @return map of all render parameters associated with this request.
+ */
public Map getRenderParameters();
+ /**
+ * Retrieve the portlet mode.
+ * @return
+ */
public PortletMode getChangedPortletMode();
+ /**
+ * Retrieve the window state.
+ * @return
+ */
public WindowState getChangedWindowState();
+ /**
+ * Retreive the location for which the action should
+ * be redirected.
+ * @return
+ */
public String getRedirectLocation();
}
Modified: portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/PortletInvoker.java
==============================================================================
--- portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/PortletInvoker.java (original)
+++ portals/pluto/branches/pluto-1.1/container/src/java/org/apache/pluto/core/PortletInvoker.java Fri Oct 8 12:30:58 2004
@@ -34,20 +34,45 @@
import org.apache.pluto.core.impl.RenderRequestImpl;
import org.apache.pluto.core.impl.RenderResponseImpl;
+/**
+ * Used internally to invoke/dispatch requests from the container to
+ * the portlet application.
+ *
+ * @version 1.1
+ *
+ */
class PortletInvoker {
+ /** Internal Logger. */
private static final Log LOG = LogFactory.getLog(PortletInvoker.class);
+ /**
+ * Portlet Window for which we are invoking
+ * the portlet.
+ */
private InternalPortletWindow window;
/**
- * Default Constructor.
- * @param window
+ * Default Constructor. Create a new invoker which
+ * is initialized for the given <code>InternalPortletWindow</code>.
+ *
+ * @param window portlet window.
*/
public PortletInvoker(InternalPortletWindow window) {
this.window = window;
}
+ /**
+ * Invoke the portlet with an action request.
+ *
+ * @param request action request used for the invocation.
+ * @param response action response used for the invocation.
+ * @throws PortletException if a error occurs within the portlet.
+ * @throws IOException if an IO error occurs writing the response.
+ *
+ * @see PortletServlet
+ * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
+ */
public void action(ActionRequestImpl request, ActionResponseImpl response)
throws PortletException, IOException {
if (LOG.isDebugEnabled()) {
@@ -56,6 +81,17 @@
invoke(request, response, org.apache.pluto.Constants.METHOD_ACTION);
}
+ /**
+ * Invoke the portlet with a render request.
+ *
+ * @param request action request used for the invocation.
+ * @param response action response used for the invocation.
+ * @throws PortletException if a error occurs within the portlet.
+ * @throws IOException if an IO error occurs writing the response.
+ *
+ * @see PortletServlet
+ * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
+ */
public void render(RenderRequestImpl request, RenderResponseImpl response)
throws PortletException, IOException {
if (LOG.isDebugEnabled()) {
@@ -64,6 +100,15 @@
invoke(request, response, org.apache.pluto.Constants.METHOD_RENDER);
}
+ /**
+ * Invoke the portlet with a load request.
+ *
+ * @param request action request used for the invocation.
+ * @param response action response used for the invocation.
+ * @throws PortletException if a error occurs within the portlet.
+ *
+ * @see PortletServlet
+ */
public void load(PortletRequestImpl request, PortletResponseImpl response)
throws PortletException {
try {
@@ -78,11 +123,19 @@
}
}
+ /**
+ * Perform the invocation.
+ *
+ * @param request portlet request
+ * @param response portlet response
+ * @param methodID method identifier
+ * @throws PortletException if a portlet exception occurs.
+ * @throws IOException if an error occurs writing to the response.
+ */
private void invoke(PortletRequestImpl request,
PortletResponseImpl response,
Integer methodID)
throws PortletException, IOException {
-
String uri = window.getPortletEntity().getControllerServletUri();
ServletContext servletContext = window.getServletContext();