geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r689138 - in /geronimo/server/trunk/plugins/console/plugin-portlets/src/main: java/org/apache/geronimo/console/car/ resources/ webapp/WEB-INF/view/car/
Date Tue, 26 Aug 2008 17:16:56 GMT
Author: linsun
Date: Tue Aug 26 10:16:55 2008
New Revision: 689138

URL: http://svn.apache.org/viewvc?rev=689138&view=rev
Log:
part of GERONIMO-4265: Enhance Custom server assembly portlet usability - give users 3 custom
assembly modes to pick

Modified:
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/PluginInfoBean.java
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblyIndex.jsp
    geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java?rev=689138&r1=689137&r2=689138&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyListHandler.java
Tue Aug 26 10:16:55 2008
@@ -56,6 +56,7 @@
         String artifactId = request.getParameter("artifactId");
         String version = request.getParameter("version");
         String format = request.getParameter("format");
+        String type = request.getParameter("type");
 
         if(!isEmpty(column)) response.setRenderParameter("column", column);
         response.setRenderParameter("relativeServerPath", isEmpty(relativeServerPath) ? "var/temp/assembly"
: relativeServerPath);
@@ -63,6 +64,7 @@
         if(!isEmpty(artifactId)) response.setRenderParameter("artifactId", artifactId);
         response.setRenderParameter("version", isEmpty(version) ? "1.0" : version);
         if(!isEmpty(format)) response.setRenderParameter("format", format);
+        if(!isEmpty(type)) response.setRenderParameter("type", type);
         
         response.setWindowState(WindowState.MAXIMIZED);
         
@@ -76,6 +78,7 @@
         String artifactId = request.getParameter("artifactId");
         String version = request.getParameter("version");
         String format = request.getParameter("format");
+        String type = request.getParameter("type");
         if(!loadFromServer(request)) {
             //todo: loading failed -- do something!
         }
@@ -86,6 +89,7 @@
         request.setAttribute("artifactId", artifactId);
         request.setAttribute("version", version);
         request.setAttribute("format", format);
+        request.setAttribute("type", type);
     }
 
     public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
@@ -140,6 +144,12 @@
                     }
                 }
                 
+                //if the category is Geronimo Plugin Group, set it as plugingroup.
+                //TODO: need a better way to do this.
+                if (metadata.getCategory().equalsIgnoreCase("Geronimo Plugin Group")) {
+                    plugin.setIsPluginGroup(true);
+                }
+
                 plugins.add(plugin);
             }
         }

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/BaseImportExportHandler.java?rev=689138&r1=689137&r2=689138&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
Tue Aug 26 10:16:55 2008
@@ -119,4 +119,5 @@
         }
         return installList;
     }
+
 }

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/PluginInfoBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/PluginInfoBean.java?rev=689138&r1=689137&r2=689138&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/PluginInfoBean.java
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/PluginInfoBean.java
Tue Aug 26 10:16:55 2008
@@ -59,6 +59,7 @@
     protected boolean installable = true;
     protected String validationMessage;
     protected boolean isSystemPlugin = true;
+    protected boolean isPluginGroup = false;
 
     public List<PropertyType> getArtifactAlias() {
         return artifactAlias;
@@ -263,4 +264,12 @@
     public void setIsSystemPlugin(boolean isSystemPlugin) {
         this.isSystemPlugin = isSystemPlugin;
     }
+    
+    public boolean getIsPluginGroup() {
+        return this.isPluginGroup;
+    }
+    
+    public void setIsPluginGroup(boolean isPluginGroup) {
+        this.isPluginGroup = isPluginGroup;
+    }
 }
\ No newline at end of file

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties?rev=689138&r1=689137&r2=689138&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets.properties
Tue Aug 26 10:16:55 2008
@@ -61,6 +61,7 @@
 car.download.foundDependencies                = Found the following dependencies for this
plugin.  Any missing dependencies will be installed for you automatically if you proceed.
 car.download.processing                       = Processing {0}...
 car.downloadStatus.processing                 = Current file being operated on...
