geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r480565 - in /geronimo/server/trunk/applications/console/geronimo-console-standard/src/main: java/org/apache/geronimo/console/repository/ webapp/WEB-INF/view/repository/
Date Wed, 29 Nov 2006 13:22:24 GMT
Author: vamsic007
Date: Wed Nov 29 05:22:23 2006
New Revision: 480565

URL: http://svn.apache.org/viewvc?view=rev&rev=480565
Log:
GERONIMO-2283 Common libs portlet guesses wrong group ID, gives no usage advice
  o Merging revision 480564 from branches\1.2
  o Each of the repository entries listed on the Common Libs page is now a link which shows
usage help upon clicking.

Added:
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp
  (with props)
Modified:
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/normal.jsp

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java?view=diff&rev=480565&r1=480564&r2=480565
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java
Wed Nov 29 05:22:23 2006
@@ -50,6 +50,9 @@
 import java.util.List;
 import java.util.SortedSet;
 
+/**
+ * @version $Rev$ $Date$
+ */
 public class RepositoryViewPortlet extends BasePortlet {
 
     private final static Log log = LogFactory.getLog(RepositoryViewPortlet.class);
@@ -62,6 +65,8 @@
 
     private PortletRequestDispatcher helpView;
 
+    private PortletRequestDispatcher usageView;
+
     public void init(PortletConfig portletConfig) throws PortletException {
         super.init(portletConfig);
         kernel = KernelRegistry.getSingleKernel();
@@ -70,10 +75,21 @@
                 .getRequestDispatcher("/WEB-INF/view/repository/normal.jsp");
         helpView = ctx
                 .getRequestDispatcher("/WEB-INF/view/repository/help.jsp");
+        usageView = ctx
+                .getRequestDispatcher("/WEB-INF/view/repository/usage.jsp");
     }
 
     public void processAction(ActionRequest actionRequest,
                               ActionResponse actionResponse) throws PortletException, IOException
{
+        String action = actionRequest.getParameter("action");
+        if(action != null && action.equals("usage")) {
+            // User clicked on a repository entry to view usage
+            String res = actionRequest.getParameter("res");
+            actionResponse.setRenderParameter("mode", "usage");
+            actionResponse.setRenderParameter("res", res);
+            return;
+        }
+
         try {
 
 
@@ -174,6 +190,19 @@
             throws PortletException, IOException {
         // i think generic portlet already does this
         if (WindowState.MINIMIZED.equals(request.getWindowState())) {
+            return;
+        }
+
+        String mode = request.getParameter("mode");
+        if(mode != null && mode.equals("usage")) {
+            String res = request.getParameter("res");
+            String[] parts = res.split("/");
+            request.setAttribute("res", res);
+            request.setAttribute("groupId", parts[0]);
+            request.setAttribute("artifactId", parts[1]);
+            request.setAttribute("version", parts[2]);
+            request.setAttribute("type", parts[3]);
+            usageView.include(request, response);
             return;
         }
 

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/normal.jsp?view=diff&rev=480565&r1=480564&r2=480565
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/normal.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/normal.jsp
Wed Nov 29 05:22:23 2006
@@ -14,6 +14,9 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 --%>
+
+<%-- $Rev$ $Date$ --%>
+
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <portlet:defineObjects/>
@@ -135,8 +138,9 @@
 </table>
 
 <b>Current Repository Entries</b>
+<p>Click on an entry to view usage.</p>
 <ul>
 <c:forEach items="${reslist}" var="res">
-<li><c:out value="${res}"/></li>
+<li><a href="<portlet:actionURL portletMode="view"><portlet:param name="action"
value="usage"/><portlet:param name="res" value="${res}"/></portlet:actionURL>"><c:out
value="${res}"/></a></li>
 </c:forEach>
 </ul>

Added: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp?view=auto&rev=480565
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp
(added)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp
Wed Nov 29 05:22:23 2006
@@ -0,0 +1,39 @@
+<%--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+--%>
+
+<%-- $Rev$ $Date$ --%>
+
+<b>Usage for ${res}</b>
+
+<p>To use <b>${res}</b> in an application or a module, add a dependency
element under dependencies in environment element in
+it's deployment plan as shown below:
+<pre>
+    &lt;environment&gt;
+        ...
+        &lt;dependencies&gt;
+            ...
+            &lt;dependency&gt;
+                &lt;groupId&gt;${groupId}&lt;/groupId&gt;
+                &lt;artifactId&gt;${artifactId}&lt;/artifactId&gt;
+                &lt;version&gt;${version}&lt;/version&gt;
+                &lt;type&gt;${type}&lt;/type&gt;
+            &lt;/dependency&gt;
+       &lt;/dependencies&gt;
+    &lt;/environment&gt;
+</pre>
+
+<p><a onClick="history.go(-1); return false;" href="">Back</a>

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/repository/usage.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message