portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r763631 - in /portals/pluto/trunk: pluto-container-api/src/main/java/org/apache/pluto/container/ pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/ pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/
Date Thu, 09 Apr 2009 12:55:15 GMT
Author: cziegeler
Date: Thu Apr  9 12:55:15 2009
New Revision: 763631

URL: http://svn.apache.org/viewvc?rev=763631&view=rev
Log:
PLUTO-549: Rename METHOD_NOOP to METHOD_LOAD.

Modified:
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletInvokerService.java
    portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletInvocationEvent.java
    portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletServlet.java
    portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultPortletInvokerService.java

Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletInvokerService.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletInvokerService.java?rev=763631&r1=763630&r2=763631&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletInvokerService.java
(original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/container/PortletInvokerService.java
Thu Apr  9 12:55:15 2009
@@ -87,12 +87,12 @@
     Integer METHOD_ACTION = new Integer(3);
 
     /**
-     * The unique method identifier for noop (load) requests.  Load requests are
+     * The unique method identifier for load requests.  Load requests are
      * requested through a call to the {@link PortletContainer#doLoad(org.apache.pluto.container.PortletWindow,
      * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
      * method.
      */
-    Integer METHOD_NOOP = new Integer(5);
+    Integer METHOD_LOAD = new Integer(5);
 
     /**
      * The unique method identifier for resource Serving requests.  Resource requests are

Modified: portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletInvocationEvent.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletInvocationEvent.java?rev=763631&r1=763630&r2=763631&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletInvocationEvent.java
(original)
+++ portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletInvocationEvent.java
Thu Apr  9 12:55:15 2009
@@ -24,7 +24,7 @@
 
 public class PortletInvocationEvent {
 
-    public static int LOAD = PortletInvokerService.METHOD_NOOP.intValue();
+    public static int LOAD = PortletInvokerService.METHOD_LOAD.intValue();
 
     public static int ACTION = PortletInvokerService.METHOD_ACTION.intValue();
 

Modified: portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletServlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletServlet.java?rev=763631&r1=763630&r2=763631&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletServlet.java
(original)
+++ portals/pluto/trunk/pluto-container-driver-api/src/main/java/org/apache/pluto/container/driver/PortletServlet.java
Thu Apr  9 12:55:15 2009
@@ -61,14 +61,14 @@
 public class PortletServlet extends HttpServlet
 {
     private static final long serialVersionUID = -5096339022539360365L;
-    
+
     static class NullPortlet implements EventPortlet, ResourceServingPortlet, Portlet
     {
         public void processEvent(EventRequest arg0, EventResponse arg1)
         throws PortletException, IOException
         {
         }
-        
+
         public void serveResource(ResourceRequest arg0, ResourceResponse arg1)
         throws PortletException, IOException
         {
@@ -91,7 +91,7 @@
         throws PortletException, IOException
         {
         }
-    }    
+    }
 
     // Private Member Variables ------------------------------------------------
     /**
@@ -203,7 +203,7 @@
 
             PortletDefinition portletDD = portletConfig.getPortletDefinition();
 
-//          Create and initialize the portlet wrapped in the servlet.
+            //          Create and initialize the portlet wrapped in the servlet.
             try
             {
                 Class<?> clazz = paClassLoader.loadClass((portletDD.getPortletClass()));
@@ -231,25 +231,25 @@
         {
             if ( startTimer != null )
             {
-              startTimer.cancel();
-              startTimer = null;
+                startTimer.cancel();
+                startTimer = null;
             }
             else if ( started && portletContext != null)
             {
-              started = false;
-              contextService.unregister(portletContext);
-              if (portlet != null)
-              {
-                  try
-                  {
-                      portlet.destroy();
-                  }
-                  catch (Exception e)
-                  {
-                      // ignore
-                  }
-                  portlet = null;
-              }
+                started = false;
+                contextService.unregister(portletContext);
+                if (portlet != null)
+                {
+                    try
+                    {
+                        portlet.destroy();
+                    }
+                    catch (Exception e)
+                    {
+                        // ignore
+                    }
+                    portlet = null;
+                }
             }
             super.destroy();
         }
@@ -257,21 +257,21 @@
 
     protected void doGet(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException
-    {
+            {
         dispatch(request, response);
-    }
+            }
 
     protected void doPost(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException
-    {
+            {
         dispatch(request, response);
-    }
+            }
 
     protected void doPut(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException
-    {
+            {
         dispatch(request, response);
-    }
+            }
 
     // Private Methods ---------------------------------------------------------
 
@@ -294,7 +294,7 @@
      */
     private void dispatch(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException
-    {
+            {
         if (portlet == null)
         {
             throw new javax.servlet.UnavailableException("Portlet "+portletName+" unavailable");
@@ -306,12 +306,12 @@
         final PortletRequest portletRequest = (PortletRequest)request.getAttribute(PortletInvokerService.PORTLET_REQUEST);
 
         final PortletResponse portletResponse = (PortletResponse)request.getAttribute(PortletInvokerService.PORTLET_RESPONSE);
-        
+
         final PortletRequestContext requestContext = (PortletRequestContext)portletRequest.getAttribute(PortletInvokerService.REQUEST_CONTEXT);
         final PortletResponseContext responseContext = (PortletResponseContext)portletRequest.getAttribute(PortletInvokerService.RESPONSE_CONTEXT);
-        
+
         final FilterManager filterManager = (FilterManager)request.getAttribute(PortletInvokerService.FILTER_MANAGER);
-        
+
         request.removeAttribute(PortletInvokerService.METHOD_ID);
         request.removeAttribute(PortletInvokerService.PORTLET_REQUEST);
         request.removeAttribute(PortletInvokerService.PORTLET_RESPONSE);
@@ -382,8 +382,8 @@
                 }
             }
 
-            // The requested method is NOOP: do nothing.
-            else if (methodId == PortletInvokerService.METHOD_NOOP)
+            // The requested method is LOAD: do nothing.
+            else if (methodId == PortletInvokerService.METHOD_LOAD)
             {
                 // Do nothing.
             }
@@ -423,7 +423,7 @@
             throw new ServletException(ex);
 
         }
-    }
+            }
 
     protected void notify(PortletInvocationEvent event, boolean pre, Throwable e)
     {

Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultPortletInvokerService.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultPortletInvokerService.java?rev=763631&r1=763630&r2=763631&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultPortletInvokerService.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DefaultPortletInvokerService.java
Thu Apr  9 12:55:15 2009
@@ -61,7 +61,7 @@
      * Exception Messages.
      */
     private static final StringManager EXCEPTIONS = StringManager.getManager(
-        DefaultPortletInvokerService.class.getPackage().getName());
+            DefaultPortletInvokerService.class.getPackage().getName());
 
     // Private Member Variables ------------------------------------------------
 
