geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r701233 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Date Thu, 02 Oct 2008 20:21:39 GMT
Author: linsun
Date: Thu Oct  2 13:21:39 2008
New Revision: 701233

URL: http://svn.apache.org/viewvc?rev=701233&view=rev
Log:
GERONIMO-4319 - All plugin groups are shown as installable from the install plugin portlet

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?rev=701233&r1=701232&r2=701233&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Thu Oct  2 13:21:39 2008
@@ -980,18 +980,28 @@
         // 1. Check that it's not already installed
         if (metadata.getModuleId() != null) { // that is, it's a real configuration not a
plugin list
             Artifact artifact = toArtifact(metadata.getModuleId());
-            if (configManager.isInstalled(artifact)) {
-                boolean upgrade = false;
-                for (ArtifactType obsolete : metadata.getObsoletes()) {
-                    Artifact test = toArtifact(obsolete);
-                    if (test.matches(artifact)) {
-                        upgrade = true;
-                        break;
+            
+            //plugin groups don't get registered with configManager
+            if (plugin.isPluginGroup() != null && plugin.isPluginGroup()) {
+                if (installedArtifacts.contains(artifact)) {
+                    log.debug("Configuration {} is already installed", artifact);
+                    return false;
+                }
+            } else {
+                if (configManager.isInstalled(artifact)) {
+                    boolean upgrade = false;
+                    for (ArtifactType obsolete : metadata.getObsoletes()) {
+                        Artifact test = toArtifact(obsolete);
+                        if (test.matches(artifact)) {
+                            upgrade = true;
+                            break;
+                        }
+                    }
+                    if (!upgrade && installedArtifacts.contains(artifact)) {
+                        log.debug("Configuration {} is already installed", artifact);
+                        return false;
                     }
                 }
-                if (!upgrade && installedArtifacts.contains(artifact)) {
-                    log.debug("Configuration {} is already installed", artifact);
-                    return false;                }
             }
         }
 
@@ -1630,6 +1640,7 @@
         PluginType copy = new PluginType();
         copy.setAuthor(metadata.getAuthor());
         copy.setCategory(metadata.getCategory());
+        copy.setPluginGroup(metadata.isPluginGroup() == null ? false : metadata.isPluginGroup());
         copy.setDescription(metadata.getDescription());
         copy.setName(metadata.getName());
         copy.setUrl(metadata.getUrl());



Mime
View raw message