You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by pm...@apache.org on 2007/09/20 22:14:45 UTC
svn commit: r577903 - in
/geronimo/plugins/console/trunk/console-base-portlets/src/main:
java/org/apache/geronimo/console/car/ webapp/WEB-INF/view/car/
Author: pmcmahan
Date: Thu Sep 20 13:14:43 2007
New Revision: 577903
URL: http://svn.apache.org/viewvc?rev=577903&view=rev
Log:
GERONIMO-3413 some for the plugin installer portlet based on new schema
Modified:
geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/car/ListHandler.java
geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/download.jsp
geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/list.jsp
geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
Modified: geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/car/ListHandler.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/car/ListHandler.java?rev=577903&r1=577902&r2=577903&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/car/ListHandler.java (original)
+++ geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/car/ListHandler.java Thu Sep 20 13:14:43 2007
@@ -22,9 +22,9 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.TreeMap;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -85,17 +85,24 @@
} catch (FailedLoginException e) {
throw new PortletException("Invalid login for Maven repository '"+repository+"'", e);
}
- Map<String, List<PluginType>> results = new HashMap<String, List<PluginType>>();
+ Map<String, List<PluginType>> results = new TreeMap<String, List<PluginType>>();
if(data == null || data.getPlugin() == null) {
return false;
}
for (PluginType metadata: data.getPlugin()) {
- List<PluginType> values = results.get(metadata.getCategory());
- if(values == null) {
+ String category = metadata.getCategory();
+ if (category==null || category.trim().length()<1) {
+ category = "No Category";
+ }
+ List<PluginType> values;
+ if (!results.containsKey(category)) {
values = new ArrayList<PluginType>();
- results.put(metadata.getCategory(), values);
+ values.add(metadata);
+ results.put(category, values);
+ } else {
+ values = results.get(category);
+ values.add(metadata);
}
- values.add(metadata);
}
Collection<List<PluginType>> values = results.values();
for (List<PluginType> value : values) {
Modified: geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/download.jsp
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/download.jsp?rev=577903&r1=577902&r2=577903&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/download.jsp (original)
+++ geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/download.jsp Thu Sep 20 13:14:43 2007
@@ -24,8 +24,8 @@
<p>Found the following dependencies for this plugin. Any missing dependencies
will be installed for you automatically if you proceed.</p>
<ul>
-<c:forEach var="jar" items="${dependencies}">
- <li>${jar}</li>
+<c:forEach var="dependency" items="${dependencies}">
+ <li>${dependency.groupId}/${dependency.artifactId}/${dependency.type}/${dependency.version}</li>
</c:forEach>
</ul>
Modified: geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/list.jsp
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/list.jsp?rev=577903&r1=577902&r2=577903&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/list.jsp (original)
+++ geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/list.jsp Thu Sep 20 13:14:43 2007
@@ -20,49 +20,61 @@
<portlet:defineObjects/>
<p>These are the Geronimo plugins available in the selected repository. They may or may not already be installed in the geronimo server.</p>
-<p><b>Available Plugins:</b></p>
-
<c:forEach var="category" items="${categories}">
- <p>Category: ${category.key}</p>
+ <h3>${category.key}</h3>
<ul>
<c:forEach var="entry" items="${category.value}">
- <p>${entry.name}</p>
- <c:forEach var="instance" items="${entry.pluginArtifact}">
- <%-- <c:choose>
- <c:when test="${entry.installed || !entry.eligible}">
- <li>${entry.name}
- <c:choose>
- <c:when test="${entry.installed}">
- (already installed)
- </c:when>
- <c:otherwise>
- <c:if test="${!entry.eligible}">
- <c:forEach var="prereq" items="${entry.prerequisites}">
- <c:if test="${!prereq.present}">
- (${prereq.moduleIdWithStars} is not installed)
- </c:if>
- </c:forEach>
- </c:if>
- (Not available; <a href="<portlet:actionURL><portlet:param name="configId" value="${entry.moduleId}"/><portlet:param name="repository" value="${repository}"/><portlet:param name="repo-user" value="${repouser}"/><portlet:param name="repo-pass" value="${repopass}"/><portlet:param name="mode" value="viewForDownload-before"/></portlet:actionURL>">View Details</a>)
- </c:otherwise>
- </c:choose>
- </li>
- </c:when>
- <c:otherwise>
- --%>
- <%--${instance} ${instance.class}<br/>--%>
+ <c:choose>
+ <c:when test="${fn:length(entry.pluginArtifact) == 1}">
+ <c:set var="instance" value="${entry.pluginArtifact[0]}"/>
<li><a href="<portlet:actionURL>
<portlet:param name="configId" value="${instance.moduleId.groupId}/${instance.moduleId.artifactId}/${instance.moduleId.version}/${instance.moduleId.type}"/>
<portlet:param name="repository" value="${repository}"/>
<portlet:param name="repo-user" value="${repouser}"/>
<portlet:param name="repo-pass" value="${repopass}"/>
<portlet:param name="mode" value="viewForDownload-before"/>
- </portlet:actionURL>">${instance.moduleId.groupId}/${instance.moduleId.artifactId}/${instance.moduleId.version}/${instance.moduleId.type}</a></li>
- </c:forEach>
- <%--
- </c:otherwise>
- </c:choose>
- --%>
+ </portlet:actionURL>">${entry.name}</a></li>
+ </c:when>
+ <c:when test="${fn:length(entry.pluginArtifact) > 1}">
+ <p>${entry.name}</p>
+ <c:forEach var="instance" items="${entry.pluginArtifact}">
+ <%-- <c:choose>
+ <c:when test="${entry.installed || !entry.eligible}">
+ <li>${entry.name}
+ <c:choose>
+ <c:when test="${entry.installed}">
+ (already installed)
+ </c:when>
+ <c:otherwise>
+ <c:if test="${!entry.eligible}">
+ <c:forEach var="prereq" items="${entry.prerequisites}">
+ <c:if test="${!prereq.present}">
+ (${prereq.moduleIdWithStars} is not installed)
+ </c:if>
+ </c:forEach>
+ </c:if>
+ (Not available; <a href="<portlet:actionURL><portlet:param name="configId" value="${entry.moduleId}"/><portlet:param name="repository" value="${repository}"/><portlet:param name="repo-user" value="${repouser}"/><portlet:param name="repo-pass" value="${repopass}"/><portlet:param name="mode" value="viewForDownload-before"/></portlet:actionURL>">View Details</a>)
+ </c:otherwise>
+ </c:choose>
+ </li>
+ </c:when>
+ <c:otherwise>
+ --%>
+ <%--${instance} ${instance.class}<br/>--%>
+ <li><a href="<portlet:actionURL>
+ <portlet:param name="configId" value="${instance.moduleId.groupId}/${instance.moduleId.artifactId}/${instance.moduleId.version}/${instance.moduleId.type}"/>
+ <portlet:param name="repository" value="${repository}"/>
+ <portlet:param name="repo-user" value="${repouser}"/>
+ <portlet:param name="repo-pass" value="${repopass}"/>
+ <portlet:param name="mode" value="viewForDownload-before"/>
+ </portlet:actionURL>">${instance.moduleId.groupId}/${instance.moduleId.artifactId}/${instance.moduleId.version}/${instance.moduleId.type}</a></li>
+ </c:forEach>
+ <%--
+ </c:otherwise>
+ </c:choose>
+ --%>
+ </c:when>
+ </c:choose>
</c:forEach>
</ul>
</c:forEach>
Modified: geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp?rev=577903&r1=577902&r2=577903&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp (original)
+++ geronimo/plugins/console/trunk/console-base-portlets/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp Thu Sep 20 13:14:43 2007
@@ -83,7 +83,9 @@
<i>Any</i>
</c:when>
<c:otherwise>
- ${fn:join(pluginArtifact.jvmVersion, ", ")}
+ <c:forEach var="jvmVersion" items="${pluginArtifact.jvmVersion}">
+ ${jvmVersion}
+ </c:forEach>
</c:otherwise>
</c:choose>
</td>