geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r388264 - in /geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console: ./ jmsmanager/wizard/
Date Thu, 23 Mar 2006 20:44:07 GMT
Author: ammulder
Date: Thu Mar 23 12:44:05 2006
New Revision: 388264

URL: http://svn.apache.org/viewcvs?rev=388264&view=rev
Log:
Merge portlet framework improvements from HEAD

Added:
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/MultiPageAbstractHandler.java
      - copied unchanged from r383230, geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/MultiPageAbstractHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/MultiPageModel.java
      - copied unchanged from r383230, geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/MultiPageModel.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/MultiPagePortlet.java
      - copied unchanged from r383230, geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/MultiPagePortlet.java
Modified:
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ConfigureRAInstanceHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateConnectionFactoryHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateDestinationHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/DeployHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ReviewHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectConnectionFactoryTypeHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectDestinationTypeHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ShowPlanHandler.java

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
Thu Mar 23 12:44:05 2006
@@ -16,21 +16,6 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.connector.deployment.jsr88.AdminObjectDCB;
-import org.apache.geronimo.connector.deployment.jsr88.AdminObjectInstance;
-import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinition;
-import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinitionInstance;
-import org.apache.geronimo.connector.deployment.jsr88.Connector15DCBRoot;
-import org.apache.geronimo.connector.deployment.jsr88.ConnectorDCB;
-import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapter;
-import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapterInstance;
-import org.apache.geronimo.connector.deployment.jsr88.SinglePool;
-import org.apache.geronimo.console.util.PortletManager;
-import org.apache.geronimo.deployment.tools.loader.ConnectorDeployable;
-import org.apache.geronimo.naming.deployment.jsr88.GBeanLocator;
-
 import javax.enterprise.deploy.model.DDBean;
 import javax.enterprise.deploy.model.DDBeanRoot;
 import javax.enterprise.deploy.spi.DeploymentConfiguration;
@@ -57,70 +42,32 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.Iterator;
+import java.net.URL;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.console.MultiPageAbstractHandler;
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.deployment.tools.loader.ConnectorDeployable;
+import org.apache.geronimo.connector.deployment.jsr88.Connector15DCBRoot;
+import org.apache.geronimo.connector.deployment.jsr88.ConnectorDCB;
+import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapter;
+import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapterInstance;
+import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinition;
+import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinitionInstance;
+import org.apache.geronimo.connector.deployment.jsr88.SinglePool;
+import org.apache.geronimo.connector.deployment.jsr88.AdminObjectDCB;
+import org.apache.geronimo.connector.deployment.jsr88.AdminObjectInstance;
+import org.apache.geronimo.naming.deployment.jsr88.GBeanLocator;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Base class for portlet helpers
  *
  * @version $Rev: 368994 $ $Date: 2006-01-14 02:07:18 -0500 (Sat, 14 Jan 2006) $
  */
