geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r428813 - in /geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src: ./ java/org/apache/geronimo/console/car/ webapp/WEB-INF/view/car/
Date Fri, 04 Aug 2006 18:24:22 GMT
Author: jdillon
Date: Fri Aug  4 11:24:20 2006
New Revision: 428813

URL: http://svn.apache.org/viewvc?rev=428813&view=rev
Log:
 r622@jason-dillons-computer (orig r427991):  jdillon | 2006-08-02 07:13:42 -0700
  r607@dyn456093 (orig r427388):  ammulder | 2006-07-31 17:43:46 -0700
  Merge GERONIMO-2253 to trunk
  
 

Added:
    geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
  (with props)
    geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/viewForDownload.jsp
  (with props)
Modified:
    geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/   (props
changed)
    geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
    geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ImportExportPortlet.java
    geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/download.jsp
    geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/list.jsp

Propchange: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Aug  4 11:24:20 2006
@@ -1 +1 @@
-13f79535-47bb-0310-9956-ffa450edef68:/geronimo/sandbox/svkmerge/trunk/applications/console/console-standard/src:427990
+13f79535-47bb-0310-9956-ffa450edef68:/geronimo/sandbox/svkmerge/trunk/applications/console/console-standard/src:427991

Modified: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/BaseImportExportHandler.java?rev=428813&r1=428812&r2=428813&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
(original)
+++ geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/BaseImportExportHandler.java
Fri Aug  4 11:24:20 2006
@@ -29,6 +29,7 @@
     protected static final String INDEX_MODE = "index";
     protected static final String LIST_MODE = "list";
     protected static final String DOWNLOAD_MODE = "download";
+    protected static final String VIEW_FOR_DOWNLOAD_MODE = "viewForDownload";
     protected static final String DOWNLOAD_STATUS_MODE = "downloadStatus";
     protected static final String RESULTS_MODE = "results";
     protected static final String CONFIGURE_EXPORT_MODE = "configure";

Modified: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ImportExportPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ImportExportPortlet.java?rev=428813&r1=428812&r2=428813&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ImportExportPortlet.java
(original)
+++ geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ImportExportPortlet.java
Fri Aug  4 11:24:20 2006
@@ -39,6 +39,7 @@
         addHelper(new ExportHandler(), config);
         addHelper(new DownloadStatusHandler(), config);
         addHelper(new UpdateListHandler(), config);