@@ -69,9 +69,9 @@
      *  TODO: this is Pluto Portal Driver specific!
      * */
     private static final String PREFIX = "/PlutoInvoker/";
-    
+
     private PortletContextService portletContextService;
-    
+
     // Constructor -------------------------------------------------------------
 
     /**
@@ -94,7 +94,7 @@
      * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest,javax.portlet.ActionResponse)
      */
     public void action(PortletRequestContext context, ActionRequest request, ActionResponse
response, FilterManager filterManager)
-        throws IOException, PortletException, PortletContainerException {
+    throws IOException, PortletException, PortletContainerException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Action Invocation");
         }
@@ -110,13 +110,13 @@
      * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest,javax.portlet.RenderResponse)
      */
     public void render(PortletRequestContext context, RenderRequest request, RenderResponse
response, FilterManager filterManager)
-        throws IOException, PortletException, PortletContainerException {
+    throws IOException, PortletException, PortletContainerException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Render Invocation");
         }
-        invoke(context, request, response, filterManager, PortletInvokerService.METHOD_RENDER);
       
+        invoke(context, request, response, filterManager, PortletInvokerService.METHOD_RENDER);
     }
-    
+
     /**
      * Invoke the portlet with a render request.
      *
@@ -126,13 +126,13 @@
      * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest,javax.portlet.RenderResponse)
      */
     public void event(PortletRequestContext context, EventRequest request, EventResponse
response, FilterManager filterManager)
-        throws IOException, PortletException, PortletContainerException {
+    throws IOException, PortletException, PortletContainerException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Render Invocation");
         }
         invoke(context, request, response, filterManager, PortletInvokerService.METHOD_EVENT);
     }
-    
+
     /**
      * Invoke the portlet with a resource request.
      *
@@ -142,7 +142,7 @@
      * @see javax.portlet.Portlet#resource(javax.portlet.ResourceRequest,javax.portlet.ResourceResponse)
      */
     public void serveResource(PortletRequestContext context, ResourceRequest request, ResourceResponse
response, FilterManager filterManager)
-        throws IOException, PortletException, PortletContainerException {
+    throws IOException, PortletException, PortletContainerException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Resource Invocation");
         }
@@ -157,15 +157,15 @@
      * @see PortletServlet
      */
     public void load(PortletRequestContext context, PortletRequest request, PortletResponse
response)
-        throws IOException, PortletException, PortletContainerException {
+    throws IOException, PortletException, PortletContainerException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Load Invocation.");
         }
