Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 47920 invoked from network); 6 Aug 2005 22:37:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Aug 2005 22:37:36 -0000 Received: (qmail 33901 invoked by uid 500); 6 Aug 2005 22:37:35 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 33891 invoked by uid 500); 6 Aug 2005 22:37:35 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 33878 invoked by uid 99); 6 Aug 2005 22:37:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Aug 2005 15:37:35 -0700 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 06 Aug 2005 15:37:25 -0700 Received: (qmail 47908 invoked by uid 65534); 6 Aug 2005 22:37:34 -0000 Message-ID: <20050806223734.47907.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r230608 - in /geronimo/trunk/applications/console-standard/src: java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java webapp/WEB-INF/portlet.xml webapp/WEB-INF/web.xml Date: Sat, 06 Aug 2005 22:37:33 -0000 To: scm@geronimo.apache.org From: ammulder@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: ammulder Date: Sat Aug 6 15:37:29 2005 New Revision: 230608 URL: http://svn.apache.org/viewcvs?rev=230608&view=rev Log: Basic implementation for the Applications/[Module Type] portlets GERONIMO-794 (thanks to Joe Bohn) Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml Modified: geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=230608&r1=230607&r2=230608&view=diff ============================================================================== --- geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original) +++ geronimo/trunk/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Sat Aug 6 15:37:29 2005 @@ -66,6 +66,8 @@ private static final String QUEUETOPIC_URI = "runtimedestination/"; + private static final String CONFIG_INIT_PARAM = "config-type"; + private static final ObjectName deployer = JMXUtil .getObjectName(ObjectNameConstants.DEPLOYER_OBJECT_NAME); @@ -134,7 +136,7 @@ throw new PortletException("Exception", e); } } - + /** * Uninstall an application configuration * @@ -175,6 +177,15 @@ } } } + /** + * Check if a configuration should be listed here. This method depends on the "config-type" portlet parameter + * which is set in portle.xml. + */ + private boolean shouldListConfig(ConfigurationInfo info){ + String configType = getInitParameter(CONFIG_INIT_PARAM); + if(configType!=null && !info.getType().getName().equalsIgnoreCase(configType)) return false; + else return true; + } /* * private URI getConfigID(ActionRequest actionRequest) throws @@ -205,7 +216,7 @@ List infos = configManager.listConfigurations(storeName); for (Iterator j = infos.iterator(); j.hasNext();) { ConfigurationInfo info = (ConfigurationInfo) j.next(); - if (!EXCLUDED.contains(info.getConfigID())) { + if (shouldListConfig(info)) { // TODO: Check if this is the right solution // Disregard JMS Queues and Topics && if (!info.getConfigID().getPath().startsWith( @@ -225,7 +236,7 @@ } } renderRequest.setAttribute("configurations", configInfo); - messageInstalled = configInfo.size() == 0 ? "No Installed Applications

" + messageInstalled = configInfo.size() == 0 ? "No modules found of this type

" : ""; renderRequest.setAttribute("messageInstalled", messageInstalled); renderRequest.setAttribute("messageStatus", messageStatus); Modified: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml?rev=230608&r1=230607&r2=230608&view=diff ============================================================================== --- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml (original) +++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/portlet.xml Sat Aug 6 15:37:29 2005 @@ -561,7 +561,7 @@ EARModules EAR Modules Portlet - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet -1 @@ -578,6 +578,12 @@ EAR Modules Application EAR Module + + + config-type + EAR + + @@ -585,7 +591,7 @@ WARModules WAR Modules Portlet - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet -1 @@ -602,6 +608,11 @@ WAR Modules Web Application WAR Module + + + config-type + WAR + @@ -609,7 +620,7 @@ EJBModules EJB Modules Portlet - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet -1 @@ -626,6 +637,11 @@ EJB Modules EJB JAR Module + + + config-type + EJB + @@ -633,7 +649,7 @@ RARModules RAR Modules Portlet - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet -1 @@ -650,6 +666,11 @@ RAR Modules J2EE Connector RAR Module + + + config-type + RAR + @@ -657,7 +678,7 @@ ClientModules Client Modules Portlet - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet -1 @@ -674,6 +695,11 @@ Client Modules Application Client JAR Module + + + config-type + CAR + @@ -681,7 +707,7 @@ SystemModules System Modules Portlet - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet -1 @@ -698,6 +724,11 @@ System Modules System Module + + + config-type + SERVICE + Modified: geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewcvs/geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml?rev=230608&r1=230607&r2=230608&view=diff ============================================================================== --- geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml (original) +++ geronimo/trunk/applications/console-standard/src/webapp/WEB-INF/web.xml Sat Aug 6 15:37:29 2005 @@ -93,7 +93,7 @@ org.apache.pluto.core.PortletServlet portlet-class - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet portlet-guid @@ -106,7 +106,7 @@ org.apache.pluto.core.PortletServlet portlet-class - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet portlet-guid @@ -119,7 +119,7 @@ org.apache.pluto.core.PortletServlet portlet-class - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet portlet-guid @@ -132,7 +132,7 @@ org.apache.pluto.core.PortletServlet portlet-class - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet portlet-guid @@ -145,7 +145,7 @@ org.apache.pluto.core.PortletServlet portlet-class - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet portlet-guid @@ -158,7 +158,7 @@ org.apache.pluto.core.PortletServlet portlet-class - org.apache.geronimo.console.EmptyPortlet + org.apache.geronimo.console.configmanager.ConfigManagerPortlet portlet-guid