geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r555784 - in /geronimo/sandbox/portals/geronimo-console/src/main: java/org/apache/geronimo/console/car/ webapp/WEB-INF/view/car/ webapp/WEB-INF/view/configmanager/
Date Thu, 12 Jul 2007 21:48:14 GMT
Author: pmcmahan
Date: Thu Jul 12 14:48:13 2007
New Revision: 555784

URL: http://svn.apache.org/viewvc?view=rev&rev=555784
Log:
merge GERONIMO-2757 from trunk.  fixes <geronimo-versions> element in exported geronimo-plugin.xml.
also remove remnants of the ContextForwardGBean ("/forwards" in the servlet urls).  includes
patch submitted by Becky Smith.


Modified:
    geronimo/sandbox/portals/geronimo-console/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
    geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/confirmExport.jsp
    geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/pluginParams.jsp
    geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/configmanager/deploy.jsp

Modified: geronimo/sandbox/portals/geronimo-console/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java?view=diff&rev=555784&r1=555783&r2=555784
==============================================================================
--- geronimo/sandbox/portals/geronimo-console/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
(original)
+++ geronimo/sandbox/portals/geronimo-console/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
Thu Jul 12 14:48:13 2007
@@ -75,39 +75,10 @@
                 log.warn("Unable to edit plugin metadata containing more than one license!
 Additional license data will not be editable.");
             }
         }
-        //request.setAttribute("gerVersions", combine(data.getGeronimoVersions()));
+        //Choose the first geronimo-versions element and set the config version element to
that version number.
         PluginMetadata.geronimoVersions[] gerVers = data.getGeronimoVersions();
         if(gerVers != null && gerVers.length > 0) {
-        	for (int i = 0; i < gerVers.length; i++) {
-        		PluginMetadata.geronimoVersions ver = gerVers[i];
-        		String prefix = "geronimo-versions" + (i+1);
-        		request.setAttribute(prefix +"Version", ver.getVersion());
-                if (ver.getModuleId() != null) {
-                    request.setAttribute(prefix +"ModuleID", ver.getModuleId().toString());
-                }
-                String[] repos = ver.getRepository();
-                if (repos != null && repos.length > 0) {
-                	for ( int j=0; j < repos.length; j++ ) {
-                		String repo = repos[j];
-                		String prefixes = "repo" + (j+1);
-                		request.setAttribute(prefixes, repo);
-                	}
-                }
-                PluginMetadata.Prerequisite[] reqs = ver.getPreReqs();
-                if(reqs != null && reqs.length > 0) {
-                    for (int j = 0; j < reqs.length; j++) {
-                        PluginMetadata.Prerequisite req = reqs[j];
-                        String prefixes = "prereq" + (j+1);
-                        request.setAttribute(prefixes, req.getModuleId().toString());
-                        if (req.getResourceType() != null) {
-                            request.setAttribute(prefixes +"type", req.getResourceType());
-                        }
-                        if (req.getDescription() != null) {
-                            request.setAttribute(prefixes +"desc", req.getDescription());
-                        }
-                    }
-                }
-        	}
+            request.setAttribute("geronimoVersion",gerVers[0].getVersion());
         }
         request.setAttribute("jvmVersions", combine(data.getJvmVersions()));
         request.setAttribute("dependencies", combine(data.getDependencies()));
@@ -154,54 +125,14 @@
             licenses.add(data.getLicenses()[i]);
         }
         metadata.setLicenses((PluginMetadata.License[]) licenses.toArray(new PluginMetadata.License[licenses.size()]));
+        //Take the geronimo version and throw it into a geronimo-versions element and then
add it to the metadata object.
+        PluginMetadata.geronimoVersions geronimoVersion = null;
+        String version = request.getParameter("geronimoVersion");
         List gerVersions = new ArrayList();