-public abstract class AbstractHandler {
+public abstract class AbstractHandler extends MultiPageAbstractHandler {
     private final static Log log = LogFactory.getLog(AbstractHandler.class);
-    protected final static String BEFORE_ACTION="-before";
-    protected final static String AFTER_ACTION="-after";
-    protected PortletRequestDispatcher view;
-    private final String mode;
-    private final String viewName;
-
-    protected AbstractHandler(String mode, String viewName) {
-        this.mode = mode;
-        this.viewName = viewName;
-    }
-
-    public String getMode() {
-        return mode;
-    }
-
-    public void init(PortletConfig portletConfig) throws PortletException {
-        if(viewName != null) {
-            view = portletConfig.getPortletContext().getRequestDispatcher(viewName);
-        }
-    }
-
-    public void destroy() {
-        view = null;
-    }
-
-    public PortletRequestDispatcher getView() {
-        return view;
-    }
-
-    protected static boolean isEmpty(String s) {
-        return s == null || s.trim().equals("");
-    }
-
-    /**
-     * Returns the mode for the next screen to render (usually this one)
-     */
-    public abstract String actionBeforeView(ActionRequest request, ActionResponse response,
JMSResourceData data) throws PortletException, IOException;
-
-    public abstract void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException;
-
-    /**
-     * Returns the mode for the next screen to render (usually the one after this in the
sequence)
-     */
-    public abstract String actionAfterView(ActionRequest request, ActionResponse response,
JMSResourceData data) throws PortletException, IOException;
-
-
-    private static void waitForProgress(ProgressObject po) {
-        while(po.getDeploymentStatus().isRunning()) {
-            try {
-                Thread.sleep(100);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
     // ********** This part specific to JMS portlets **********
 
     protected final static String LIST_MODE="list";
@@ -151,7 +98,11 @@
     protected final static String IDLE_TIME_PARAMETER="poolIdleTimeout";
     protected final static String BLOCK_TIME_PARAMETER="poolBlockingTimeout";
 
-    public static class JMSResourceData {
+    public AbstractHandler(String mode, String viewName) {
+        super(mode, viewName);
+    }
+
+    public static class JMSResourceData implements MultiPageModel {
         private String rarURI;
         private String dependency;
         private String instanceName;

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ConfigureRAInstanceHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ConfigureRAInstanceHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ConfigureRAInstanceHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ConfigureRAInstanceHandler.java
Thu Mar 23 12:44:05 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
+import org.apache.geronimo.console.MultiPageModel;
+
 import java.io.IOException;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -33,16 +35,18 @@
         super(CONFIGURE_RA_MODE, "/WEB-INF/view/jmswizard/raInstance.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         request.setAttribute("provider", provider);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         if(isEmpty(data.getInstanceName())) {
             return getMode()+BEFORE_ACTION;
         }

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateConnectionFactoryHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateConnectionFactoryHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateConnectionFactoryHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateConnectionFactoryHandler.java
Thu Mar 23 12:44:05 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
+import org.apache.geronimo.console.MultiPageModel;
+
 import java.io.IOException;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -33,17 +35,20 @@
         super(ADD_FACTORY_MODE, "/WEB-INF/view/jmswizard/factory.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         data.getCurrentFactory().setFactoryType(data.getFactoryType());
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         request.setAttribute("provider", provider);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         if(isEmpty(data.getCurrentFactory().getInstanceName())) {
             return getMode();
         }

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateDestinationHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateDestinationHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateDestinationHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/CreateDestinationHandler.java
Thu Mar 23 12:44:05 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
+import org.apache.geronimo.console.MultiPageModel;
+
 import java.io.IOException;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -33,17 +35,20 @@
         super(ADD_DESTINATION_MODE, "/WEB-INF/view/jmswizard/destination.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         data.getCurrentDestination().setDestinationType(data.getDestinationType());
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         request.setAttribute("provider", provider);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         if(isEmpty(data.getCurrentDestination().getName())) {
             return getMode();
         }

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/DeployHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/DeployHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/DeployHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/DeployHandler.java
Thu Mar 23 12:44:05 2006
@@ -23,6 +23,7 @@
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
 import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.console.MultiPageModel;
 
 /**
  * Can deploy a JMS resource into the server.  There currently no UI associated with this.
@@ -34,15 +35,16 @@
         super(DEPLOY_MODE, null);
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         save(request, response, data, false);
         return LIST_MODE;
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
         return LIST_MODE;
     }
 }

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java
Thu Mar 23 12:44:05 2006
@@ -27,20 +27,20 @@
 import javax.portlet.RenderRequest;
 import javax.portlet.ActionRequest;
 import javax.portlet.WindowState;
+import javax.portlet.PortletRequest;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.console.BasePortlet;
+import org.apache.geronimo.console.MultiPagePortlet;
+import org.apache.geronimo.console.MultiPageModel;
 
 /**
  * A portlet that lets you configure and deploy JDBC connection pools.
  *
  * @version $Rev: 368994 $ $Date: 2006-01-14 02:07:18 -0500 (Sat, 14 Jan 2006) $
  */
-public class JMSResourcePortlet extends BasePortlet {
-    private final static Log log = LogFactory.getLog(JMSResourcePortlet.class);
-    private static final String MODE_KEY = "mode";
-    private Map helpers = new HashMap();
-
+public class JMSResourcePortlet extends MultiPagePortlet {
     public void init(PortletConfig config) throws PortletException {
         super.init(config);
         addHelper(new ListScreenHandler(), config);
@@ -55,79 +55,7 @@
         addHelper(new ReviewHandler(), config);
     }
 
-    public void destroy() {
-        for (Iterator it = helpers.values().iterator(); it.hasNext();) {
-            AbstractHandler handler = (AbstractHandler) it.next();
-            handler.destroy();
-        }
-        helpers.clear();
-        super.destroy();
-    }
-
-    public void processAction(ActionRequest actionRequest,
-                              ActionResponse actionResponse) throws PortletException, IOException
{
-        String mode = actionRequest.getParameter(MODE_KEY);
-        AbstractHandler.JMSResourceData data = new AbstractHandler.JMSResourceData(actionRequest);
-        while(true) {
-            if(mode == null) {
-                break;
-            }
-            int pos = mode.lastIndexOf('-');
-            if(pos == -1) { // Assume it's a render request
-                break;
-            } else {
-                String type = mode.substring(pos+1);
-                mode = mode.substring(0, pos);
-                AbstractHandler handler = (AbstractHandler) helpers.get(mode);
-                if(handler == null) {
-                    log.error("No handler for action mode '"+mode+"'");
-                    break;
-                }
-                log.debug("Using action handler '"+handler.getClass().getName()+"'");
-                if(type.equals("before")) {
-                    mode = handler.actionBeforeView(actionRequest, actionResponse, data);
-                } else if(type.equals("after")) {
-                    mode = handler.actionAfterView(actionRequest, actionResponse, data);
-                } else {
-                    log.error("Unrecognized portlet action '"+mode+"'");
-                    mode = null;
-                }
-            }
-        }
-        if(mode != null) {
-            actionResponse.setRenderParameter(MODE_KEY, mode);
-        }
-        data.save(actionResponse);
-    }
-
-    protected void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws
IOException, PortletException {
-        if (WindowState.MINIMIZED.equals(renderRequest.getWindowState())) {
-            return;
-        }
-        String mode = renderRequest.getParameter(MODE_KEY);
-        AbstractHandler.JMSResourceData data = new AbstractHandler.JMSResourceData(renderRequest);
-        if(mode == null || mode.equals("")) {
-            mode = "list";
-        }
-        AbstractHandler handler = (AbstractHandler) helpers.get(mode);
-        try {
-            if(handler == null) {
-                log.error("No handler for render mode '"+mode+"'");
-            } else {
-                log.debug("Using render handler '"+handler.getClass().getName()+"'");
-                handler.renderView(renderRequest, renderResponse, data);
-            }
-        } catch (Throwable e) {
-            log.error("Unable to render portlet", e);
-        }
-        renderRequest.setAttribute("data", data);
-        if(handler != null) {
-            handler.getView().include(renderRequest, renderResponse);
-        }
-    }
-
-    private void addHelper(AbstractHandler handler, PortletConfig config) throws PortletException
{
-        handler.init(config);
-        helpers.put(handler.getMode(), handler);
+    protected MultiPageModel getModel(PortletRequest request) {
+        return new AbstractHandler.JMSResourceData(request);
     }
 }

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java
Thu Mar 23 12:44:05 2006
@@ -25,6 +25,7 @@
 import org.apache.geronimo.management.geronimo.JCAResource;
 import org.apache.geronimo.management.ResourceAdapter;
 import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.console.MultiPageModel;
 
 import javax.portlet.*;
 import javax.management.ObjectName;
@@ -44,15 +45,16 @@
         super(LIST_MODE, "/WEB-INF/view/jmswizard/list.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
         populateExistingList(request);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         String provider = request.getParameter(PROVIDER_PARAMETER);
         if(isEmpty(provider)) {
             return SELECT_PROVIDER_MODE+BEFORE_ACTION;

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ReviewHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ReviewHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ReviewHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ReviewHandler.java
Thu Mar 23 12:44:05 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
+import org.apache.geronimo.console.MultiPageModel;
+
 import java.io.IOException;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -33,16 +35,18 @@
         super(REVIEW_MODE, "/WEB-INF/view/jmswizard/status.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         request.setAttribute("provider", provider);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         String next = request.getParameter("nextAction");
         if(next.equals(SELECT_DESTINATION_TYPE_MODE)) {
             data.setCurrentDestinationID(data.getAdminObjects().size());

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectConnectionFactoryTypeHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectConnectionFactoryTypeHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectConnectionFactoryTypeHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectConnectionFactoryTypeHandler.java
Thu Mar 23 12:44:05 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
+import org.apache.geronimo.console.MultiPageModel;
+
 import java.io.IOException;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -33,7 +35,8 @@
         super(SELECT_FACTORY_TYPE_MODE, "/WEB-INF/view/jmswizard/factoryType.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         data.createIfNecessary();
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         if(data.getCurrentFactory().getTransaction() == null || data.getCurrentFactory().getTransaction().equals(""))
{
@@ -47,12 +50,13 @@
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         request.setAttribute("provider", provider);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
         return ADD_FACTORY_MODE+BEFORE_ACTION;
     }
 }

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectDestinationTypeHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectDestinationTypeHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectDestinationTypeHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectDestinationTypeHandler.java
Thu Mar 23 12:44:05 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
+import org.apache.geronimo.console.MultiPageModel;
+
 import java.io.IOException;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -33,7 +35,8 @@
         super(SELECT_DESTINATION_TYPE_MODE, "/WEB-INF/view/jmswizard/destinationType.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         data.createIfNecessary();
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         // If there's only one factory type, skip this step
@@ -44,12 +47,13 @@
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         JMSProviderData provider = JMSProviderData.getProviderData(data.getRarURI(), request);
         request.setAttribute("provider", provider);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
         return ADD_DESTINATION_MODE+BEFORE_ACTION;
     }
 }

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java
Thu Mar 23 12:44:05 2006
@@ -30,6 +30,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.SortedSet;
+import org.apache.geronimo.console.MultiPageModel;
 
 /**
  * Handler for the screen where you select a JMS provider (because
@@ -44,15 +45,16 @@
         super(SELECT_PROVIDER_MODE, "/WEB-INF/view/jmswizard/provider.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
         loadRARList(request);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         String rar = request.getParameter(RAR_FILE_PARAMETER);
         if (isEmpty(rar)) {
             return SELECT_PROVIDER_MODE + BEFORE_ACTION;

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ShowPlanHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ShowPlanHandler.java?rev=388264&r1=388263&r2=388264&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ShowPlanHandler.java
(original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/ShowPlanHandler.java
Thu Mar 23 12:44:05 2006
@@ -23,6 +23,7 @@
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
 import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.console.MultiPageModel;
 
 /**
  * Handles the page that shows a deployment plan
@@ -34,13 +35,15 @@
         super(SHOW_PLAN_MODE, "/WEB-INF/view/jmswizard/plan.jsp");
     }
 
-    public String actionBeforeView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         String plan = save(request, response, data, true);
         request.getPortletSession(true).setAttribute("deploymentPlan", plan);
         return getMode();
     }
 
-    public void renderView(RenderRequest request, RenderResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         request.setAttribute("deploymentPlan", request.getPortletSession().getAttribute("deploymentPlan"));
         String path = PortletManager.getRepositoryEntry(request, data.getRarURI()).getPath();
         String base = PortletManager.getServerInfo(request).getCurrentBaseDirectory();
@@ -56,7 +59,8 @@
         request.setAttribute("rarURL", path);
     }
 
-    public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData
data) throws PortletException, IOException {
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        JMSResourceData data = (JMSResourceData) model;
         request.getPortletSession(true).removeAttribute("deploymentPlan");
         String next = request.getParameter("nextAction");
         if(next.equals(SELECT_DESTINATION_TYPE_MODE)) {



Mime
View raw message