-        invoke(context, request, response, PortletInvokerService.METHOD_NOOP);
+        invoke(context, request, response, PortletInvokerService.METHOD_LOAD);
     }
 
     public void admin(PortletRequestContext context, PortletRequest request, PortletResponse
response)
-        throws IOException, PortletException, PortletContainerException {
+    throws IOException, PortletException, PortletContainerException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Performing Admin Invocation.");
         }
@@ -175,15 +175,15 @@
 
     // Private Invoke Method ---------------------------------------------------
 
-    private final void invoke(PortletRequestContext context, 
-                                PortletRequest request,
-                                PortletResponse response,
-                                Integer methodID)
-    	throws PortletException, IOException, PortletContainerException {
-    	
-    	invoke(context, request, response, null, methodID);
+    private final void invoke(PortletRequestContext context,
+            PortletRequest request,
+            PortletResponse response,
+            Integer methodID)
+    throws PortletException, IOException, PortletContainerException {
+
+        invoke(context, request, response, null, methodID);
     }
-    
+
     /**
      * Perform the invocation.
      *
@@ -195,35 +195,35 @@
      * @throws IOException      if an error occurs writing to the response.
      */
     protected final void invoke(PortletRequestContext context,
-                                PortletRequest request,
-                                PortletResponse response,
-                                FilterManager filterManager,
-                                Integer methodID)
-        throws PortletException, IOException, PortletContainerException {
+            PortletRequest request,
+            PortletResponse response,
+            FilterManager filterManager,
+            Integer methodID)
+    throws PortletException, IOException, PortletContainerException {
 
         PortletWindow portletWindow = context.getPortletWindow();
         String appName = portletWindow.getPortletEntity().getPortletDefinition().getApplication().getName();
         ServletContext servletContext = portletContextService.getPortletContext(appName).getServletContext();
-        
+
         String uri =  PREFIX + portletWindow.getPortletEntity().getPortletDefinition().getPortletName();
         if (LOG.isDebugEnabled()) {
             LOG.debug("Dispatching to portlet servlet at: " + uri);
         }
-        
+
         RequestDispatcher dispatcher = servletContext.getRequestDispatcher(uri);
 
         if (dispatcher != null) {
 
             HttpServletRequest containerRequest = context.getContainerRequest();
             HttpServletResponse containerResponse = context.getContainerResponse();
-            
+
             try {
 
                 containerRequest.setAttribute(PortletInvokerService.METHOD_ID, methodID);
                 containerRequest.setAttribute(PortletInvokerService.PORTLET_REQUEST, request);
                 containerRequest.setAttribute(PortletInvokerService.PORTLET_RESPONSE, response);
                 containerRequest.setAttribute(PortletInvokerService.FILTER_MANAGER, filterManager);
-                
+
                 if (methodID.equals(PortletInvokerService.METHOD_RESOURCE))
                 {
                     dispatcher.forward(containerRequest, containerResponse);
@@ -237,14 +237,14 @@
             } catch (javax.servlet.UnavailableException ex) {
                 int seconds = ex.isPermanent() ? -1 : ex.getUnavailableSeconds();
                 String message = EXCEPTIONS.getString(
-                    "error.portlet.invoker.unavailable",
-                    uri, new String[]{String.valueOf(seconds)}
+                        "error.portlet.invoker.unavailable",
+                        uri, new String[]{String.valueOf(seconds)}
                 );
                 if (LOG.isErrorEnabled()) {
                     LOG.error(message, ex);
                 }
                 throw new javax.portlet.UnavailableException(
-                    message, seconds);
+                        message, seconds);
 
             } catch (javax.servlet.ServletException ex) {
                 String message = EXCEPTIONS.getString("error.portlet.invoker");
@@ -253,7 +253,7 @@
                 }
 
                 if (ex.getRootCause() != null &&
-                    ex.getRootCause() instanceof PortletException) {
+                        ex.getRootCause() instanceof PortletException) {
                     throw (PortletException) ex.getRootCause();
                 } else if (ex.getRootCause() != null) {
                     throw new PortletException(ex.getRootCause());
@@ -269,8 +269,8 @@
             }
         } else {
             String msg = EXCEPTIONS.getString(
-                "error.portlet.invoker.dispatcher",
-                new String[]{servletContext.getServletContextName(), uri}
+                    "error.portlet.invoker.dispatcher",
+                    new String[]{servletContext.getServletContextName(), uri}
             );
             if (LOG.isErrorEnabled()) {
                 LOG.error(msg);



Mime
View raw message