[jboss-svn-commits] JBL Code SVN: r19755 - in labs/jbosslabs/labs-3.0-build: views/admin/src/main/java/org/jboss/labs/admin/action/user and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Apr 29 06:04:21 EDT 2008


Author: wrzep
Date: 2008-04-29 06:04:21 -0400 (Tue, 29 Apr 2008)
New Revision: 19755

Added:
   labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/user/UserServiceWrapper.java
Modified:
   labs/jbosslabs/labs-3.0-build/integration/seam-guice/src/main/java/org/jboss/labs/injection/seam/LabsGuiceInterceptor.java
   labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/project/ticket.xhtml
   labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/user/joinTicket.xhtml
Log:
JBLAB-904, show email address in the ticket view

Modified: labs/jbosslabs/labs-3.0-build/integration/seam-guice/src/main/java/org/jboss/labs/injection/seam/LabsGuiceInterceptor.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/seam-guice/src/main/java/org/jboss/labs/injection/seam/LabsGuiceInterceptor.java	2008-04-29 09:46:00 UTC (rev 19754)
+++ labs/jbosslabs/labs-3.0-build/integration/seam-guice/src/main/java/org/jboss/labs/injection/seam/LabsGuiceInterceptor.java	2008-04-29 10:04:21 UTC (rev 19755)
@@ -40,6 +40,7 @@
  * Triggers Guice injection on a Seam component.
  *
  * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
+ * @author Tomasz Szymanski (tszymanski [at] jboss.org)
  */
 @Interceptor
 public class LabsGuiceInterceptor extends AbstractInterceptor
@@ -54,7 +55,7 @@
     @AroundInvoke
     public Object aroundInvoke(InvocationContext invocationContext) throws Exception
     {
-        Module module = getGuiceModuleForClass(invocationContext.getMethod().getDeclaringClass());
+        final Module module = getGuiceModuleForClass(invocationContext.getMethod().getDeclaringClass());
 
         if (module == null)
         {
@@ -71,7 +72,7 @@
         return invocationContext.proceed();
     }
 
-    private static Injector getModuleInjectorFromCache(Module module)
+    private static Injector getModuleInjectorFromCache(final Module module)
     {
         Injector injector = INJECTOR_CACHE.get(module.getClass());
 
@@ -100,7 +101,7 @@
         return module;
     }
 
-    private static Module getGuiceModuleByName(String expr)
+    private static Module getGuiceModuleByName(final String expr)
     {
 
         Object result;

Copied: labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/user/UserServiceWrapper.java (from rev 19753, labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/user/MembersManager.java)
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/user/UserServiceWrapper.java	                        (rev 0)
+++ labs/jbosslabs/labs-3.0-build/views/admin/src/main/java/org/jboss/labs/admin/action/user/UserServiceWrapper.java	2008-04-29 10:04:21 UTC (rev 19755)
@@ -0,0 +1,57 @@
+/*
+* JBoss Labs. http://labs.jboss.com/jbosslabs
+*
+* Copyright © 2008  Red Hat Middleware, LLC. All rights reserved.
+*
+* This copyrighted material is made available to anyone wishing to use,
+* modify, copy, or redistribute it subject to the terms and conditions
+* of the GNU Lesser General Public License, v. 2.1.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT A WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License, v.2.1 along with this distribution; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+* 02110-1301, USA.
+*
+* Red Hat Author(s): Bob McWhirter, Przemyslaw Dej, Ryszard Kozmik,
+*     Tomasz Szymanski, Adam Warski, Pawel Wrzeszcz
+*/
+
+package org.jboss.labs.admin.action.user;
+
+import org.jboss.labs.core.model.Project;
+import org.jboss.labs.core.model.Username;
+import org.jboss.labs.core.service.ProjectService;
+import org.jboss.labs.admin.Pages;
+import org.jboss.labs.injection.seam.Guice;
+import org.jboss.labs.exception.auth.NoSuchUserException;
+import org.jboss.labs.exception.LabsRollbackException;
+import org.jboss.labs.auth.UserService;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.faces.FacesMessages;
+
+import java.io.Serializable;
+
+import com.google.inject.Inject;
+
+/**
+ * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
+ */
+ at Name("userServiceWrapper")
+ at Guice
+public class UserServiceWrapper implements Serializable {
+
+    @Inject private UserService userService;
+
+    private static final long serialVersionUID = -9131530680932349846L;
+
+    @Factory(value = "userService", scope = ScopeType.APPLICATION, autoCreate = true)
+    public UserService getUserService() {
+        return userService;
+    }
+}
\ No newline at end of file

Modified: labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/project/ticket.xhtml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/project/ticket.xhtml	2008-04-29 09:46:00 UTC (rev 19754)
+++ labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/project/ticket.xhtml	2008-04-29 10:04:21 UTC (rev 19755)
@@ -17,7 +17,8 @@
                 <tr>
                     <th>User:</th>
                     <td>
-                        <h:outputText value="#{prjRequest.username}" />
+                        #{prjRequest.username}
+                        (<a href="mailto:#{userService.getUserByLogin(prjRequest.username).email}">#{userService.getUserByLogin(prjRequest.username).email}</a>)
                     </td>
                 </tr>
                  <tr>

Modified: labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/user/joinTicket.xhtml
===================================================================
--- labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/user/joinTicket.xhtml	2008-04-29 09:46:00 UTC (rev 19754)
+++ labs/jbosslabs/labs-3.0-build/views/admin/src/main/webapp/user/joinTicket.xhtml	2008-04-29 10:04:21 UTC (rev 19755)
@@ -11,7 +11,7 @@
 <ui:define name="body">
 
     <h2>Review join project request</h2>
-    <p>User '#{jRequest.username}' wants to join project '#{jRequest.projectId}'.</p>
+    <p>User '#{jRequest.username}' (<a href="mailto:#{userService.getUserByLogin(jRequest.username).email}">#{userService.getUserByLogin(jRequest.username).email}</a>) wants to join project '#{jRequest.projectId}'.</p>
     <h:form id="mainForm">
         User comment:<p>
         <h:outputText value="#{empty jRequest.comment ? '--' : jRequest.comment}"/></p>




More information about the jboss-svn-commits mailing list