+        addHelper(new ViewPluginDownloadHandler(), config);
     }
 
     protected String getModelJSPVariableName() {

Added: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java?rev=428813&view=auto
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
(added)
+++ geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
Fri Aug  4 11:24:20 2006
@@ -0,0 +1,95 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.car;
+
+import java.io.IOException;
+import java.net.URL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.security.auth.login.FailedLoginException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.system.plugin.PluginMetadata;
+import org.apache.geronimo.system.plugin.PluginList;
+
+/**
+ * Handler for the screen that shows you plugin details before you go on and
+ * install it.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class ViewPluginDownloadHandler  extends BaseImportExportHandler {
+    private final static Log log = LogFactory.getLog(ViewPluginDownloadHandler.class);
+
+    public ViewPluginDownloadHandler() {
+        super(VIEW_FOR_DOWNLOAD_MODE, "/WEB-INF/view/car/viewForDownload.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        String configId = request.getParameter("configId");
+        String repo = request.getParameter("repository");
+        String user = request.getParameter("repo-user");
+        String pass = request.getParameter("repo-pass");
+        response.setRenderParameter("configId", configId);
+        response.setRenderParameter("repository", repo);
+        if(!isEmpty(user)) response.setRenderParameter("repo-user", user);
+        if(!isEmpty(pass)) response.setRenderParameter("repo-pass", pass);
+
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel
model) throws PortletException, IOException {
+        String configId = request.getParameter("configId");
+        String repo = request.getParameter("repository");
+        String user = request.getParameter("repo-user");
+        String pass = request.getParameter("repo-pass");
+        PluginMetadata config = null;
+        try {
+            PluginList list = (PluginList) request.getPortletSession(true).getAttribute(CONFIG_LIST_SESSION_KEY);
+            if(list == null) {
+                list = PortletManager.getCurrentServer(request).getPluginInstaller().listPlugins(new
URL(repo), user, pass);
+                request.getPortletSession(true).setAttribute(CONFIG_LIST_SESSION_KEY, list);
+            }
+            for (int i = 0; i < list.getPlugins().length; i++) {
+                PluginMetadata metadata = list.getPlugins()[i];
+                if(metadata.getModuleId().toString().equals(configId)) {
+                    config = metadata;
+                    break;
+                }
+            }
+        } catch (FailedLoginException e) {
+            throw new PortletException("Invalid login for Maven repository '"+repo+"'", e);
+        }
+        if(config == null) {
+            throw new PortletException("No configuration found for '"+configId+"'");
+        }
+        request.setAttribute("configId", configId);
+        request.setAttribute("plugin", config);
+        request.setAttribute("repository", repo);
+        request.setAttribute("repouser", user);
+        request.setAttribute("repopass", pass);
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel
model) throws PortletException, IOException {
+        return DOWNLOAD_MODE+BEFORE_ACTION;
+    }
+}

Propchange: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/download.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/download.jsp?rev=428813&r1=428812&r2=428813&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/download.jsp
(original)
+++ geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/download.jsp
Fri Aug  4 11:24:20 2006
@@ -1,4 +1,3 @@
-<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

Modified: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/list.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/list.jsp?rev=428813&r1=428812&r2=428813&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/list.jsp
(original)
+++ geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/list.jsp
Fri Aug  4 11:24:20 2006
@@ -1,4 +1,3 @@
-<%@ page import="org.apache.geronimo.console.util.PortletManager"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
@@ -21,19 +20,20 @@
                       (already installed)
                   </c:when>
                   <c:otherwise>
-                      <c:if test="${!entry.eligible}">
+<%--                      <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>
+                      </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>
-          <li><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="download-before"/></portlet:actionURL>">${entry.name}<c:if
test="${entry.name ne entry.moduleId}"> (${entry.version})</c:if></a></li>
+          <li><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>">${entry.name}<c:if
test="${entry.name ne entry.moduleId}"> (${entry.version})</c:if></a></li>
         </c:otherwise>
       </c:choose>
     </c:forEach>

Added: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/viewForDownload.jsp
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/viewForDownload.jsp?rev=428813&view=auto
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/viewForDownload.jsp
(added)
+++ geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/viewForDownload.jsp
Fri Aug  4 11:24:20 2006
@@ -0,0 +1,121 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<portlet:defineObjects/>
+
+<h1>${plugin.name}</h1>
+
+<p>Here is the available information on this plugin:</p>
+
+<table border="0">
+  <tr>
+    <th align="right" valign="top">Name:</th>
+    <td>${plugin.name}</td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Module ID:</th>
+    <td>${plugin.moduleId}</td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Group:</th>
+    <td>${plugin.category}</td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Description:</th>
+    <td>${plugin.HTMLDescription}</td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Author:</th>
+    <td>${plugin.author}</td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Web Site:</th>
+    <td><a href="${plugin.pluginURL}">${plugin.pluginURL}</a></td>
+  </tr>
+  <c:forEach var="license" items="${plugin.licenses}">
+      <tr>
+        <th align="right" valign="top">License:</th>
+        <td>${license.name}
+          <c:choose>
+              <c:when test="${license.osiApproved}">(Open Source)</c:when>
+              <c:otherwise>(Proprietary)</c:otherwise>
+          </c:choose>
+        </td>
+      </tr>
+  </c:forEach>
+  <tr>
+    <th align="right" valign="top">Ger&nbsp;Versions:</th>
+    <td>
+      ${fn:join(plugin.geronimoVersions, ", ")}
+    </td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">JVM Versions:</th>
+    <td>
+      <c:choose>
+          <c:when test="${empty plugin.jvmVersions}">
+            <i>Any</i>
+          </c:when>
+          <c:otherwise>
+            ${fn:join(plugin.jvmVersions, ", ")}
+          </c:otherwise>
+      </c:choose>
+    </td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Dependencies:</th>
+    <td>
+      <c:forEach var="dependency" items="${plugin.dependencies}">
+        ${fn:replace(dependency, "//", "/*/")}<br />
+      </c:forEach>
+    </td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Prerequisites:</th>
+    <td>
+      <c:choose>
+        <c:when test="${empty plugin.prerequisites}">
+          <i>None</i>
+        </c:when>
+        <c:otherwise>
+          <c:forEach var="prereq" items="${plugin.prerequisites}">
+            <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>
+    </td>
+  </tr>
+  <tr>
+    <th align="right" valign="top">Obsoletes:</th>
+    <td>
+      <c:choose>
+        <c:when test="${empty plugin.obsoletes}">
+          <i>None</i>
+        </c:when>
+        <c:otherwise>
+          <c:forEach var="module" items="${plugin.obsoletes}">
+            ${fn:replace(module, "//", "/*/")}<br />
+          </c:forEach>
+        </c:otherwise>
+      </c:choose>
+    </td>
+  </tr>
+
+</table>
+
+<c:if test="${plugin.eligible}">
+<form name="<portlet:namespace/>PluginForm" action="<portlet:actionURL/>">
+    <input type="hidden" name="configId" value="${configId}" />
+    <input type="hidden" name="mode" value="viewForDownload-after" />
+    <input type="hidden" name="repository" value="${repository}" />
+    <input type="hidden" name="repo-user" value="${repouser}" />
+    <input type="hidden" name="repo-pass" value="${repopass}" />
+    <input type="submit" value="Continue" />
+</form>
+</c:if>
+
+<p><a href="<portlet:actionURL portletMode="view"><portlet:param name="mode"
value="index-before" /></portlet:actionURL>">Cancel</a></p>

Propchange: geronimo/sandbox/svkmerge/m2migration/applications/console/console-standard/src/webapp/WEB-INF/view/car/viewForDownload.jsp
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message