-        int counter = 1;
-        while(true) {
-        	String prefix = "geronimo-versions" + counter;
-        	++counter;
-        	String id = request.getParameter(prefix);
-        	if (id == null || id.trim() == "") {
-        		break;
-        	}
-        	String version = request.getParameter(prefix+"Version");
-        	String moduleId = request.getParameter(prefix+"ModuleID");
-        	String repository = request.getParameter(prefix+"Repo");
-        	List repos = new ArrayList();
-        	int repoCounter = 1;
-        	while(true) {
-        		String prefixes = "repo" + repoCounter;
-        		++repoCounter;
-        		String versionRepo = request.getParameter(prefixes);
-        		if(versionRepo == null || versionRepo.trim().equals("")) {
-        			break;
-        		}
-        		repos.add(versionRepo);
-        	}
-        		
-        	int preCounter = 1;
-        	List prereqs = new ArrayList();
-            while(true) {
-                String prefixes = "prereq" + preCounter;
-                ++preCounter;
-                String prereq = request.getParameter(prefixes);
-                if(prereq == null || prereq.trim().equals("")) {
-                    break;
-                }
-                String type = request.getParameter(prefixes+"type");
-                String desc = request.getParameter(prefixes+"desc");
-                if(type != null && type.trim().equals("")) {
-                    type = null;
-                }
-                if(desc != null && desc.trim().equals("")) {
-                    desc = null;
-                }
-                prereqs.add(new PluginMetadata.Prerequisite(Artifact.create(id), false, type,
desc));
-            }
-            gerVersions.add(new PluginMetadata.geronimoVersions(version, moduleId, (String[])repos.toArray(new
String[repos.size()]), (PluginMetadata.Prerequisite[])prereqs.toArray(new PluginMetadata.Prerequisite[prereqs.size()])));
     	
-        }
+        gerVersions.add(new PluginMetadata.geronimoVersions(version,null,null,null));
         metadata.setGeronimoVersions((PluginMetadata.geronimoVersions[])gerVersions.toArray(new
PluginMetadata.geronimoVersions[gerVersions.size()]));
         List prereqs = new ArrayList();
-        counter = 1;
+        int counter = 1;
         while(true) {
             String prefix = "prereq" + counter;
             ++counter;

Modified: geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/confirmExport.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/confirmExport.jsp?view=diff&rev=555784&r1=555783&r2=555784
==============================================================================
--- geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/confirmExport.jsp
(original)
+++ geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/confirmExport.jsp
Thu Jul 12 14:48:13 2007
@@ -25,7 +25,7 @@
 <p>Use the button below to save the plugin "${name}" to disk.</p>
 
 <%-- todo: calculate the /console prefix somehow --%>
-<form action="/console/forwards/car-export" method="GET">
+<form action="/console/car-export" method="GET">
     <input type="hidden" name="configId" value="${configId}" />
     <input type="submit" value="Export Plugin" />
 </form>

Modified: geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/pluginParams.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/pluginParams.jsp?view=diff&rev=555784&r1=555783&r2=555784
==============================================================================
--- geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/pluginParams.jsp
(original)
+++ geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/car/pluginParams.jsp
Thu Jul 12 14:48:13 2007
@@ -145,18 +145,15 @@
           </tr>
         <!-- ENTRY FIELD: Geronimo Versions -->
           <tr>
-            <th style="min-width: 140px"><div align="right">Geronimo Versions:</div></th>
-            <td><textarea rows="5" cols="60" name="gerVersions">${gerVersions}</textarea></td>
+            <th style="min-width: 140px"><div align="right">Geronimo Version:</div></th>
+            <td><input type="text" cols="30" name="geronimoVersion" value="${geronimoVersion}"/></td>
           </tr>
           <tr>
             <td></td>
             <td>
-              An optional list of Geronimo versions supported by this plugin.  If no values
-              are listed, the plugin can be installed in any version of Geronimo.  Otherwise,
-              list one acceptable Geronimo version per line, like
-              "1.1&nbsp;\n&nbsp;1.1.1&nbsp;\n&nbsp;1.1.2&nbsp;\n&nbsp;..."
-              (ideally, of course, this means you've actually tested the plugin with each
-              Geronimo version listed here).
+              The Geronimo Version element is the version of geronimo that this plugin will
+              be running on.  It is a required element and take on values such as 2.0-SNAPSHOT
+              and 2.0-M2
             </td>
           </tr>
         <!-- ENTRY FIELD: JVM Versions -->

Modified: geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/configmanager/deploy.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/configmanager/deploy.jsp?view=diff&rev=555784&r1=555783&r2=555784
==============================================================================
--- geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/configmanager/deploy.jsp
(original)
+++ geronimo/sandbox/portals/geronimo-console/src/main/webapp/WEB-INF/view/configmanager/deploy.jsp
Thu Jul 12 14:48:13 2007
@@ -61,7 +61,7 @@
 <p/>
 <div id="<portlet:namespace/>migratedPlan" style="display:inline">
 Migrated plan:
-<form method="POST" action="/console/forwards/plan-export">
+<form method="POST" action="/console/plan-export">
     <textarea name="migratedPlan" rows=10 cols=80><c:out escapeXml="true" value="${migratedPlan}"/></textarea>
     <br/>
     <button onclick="<portlet:namespace/>toggleDisplay('originalPlan');<portlet:namespace/>toggleDisplay('migratedPlan');return
false;">Show original plan</button>



Mime
View raw message