geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r550605 - in /geronimo/sandbox/portals/geronimo-console-standard/src/main: java/org/apache/geronimo/console/car/ webapp/WEB-INF/view/car/
Date Mon, 25 Jun 2007 20:56:07 GMT
Author: pmcmahan
Date: Mon Jun 25 13:56:07 2007
New Revision: 550605

URL: http://svn.apache.org/viewvc?view=rev&rev=550605
Log:
merge recent plugin installer changes from trunk
svn merge -r 549706:549707 https://svn.apache.org/repos/asf/geronimo/server/trunk/applications/console/geronimo-console-standard/
.

Modified:
    geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
    geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
    geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
    geronimo/sandbox/portals/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp

Modified: geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java?view=diff&rev=550605&r1=550604&r2=550605
==============================================================================
--- geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
(original)
+++ geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
Mon Jun 25 13:56:07 2007
@@ -85,14 +85,19 @@
                 if (ver.getModuleId() != null) {
                     request.setAttribute(prefix +"ModuleID", ver.getModuleId().toString());
                 }
-                if (ver.getRepository() != null) {
-                    request.setAttribute(prefix +"Repo", ver.getRepository());
+                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.getPrerequisite();
+                PluginMetadata.Prerequisite[] reqs = ver.getPreReqs();
                 if(reqs != null && reqs.length > 0) {
-                    for (int j = 0; i < reqs.length; i++) {
-                        PluginMetadata.Prerequisite req = reqs[i];
-                        String prefixes = "prereq" + (i+1);
+                    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());
@@ -161,11 +166,23 @@
         	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;
-                ++counter;
+                ++preCounter;
                 String prereq = request.getParameter(prefixes);
                 if(prereq == null || prereq.trim().equals("")) {
                     break;
@@ -180,7 +197,7 @@
                 }
                 prereqs.add(new PluginMetadata.Prerequisite(Artifact.create(id), false, type,
desc));
             }
-            gerVersions.add(new PluginMetadata.geronimoVersions(version, moduleId, repository,
(PluginMetadata.Prerequisite[])prereqs.toArray(new PluginMetadata.Prerequisite[prereqs.size()])));
     	
+            gerVersions.add(new PluginMetadata.geronimoVersions(version, moduleId, (String[])repos.toArray(new
String[repos.size()]), (PluginMetadata.Prerequisite[])prereqs.toArray(new PluginMetadata.Prerequisite[prereqs.size()])));
     	
         }
         metadata.setGeronimoVersions((PluginMetadata.geronimoVersions[])gerVersions.toArray(new
PluginMetadata.geronimoVersions[gerVersions.size()]));
         List prereqs = new ArrayList();

Modified: geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java?view=diff&rev=550605&r1=550604&r2=550605
==============================================================================
--- geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
(original)
+++ geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
Mon Jun 25 13:56:07 2007
@@ -321,9 +321,15 @@
         if (ver.getModuleId() != null){
         	createText(doc, ger, "module-id", ver.getModuleId());
         }
-        if (ver.getPrerequisite() != null){
-            for (int j = 0; j < ver.getPrerequisite().length; j++) {
-                PluginMetadata.Prerequisite prereq = ver.getPrerequisite()[j];
+        if (ver.getRepository() != null) {
+        	String[] repos = ver.getRepository();
+        	for ( int i=0; i < repos.length; i++ ) {
+        		createText(doc, ger, "source-repository", repos[i]);
+        	}
+        }
+        if (ver.getPreReqs() != null){
+            for (int j = 0; j < ver.getPreReqs().length; j++) {
+                PluginMetadata.Prerequisite prereq = ver.getPreReqs()[j];
                 Element pre = doc.createElement("prerequisite");
                 createText(doc, pre, "id", prereq.getModuleId().toString());
                 if(prereq.getResourceType() != null) {

Modified: geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java?view=diff&rev=550605&r1=550604&r2=550605
==============================================================================
--- geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
(original)
+++ geronimo/sandbox/portals/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
Mon Jun 25 13:56:07 2007
@@ -84,6 +84,7 @@
         }
         request.setAttribute("configId", configId);
         request.setAttribute("plugin", config);
+        request.setAttribute("gerVersions",config.getGeronimoVersions());
         request.setAttribute("repository", repo);
         request.setAttribute("repouser", user);
         request.setAttribute("repopass", pass);

Modified: geronimo/sandbox/portals/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/portals/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp?view=diff&rev=550605&r1=550604&r2=550605
==============================================================================
--- geronimo/sandbox/portals/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
(original)
+++ geronimo/sandbox/portals/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
Mon Jun 25 13:56:07 2007
@@ -63,12 +63,12 @@
     <th align="right" valign="top">Geronimo-Versions:</th>
     <td>
       <c:choose>
-        <c:when test="${empty plugin.geronimoVersions}">
+        <c:when test="${empty gerVersions}">
           <i>None</i>
         </c:when>
         <c:otherwise>
-          <c:forEach var="gerVersions" items="${plugin.geronimoVersions}">
-            <b>${gerVersions.version}</b>
+          <c:forEach var="geronimoVersions" items="${gerVersions}">
+            <b>${geronimoVersions.version}</b>
           </c:forEach>
         </c:otherwise>
       </c:choose>
@@ -115,6 +115,35 @@
       </c:choose>
     </td>
   </tr>
+  <tr>
+	<th align="right" valign="top">Version Specific Prerequisites:</th>
+	<td>
+	  <c:choose>
+		<c:when test="${empty gerVersions}">
+		  <i>None</i>
+		</c:when>
+		<c:otherwise>
+		  <c:forEach var="version" items="${gerVersions}">
+		    Version: ${version.version}:<br/>
+			<c:choose>
+			  <c:when test="${empty version.preReqs}">
+			    <i>None</i><br/>
+			  </c:when>
+			  <c:otherwise>
+			    <c:forEach var="preReq" items="${version.preReqs}">
+				  <b>${preReq.moduleIdWithStars}</b> (${preReq.resourceType})<br/>
+				  ${preReq.description}
+				  <c:if test="${!preReq.present}">
+                    <br /><b><font color="red">NOT AVAILABLE</font></b>
+				  </c:if>
+			    </c:forEach>
+			  </c:otherwise>
+			</c:choose>
+		  </c:forEach>
+		</c:otherwise>
+	  </c:choose>
+	</td>
+  </tr>		
   <tr>
     <th align="right" valign="top">Obsoletes:</th>
     <td>



Mime
View raw message