+car.index.assemblyMode                        = Custom Assembly Mode: 
 car.index.assembleServerLong                  = Assemble a server from plugins in this one
 car.index.assembleServer                      = Assemble a server
 car.index.createGeronimoPluginExp             = Choose a configuration in the current Geronimo
server to export as a Geronimo plugin.  The configuration will be saved as a CAR file to your
local filesystem. <i>Note: at present, you must manually add a <tt>META-INF/geronimo-plugin.xml</tt>
file to the CAR  after you export it in order for it to be a valid plugin.</i>
@@ -75,7 +76,9 @@
 car.list.assemblyGroupId                      = Assembly groupId:
 car.list.assemblyPath                         = Assembly target path:
 car.list.assemblyVersion                      = Assembly version:
+car.list.nameServer                           = Name the server to be assembled: 
 car.list.noPlugins                            = No plugins are listed at this repository.
+car.list.PluginGroup                          = Plugin Groups in local server: 
 car.list.pluginRepo                           = Plugins listed at
 car.list.systemPlugin                         = System plugins in local server:
 car.pluginParams.JVMVersionsExp               = An optional list of JVM version prefixes
supported by this plugin.  If no values are listed, the plugin can be installed in Geronimo
running in any version of the JVM.  Otherwise, list one acceptable JVM version prefix per
line, like "1.4.2&nbsp;\r\n&nbsp;1.5&nbsp;\r\n&nbsp;..." (ideally, of course,
this means you've actually tested the plugin with Geronimo on each JVM version listed here).

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties?rev=689138&r1=689137&r2=689138&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/resources/pluginportlets_zh.properties
Tue Aug 26 10:16:55 2008
@@ -61,6 +61,7 @@
 car.download.foundDependencies                = \u4E0B\u9762\u662F\u627E\u5230\u7684\u8FD9\u4E2A\u63D2\u4EF6\u7684\u4F9D\u8D56\u9879\u3002\u5982\u679C\u4F60\u7EE7\u7EED\u7684\u8BDD\uFF0C\u5C06\u4F1A\u81EA\u52A8\u5730\u5B89\u88C5\u4EFB\u4F55\u7F3A\u5C11\u7684\u4F9D\u8D56\u9879\u3002
 car.download.processing                       = \u5904\u7406{0}\u4E2D...
 car.downloadStatus.processing                 = \u5904\u7406\u4E2D{0}...
+car.index.assemblyMode                        = Custom Assembly Mode: 
 car.index.assembleServerLong                  = Assemble a server from plugins in this one
 car.index.assembleServer                      = Assemble a server
 car.index.createGeronimoPluginExp             = \u5728\u5F53\u524DGeronimo\u670D\u52A1\u5668\u4E2D\u9009\u62E9\u8981\u4F5C\u4E3AGeronimo\u63D2\u4EF6\u5BFC\u51FA\u7684\u914D\u7F6E\u3002\u8FD9\u4E2A\u914D\u7F6E\u5C06\u4EE5CAR\u6587\u4EF6\u7684\u5F62\u5F0F\u4FDD\u5B58\u5230\u4F60\u672C\u5730\u7CFB\u7EDF\u4E2D\u3002<i>\u6CE8\u610F\uFF1A\u5728\u4F60\u5C06\u5B83\u5BFC\u51FA\u540E\uFF0C\u76EE\u524D\u8981\u4F7F\u5B83\u5F53\u4F5C\u4E00\u4E2A\u6709\u6548\u7684\u63D2\u4EF6\uFF0C\u4F60\u5FC5\u987B\u624B\u52A8\u5730\u6DFB\u52A0<tt>META-INF/geronimo-plugin.xml</tt>\u6587\u4EF6\u5230CAR\u4E2D\u3002</i>
@@ -74,7 +75,9 @@
 car.list.assemblyGroupId                      = Assembly groupId:
 car.list.assemblyPath                         = Assembly target path:
 car.list.assemblyVersion                      = Assembly version:
+car.list.nameServer                           = Name the server to be assembled: 
 car.list.noPlugins                            = \u6B64\u7AD9\u70B9\u4E0B\u6CA1\u6709Plugin.
+car.list.PluginGroup                          = Plugin Groups in local server: 
 car.list.pluginRepo                           = Plugins\u4F4D\u4E8E
 car.list.systemPlugin                         = System plugins in local server:
 car.pluginParams.JVMVersionsExp               = \u4E00\u4E2A\u53EF\u9009\u7684\u5217\u8868\uFF0C\u7528\u4E8E\u5217\u51FA\u8FD9\u4E2A\u63D2\u4EF6\u652F\u6301\u7684JVM\u7248\u672C\u7684\u524D\u7F00\u3002\u5982\u679C\u6CA1\u6709\u5217\u51FA\u4EFB\u4F55\u503C\u7684\u8BDD\uFF0C\u8FD9\u4E2A\u63D2\u4EF6\u53EF\u5B89\u88C5\u5728\u8FD0\u884C\u4E8E\u4EFB\u4F55\u7248\u672C\u7684JVM\u7684Geronimo\u4E2D\u3002\u4E0D\u7136\u7684\u8BDD\uFF0C\u6BCF\u4E00\u884C\u5217\u51FA\u4E00\u4E2A\u53EF\u63A5\u53D7\u7684JVM\u7248\u672C\u524D\u7F00\uFF0C\u5C31\u50CF"1.4.2&nbsp;\r\n&nbsp;1.5&nbsp;\r\n&nbsp;..."
(\u5F53\u7136\uFF0C\u7406\u60F3\u60C5\u51B5\u4E0B\uFF0C\u8FD9\u610F\u5473\u7740\u5728\u8FD9\u91CC\u5217\u51FA\u7684JVN\u7248\u672C\u4E2D\uFF0C\u4F60\u786E\u5B9E\u5DF2\u7ECF\u6D4B\u8BD5\u8FC7\u8FD9\u4E2A\u63D2\u4EF6)\u3002

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblyIndex.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblyIndex.jsp?rev=689138&r1=689137&r2=689138&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblyIndex.jsp
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblyIndex.jsp
Tue Aug 26 10:16:55 2008
@@ -25,6 +25,12 @@
 <h2><fmt:message key="car.index.assembleServerLong"/></h2>
 
 <form name="<portlet:namespace/>AssemblyForm" action="<portlet:actionURL/>"
method="POST">
+    <label for="<portlet:namespace/>type"><fmt:message key="car.index.assemblyMode"/></label>
+    <select name="type" id="<portlet:namespace/>type">
+        <option selected>Function Centric</option>
+        <option>Application Centric</option>
+        <option>Expert Users</option>
+    </select>
     <input type="hidden" name="mode" value="listServer-before"/>
     <input type="submit" value='<fmt:message key="car.index.assembleServer"/>'/>
 </form>

Modified: geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp?rev=689138&r1=689137&r2=689138&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp
(original)
+++ geronimo/server/trunk/plugins/console/plugin-portlets/src/main/webapp/WEB-INF/view/car/assemblylist.jsp
Tue Aug 26 10:16:55 2008
@@ -49,7 +49,7 @@
 </c:when>
 <c:otherwise>
 <form name="frmlst" action="<portlet:actionURL/>">
-    <h3>Name the server to be assembled</h3>
+    <h3><fmt:message key="car.list.nameServer" /></h3>
     <input id="mode" type="hidden" name="mode" value="assemblyView-before"/>
     
 <table border="0" cellpadding="3">
@@ -78,7 +78,101 @@
   </td>
 </table>
 
-    
+<c:choose>
+<c:when test="${type eq 'Application Centric'}">   
+
+    <h3><fmt:message key="car.list.applicationPlugin"/></h3>
+<table border="0" cellpadding="3">
+<tr>
+  <th class="DarkBackground">&nbsp;</th>
+  <c:forEach var="column" items="Name,Version,Category">
+  <th class="DarkBackground">${column}</th>
+  </c:forEach>
+</tr>
+<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
+<c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
+<c:if test="${!plugin.isSystemPlugin}">
+<tr>
+  <td class="${style}">
+    <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+  </td>
+  <td class="${style}">
+    <a href='<portlet:actionURL>
+    <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+    <portlet:param name="mode" value="assemblyView-before"/>
+    </portlet:actionURL>'>${plugin.name}</a>
+  </td>
+  <td class="${style}">${artifact.version}</td>
+  <td class="${style}">${plugin.category}</td>
+</tr>
+</c:if>    
+</c:forEach>
+</table>
+</c:when>
+
+<c:when test="${type eq 'Function Centric'}"> 
+    <h3><fmt:message key="car.list.PluginGroup"/></h3>
+<table border="0" cellpadding="3">
+<tr>
+  <th class="DarkBackground">&nbsp;</th>
+  <c:forEach var="column" items="Name,Version,Category">
+  <th class="DarkBackground">${column}</th>
+  </c:forEach>
+</tr>
+<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
+<c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
+<c:if test="${plugin.isPluginGroup}">
+<tr>
+  <td class="${style}">
+    <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+  </td>
+  <td class="${style}">
+    <a href='<portlet:actionURL>
+    <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+    <portlet:param name="mode" value="assemblyView-before"/>
+    </portlet:actionURL>'>${plugin.name}</a>
+  </td>
+  <td class="${style}">${artifact.version}</td>
+  <td class="${style}">${plugin.category}</td>
+</tr>
+</c:if>    
+</c:forEach>
+</table>
+
+
+    <h3><fmt:message key="car.list.applicationPlugin"/></h3>
+<table border="0" cellpadding="3">
+<tr>
+  <th class="DarkBackground">&nbsp;</th>
+  <c:forEach var="column" items="Name,Version,Category">
+  <th class="DarkBackground">${column}</th>
+  </c:forEach>
+</tr>
+<c:forEach var="plugin" items="${plugins}" varStatus="status">
+<c:set var="style" value="${status.index % 2 == 0 ? 'MediumBackground' : 'LightBackground'}"/>
+<c:set var="artifact" value="${plugin.pluginArtifact.moduleId}"/>
+<c:if test="${!plugin.isSystemPlugin}">
+<tr>
+  <td class="${style}">
+    <input type="checkbox" name="plugin" title="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"
value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+  </td>
+  <td class="${style}">
+    <a href='<portlet:actionURL>
+    <portlet:param name="configId" value="${artifact.groupId}/${artifact.artifactId}/${artifact.version}/${artifact.type}"/>
+    <portlet:param name="mode" value="assemblyView-before"/>
+    </portlet:actionURL>'>${plugin.name}</a>
+  </td>
+  <td class="${style}">${artifact.version}</td>
+  <td class="${style}">${plugin.category}</td>
+</tr>
+</c:if>    
+</c:forEach>
+</table>
+</c:when>
+
+<c:otherwise>
 
     <h3><fmt:message key="car.list.applicationPlugin"/></h3>
 <table border="0" cellpadding="3">
@@ -110,9 +204,9 @@
 </tr>
 </c:if>    
 </c:forEach>
-
 </table>
 
+
     <h3><fmt:message key="car.list.systemPlugin"/></h3>
 <table border="0" cellpadding="3">
 <tr>
@@ -144,8 +238,13 @@
 </c:if>
 </c:forEach>
 </table>
+</c:otherwise>
+</c:choose>
+
+
     <input type="submit" value='<fmt:message key="car.common.assemble"/>' onclick="if(!checkAllVal('plugin')){return
false;}else return true;"/>
     <input type="submit" value='<fmt:message key="consolebase.common.cancel"/>'
onclick="history.go(-1); return false;" />
+
 </form>
 </c:otherwise>
 </c:choose>



Mime
View raw message