continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r437865 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action: AddUserRoleAction.java EditUserAction.java
Date Mon, 28 Aug 2006 22:24:51 GMT
Author: carlos
Date: Mon Aug 28 15:24:50 2006
New Revision: 437865

URL: http://svn.apache.org/viewvc?rev=437865&view=rev
Log:
Use parent ContinuumActionSupport

Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddUserRoleAction.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/EditUserAction.java

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddUserRoleAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddUserRoleAction.java?rev=437865&r1=437864&r2=437865&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddUserRoleAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddUserRoleAction.java
Mon Aug 28 15:24:50 2006
@@ -18,14 +18,11 @@
 
 import java.util.List;
 
-import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.system.ContinuumUser;
 import org.apache.maven.continuum.model.system.Permission;
 import org.apache.maven.continuum.store.ContinuumStore;
 
-import org.codehaus.plexus.xwork.action.PlexusActionSupport;
-
 /**
  * @author Teody Cue
  * @version $Id$
@@ -35,11 +32,9 @@
  *   role-hint="addUserRole"
  */
 public class AddUserRoleAction
-    extends PlexusActionSupport
+    extends ContinuumActionSupport
 {
 
-    private Continuum continuum;
-
     private ContinuumStore store;
 
     private ContinuumUser user;
@@ -57,7 +52,7 @@
     {
         try
         {
-            user = continuum.getUser( accountId );
+            user = getContinuum().getUser( accountId );
             permissions = store.getPermissions();
             int i;
             for ( i = 0; i < permissions.size(); i++ )
@@ -71,7 +66,7 @@
             if ( i < permissions.size() )
             {
                 user.getGroup().addPermission( permission );
-                continuum.updateUser( user );
+                getContinuum().updateUser( user );
             }
             else
             {

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/EditUserAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/EditUserAction.java?rev=437865&r1=437864&r2=437865&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/EditUserAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/EditUserAction.java
Mon Aug 28 15:24:50 2006
@@ -21,7 +21,6 @@
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.system.ContinuumUser;
 import org.apache.maven.continuum.model.system.Permission;
@@ -31,8 +30,6 @@
 
 import com.opensymphony.webwork.interceptor.ServletRequestAware;
 
-import org.codehaus.plexus.xwork.action.PlexusActionSupport;
-
 /**
  * @author Henry Isidro
  * @version $Id$
@@ -42,7 +39,7 @@
  *   role-hint="editUser"
  */
 public class EditUserAction
-    extends PlexusActionSupport
+    extends ContinuumActionSupport
     implements ServletRequestAware
 {
 
@@ -51,11 +48,6 @@
      */
     private ContinuumStore store;
 
-    /**
-     * @plexus.requirement
-     */
-    private Continuum continuum;
-
     private ContinuumUser user;
 
     private UserGroup userGroup;
@@ -110,7 +102,7 @@
                 user.setPassword( password );
                 user.setEmail( email );
                 user.setGroup( userGroup );
-                continuum.addUser( user );
+                getContinuum().addUser( user );
             }
             catch ( ContinuumException e )
             {
@@ -124,7 +116,7 @@
         {
             try
             {
-                user = continuum.getUser( accountId );
+                user = getContinuum().getUser( accountId );
                 user.setUsername( username );
                 user.setPassword( password );
                 user.setEmail( email );
@@ -140,7 +132,7 @@
 
             try
             {
-                continuum.updateUser( user );
+                getContinuum().updateUser( user );
             }
             catch ( ContinuumException e )
             {
@@ -174,7 +166,7 @@
         try
         {
             addMode = false;
-            user = continuum.getUser( accountId );
+            user = getContinuum().getUser( accountId );
             username = user.getUsername();
             password = user.getPassword();
             email = user.getEmail();



Mime
View raw message