← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2452: Extended the whole of methods which are available in HibernateUserStore to UserService.

 

------------------------------------------------------------
revno: 2452
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2010-12-30 16:13:41 +0700
message:
  Extended the whole of methods which are available in HibernateUserStore to UserService.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataSetsAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/DatabaseAutomaticAccessProvider.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/UpdateUserAccountAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/OpenReportExcelUserRoleAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/ListDataEntryStatusAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/DataSetCompletedReportFormAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/GetALLJchartAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleFormAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/AddDataSetEditorAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddRoleAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/DeleteCurrentUserAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/EditUserGroupFormAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveRoleAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateRoleAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateRoleAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateUserAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java	2010-12-16 17:38:32 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java	2010-12-30 09:13:41 +0000
@@ -6,7 +6,6 @@
 
 public class UserGroup implements Serializable
 {
-
     /**
      * id is the primary key which is auto generated
      */

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2010-12-30 09:13:41 +0000
@@ -1,5 +1,9 @@
 package org.hisp.dhis.user;
 
+import java.util.Collection;
+
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+
 /*
  * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
@@ -35,12 +39,269 @@
 {
     String ID = UserService.class.getName();
 
-    boolean isSuperUser(UserCredentials userCredentials);
-    
-    boolean isLastSuperUser(UserCredentials userCredentials);
-    
-    boolean isSuperRole(UserAuthorityGroup userAuthorityGroup);
-    
-    boolean isLastSuperRole(UserAuthorityGroup userAuthorityGroup);
+    boolean isSuperUser( UserCredentials userCredentials );
+
+    boolean isLastSuperUser( UserCredentials userCredentials );
+
+    boolean isSuperRole( UserAuthorityGroup userAuthorityGroup );
+
+    boolean isLastSuperRole( UserAuthorityGroup userAuthorityGroup );
+
+    // -------------------------------------------------------------------------
+    // User
+    // -------------------------------------------------------------------------
+
+    /**
+     * Adds a User.
+     * 
+     * @param user the User to add.
+     * @return the generated identifier.
+     */
+    int addUser( User user );
+
+    /**
+     * Updates a User.
+     * 
+     * @param user the User to update.
+     */
+    void updateUser( User user );
+
+    /**
+     * Retrieves the User with the given identifier.
+     * 
+     * @param idn the identifier of the User to retrieve.
+     * @return the User.
+     */
+    User getUser( int id );
+
+    /**
+     * Returns a Collection of all Users.
+     * 
+     * @return a Collection of Users.
+     */
+    Collection<User> getAllUsers();
+
+    /**
+     * Returns a Collection of the Users associated with the given
+     * OrganisationUnit.
+     * 
+     * @param organisationUnit the OrganisationUnit.
+     * @return a Collection of Users.
+     */
+    Collection<User> getUsersByOrganisationUnit( OrganisationUnit organisationUnit );
+
+    /**
+     * Returns a Collection of the Users which are not associated with any
+     * OrganisationUnits.
+     * 
+     * @return a Collection of Users.
+     */
+    Collection<User> getUsersWithoutOrganisationUnit();
+
+    /**
+     * Returns a Collection of Users which are having given Phone number.
+     * 
+     * @param phoneNumber
+     * @return a Collection of Users.
+     */
+    Collection<User> getUsersByPhoneNumber( String phoneNumber );
+
+    /**
+     * Deletes a User.
+     * 
+     * @param user the User to delete.
+     */
+    void deleteUser( User user );
+
+    int getUserCount();
+
+    int getUserCountByName( String name );
+
+    int getUsersWithoutOrganisationUnitCount();
+
+    int getUsersWithoutOrganisationUnitCountByName( String name );
+
+    int getUsersByOrganisationUnitCount( OrganisationUnit orgUnit );
+
+    int getUsersByOrganisationUnitCountByName( OrganisationUnit orgUnit, String name );
+
+    // -------------------------------------------------------------------------
+    // UserCredentials
+    // -------------------------------------------------------------------------
+
+    /**
+     * Adds a UserCredentials.
+     * 
+     * @param userCredentials the UserCredentials to add.
+     * @return the User which the UserCredentials is associated with.
+     */
+    User addUserCredentials( UserCredentials userCredentials );
+
+    /**
+     * Updates a UserCredentials.
+     * 
+     * @param userCredentials the UserCredentials to update.
+     */
+    void updateUserCredentials( UserCredentials userCredentials );
+
+    /**
+     * Retrieves the UserCredentials of the given User.
+     * 
+     * @param user the User.
+     * @return the UserCredentials.
+     */
+    UserCredentials getUserCredentials( User user );
+
+    /**
+     * Retrieves the UserCredentials associated with the User with the given
+     * name.
+     * 
+     * @param username the name of the User.
+     * @return the UserCredentials.
+     */
+    UserCredentials getUserCredentialsByUsername( String username );
+
+    /**
+     * Retrieves all UserCredentials.
+     * 
+     * @return a Collection of UserCredentials.
+     */
+    Collection<UserCredentials> getAllUserCredentials();
+
+    /**
+     * Deletes a UserCredentials.
+     * 
+     * @param userCredentials the UserCredentials.
+     */
+    void deleteUserCredentials( UserCredentials userCredentials );
+
+    Collection<UserCredentials> searchUsersByName( String key );
+
+    Collection<UserCredentials> getUsersBetween( int first, int max );
+
+    Collection<UserCredentials> getUsersBetweenByName( String name, int first, int max );
+
+    Collection<UserCredentials> getUsersWithoutOrganisationUnitBetween( int first, int max );
+
+    Collection<UserCredentials> getUsersWithoutOrganisationUnitBetweenByName( String name, int first, int max );
+
+    Collection<UserCredentials> getUsersByOrganisationUnitBetween( OrganisationUnit orgUnit, int first, int max );
+
+    Collection<UserCredentials> getUsersByOrganisationUnitBetweenByName( OrganisationUnit orgUnit, String name,
+        int first, int max );
+
+    // -------------------------------------------------------------------------
+    // UserAuthorityGroup
+    // -------------------------------------------------------------------------
+
+    /**
+     * Adds a UserAuthorityGroup.
+     * 
+     * @param userAuthorityGroup the UserAuthorityGroup.
+     * @return the generated identifier.
+     */
+    int addUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup );
+
+    /**
+     * Updates a UserAuthorityGroup.
+     * 
+     * @param userAuthorityGroup the UserAuthorityGroup.
+     */
+    void updateUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup );
+
+    /**
+     * Retrieves the UserAuthorityGroup with the given identifier.
+     * 
+     * @param id the identifier of the UserAuthorityGroup to retrieve.
+     * @return the UserAuthorityGroup.
+     */
+    UserAuthorityGroup getUserAuthorityGroup( int id );
+
+    /**
+     * Retrieves the UserAuthorityGroup with the given name.
+     * 
+     * @param name the name of the UserAuthorityGroup to retrieve.
+     * @return the UserAuthorityGroup.
+     */
+    UserAuthorityGroup getUserAuthorityGroupByName( String name );
+
+    /**
+     * Deletes a UserAuthorityGroup.
+     * 
+     * @param userAuthorityGroup the UserAuthorityGroup to delete.
+     */
+    void deleteUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup );
+
+    /**
+     * Retrieves all UserAuthorityGroups.
+     * 
+     * @return a Collectio of UserAuthorityGroups.
+     */
+    Collection<UserAuthorityGroup> getAllUserAuthorityGroups();
+
+    /**
+     * Retrieves all UserAuthorityGroups.
+     * 
+     * @return a Collectio of UserAuthorityGroups.
+     */
+    Collection<UserAuthorityGroup> getUserRolesBetween( int first, int max );
+
+    /**
+     * Retrieves all UserAuthorityGroups.
+     * 
+     * @return a Collectio of UserAuthorityGroups.
+     */
+    Collection<UserAuthorityGroup> getUserRolesBetweenByName( String name, int first, int max );
+
+    // -------------------------------------------------------------------------
+    // UserSettings
+    // -------------------------------------------------------------------------
+
+    /**
+     * Adds a UserSetting.
+     * 
+     * @param userSetting the UserSetting to add.
+     */
+    void addUserSetting( UserSetting userSetting );
+
+    /**
+     * Updates a UserSetting.
+     * 
+     * @param userSetting the UserSetting to update.
+     */
+    void updateUserSetting( UserSetting userSetting );
+
+    /**
+     * Retrieves the UserSetting associated with the given User for the given
+     * UserSetting name.
+     * 
+     * @param user the User.
+     * @param name the name of the UserSetting.
+     * @return the UserSetting.
+     */
+    UserSetting getUserSetting( User user, String name );
+
+    /**
+     * Retrieves all UserSettings for the given User.
+     * 
+     * @param user the User.
+     * @return a Collection of UserSettings.
+     */
+    Collection<UserSetting> getAllUserSettings( User user );
+
+    /**
+     * Deletes a UserSetting.
+     * 
+     * @param userSetting the UserSetting to delete.
+     */
+    void deleteUserSetting( UserSetting userSetting );
+
+    // -------------------------------------------------------------------------
+    // UserRole
+    // -------------------------------------------------------------------------
+
+    int getUserRoleCount();
+
+    int getUserRoleCountByName( String name );
     
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java	2010-12-28 17:49:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java	2010-12-30 09:13:41 +0000
@@ -74,7 +74,8 @@
     Collection<User> getAllUsers();
 
     /**
-     * Returns a Collection of the Users associated with the given OrganisationUnit.
+     * Returns a Collection of the Users associated with the given
+     * OrganisationUnit.
      * 
      * @param organisationUnit the OrganisationUnit.
      * @return a Collection of Users.
@@ -82,7 +83,8 @@
     Collection<User> getUsersByOrganisationUnit( OrganisationUnit organisationUnit );
 
     /**
-     * Returns a Collection of the Users which are not associated with any OrganisationUnits.
+     * Returns a Collection of the Users which are not associated with any
+     * OrganisationUnits.
      * 
      * @return a Collection of Users.
      */
@@ -102,36 +104,19 @@
      * @param user the User to delete.
      */
     void deleteUser( User user );
-    
-    Collection<UserCredentials> searchUsersByName( String key );
-  
-    Collection<UserCredentials> getUsersBetween( int first, int max );
-    
-    Collection<UserCredentials> getUsersBetweenByName( String name, int first, int max );
-    
+
     int getUserCount();
-    
+
     int getUserCountByName( String name );
 
-    //=====================
-    Collection<UserCredentials> getUsersWithoutOrganisationUnitBetween( int first, int max );
-    
-    Collection<UserCredentials> getUsersWithoutOrganisationUnitBetweenByName( String name, int first, int max );
-    
     int getUsersWithoutOrganisationUnitCount();
-    
+
     int getUsersWithoutOrganisationUnitCountByName( String name );
 
-    //=====================
-    Collection<UserCredentials> getUsersByOrganisationUnitBetween( OrganisationUnit orgUnit, int first, int max );
-    
-    Collection<UserCredentials> getUsersByOrganisationUnitBetweenByName( OrganisationUnit orgUnit, String name, int first, int max );
-    
     int getUsersByOrganisationUnitCount( OrganisationUnit orgUnit );
-    
+
     int getUsersByOrganisationUnitCountByName( OrganisationUnit orgUnit, String name );
 
-    
     // -------------------------------------------------------------------------
     // UserCredentials
     // -------------------------------------------------------------------------
@@ -160,13 +145,14 @@
     UserCredentials getUserCredentials( User user );
 
     /**
-     * Retrieves the UserCredentials associated with the User with the given name.
+     * Retrieves the UserCredentials associated with the User with the given
+     * name.
      * 
      * @param username the name of the User.
      * @return the UserCredentials.
      */
     UserCredentials getUserCredentialsByUsername( String username );
-    
+
     /**
      * Retrieves all UserCredentials.
      * 
@@ -181,6 +167,21 @@
      */
     void deleteUserCredentials( UserCredentials userCredentials );
 
+    Collection<UserCredentials> searchUsersByName( String key );
+
+    Collection<UserCredentials> getUsersBetween( int first, int max );
+
+    Collection<UserCredentials> getUsersBetweenByName( String name, int first, int max );
+
+    Collection<UserCredentials> getUsersWithoutOrganisationUnitBetween( int first, int max );
+
+    Collection<UserCredentials> getUsersWithoutOrganisationUnitBetweenByName( String name, int first, int max );
+
+    Collection<UserCredentials> getUsersByOrganisationUnitBetween( OrganisationUnit orgUnit, int first, int max );
+
+    Collection<UserCredentials> getUsersByOrganisationUnitBetweenByName( OrganisationUnit orgUnit, String name,
+        int first, int max );
+
     // -------------------------------------------------------------------------
     // UserAuthorityGroup
     // -------------------------------------------------------------------------
@@ -207,7 +208,7 @@
      * @return the UserAuthorityGroup.
      */
     UserAuthorityGroup getUserAuthorityGroup( int id );
-    
+
     /**
      * Retrieves the UserAuthorityGroup with the given name.
      * 
@@ -217,19 +218,33 @@
     UserAuthorityGroup getUserAuthorityGroupByName( String name );
 
     /**
-     * Retrieves all UserAuthorityGroups.
-     * 
-     * @return a Collectio of UserAuthorityGroups.
-     */
-    Collection<UserAuthorityGroup> getAllUserAuthorityGroups();
-
-    /**
      * Deletes a UserAuthorityGroup.
      * 
      * @param userAuthorityGroup the UserAuthorityGroup to delete.
      */
     void deleteUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup );
 
+    /**
+     * Retrieves all UserAuthorityGroups.
+     * 
+     * @return a Collectio of UserAuthorityGroups.
+     */
+    Collection<UserAuthorityGroup> getAllUserAuthorityGroups();
+
+    /**
+     * Retrieves all UserAuthorityGroups.
+     * 
+     * @return a Collectio of UserAuthorityGroups.
+     */
+    Collection<UserAuthorityGroup> getUserRolesBetween( int first, int max );
+
+    /**
+     * Retrieves all UserAuthorityGroups.
+     * 
+     * @return a Collectio of UserAuthorityGroups.
+     */
+    Collection<UserAuthorityGroup> getUserRolesBetweenByName( String name, int first, int max );
+
     // -------------------------------------------------------------------------
     // UserSettings
     // -------------------------------------------------------------------------
@@ -273,12 +288,12 @@
      */
     void deleteUserSetting( UserSetting userSetting );
 
-    Collection<UserAuthorityGroup> getUserRolesBetween( int first, int max );
-    
-    Collection<UserAuthorityGroup> getUserRolesBetweenByName( String name, int first, int max );
-    
+    // -------------------------------------------------------------------------
+    // UserRole
+    // -------------------------------------------------------------------------
+
     int getUserRoleCount();
-    
+
     int getUserRoleCountByName( String name );
 
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2010-04-21 19:45:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2010-12-30 09:13:41 +0000
@@ -2,6 +2,8 @@
 
 import java.util.Collection;
 
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+
 /*
  * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
@@ -47,6 +49,10 @@
         this.userStore = userStore;
     }
 
+    // -------------------------------------------------------------------------
+    // Implementing methods
+    // -------------------------------------------------------------------------
+
     public boolean isSuperUser( UserCredentials userCredentials )
     {
         if ( userCredentials == null )
@@ -68,7 +74,7 @@
     public boolean isLastSuperUser( UserCredentials userCredentials )
     {
         Collection<UserCredentials> users = userStore.getAllUserCredentials();
-        
+
         for ( UserCredentials user : users )
         {
             if ( isSuperUser( user ) && user.getId() != userCredentials.getId() )
@@ -104,4 +110,236 @@
 
         return true;
     }
+
+    // -------------------------------------------------------------------------
+    // User
+    // -------------------------------------------------------------------------
+
+    public int addUser( User user )
+    {
+        return userStore.addUser( user );
+    }
+
+    public void deleteUser( User user )
+    {
+        userStore.deleteUser( user );
+    }
+
+    public void updateUser( User user )
+    {
+        userStore.updateUser( user );
+    }
+
+    public Collection<User> getAllUsers()
+    {
+        return userStore.getAllUsers();
+    }
+
+    public User getUser( int userId )
+    {
+        return userStore.getUser( userId );
+    }
+
+    public int getUserCount()
+    {
+        return userStore.getUserCount();
+    }
+
+    public int getUserCountByName( String userName )
+    {
+        return userStore.getUserCountByName( userName );
+    }
+
+    public Collection<User> getUsersByOrganisationUnit( OrganisationUnit unit )
+    {
+        return userStore.getUsersByOrganisationUnit( unit );
+    }
+
+    public Collection<UserCredentials> getUsersByOrganisationUnitBetween( OrganisationUnit unit, int first, int max )
+    {
+        return userStore.getUsersByOrganisationUnitBetween( unit, first, max );
+    }
+
+    public Collection<UserCredentials> getUsersByOrganisationUnitBetweenByName( OrganisationUnit unit, String userName,
+        int first, int max )
+    {
+        return userStore.getUsersByOrganisationUnitBetweenByName( unit, userName, first, max );
+    }
+
+    public int getUsersByOrganisationUnitCount( OrganisationUnit unit )
+    {
+        return userStore.getUsersByOrganisationUnitCount( unit );
+    }
+
+    public int getUsersByOrganisationUnitCountByName( OrganisationUnit unit, String userName )
+    {
+        return userStore.getUsersByOrganisationUnitCountByName( unit, userName );
+    }
+
+    public Collection<User> getUsersByPhoneNumber( String phoneNumber )
+    {
+        return userStore.getUsersByPhoneNumber( phoneNumber );
+    }
+
+    public Collection<User> getUsersWithoutOrganisationUnit()
+    {
+        return userStore.getUsersWithoutOrganisationUnit();
+    }
+
+    public int getUsersWithoutOrganisationUnitCount()
+    {
+        return userStore.getUsersWithoutOrganisationUnitCount();
+    }
+
+    public int getUsersWithoutOrganisationUnitCountByName( String userName )
+    {
+        return userStore.getUsersWithoutOrganisationUnitCountByName( userName );
+    }
+
+    // -------------------------------------------------------------------------
+    // UserAuthorityGroup
+    // -------------------------------------------------------------------------
+
+    public int addUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup )
+    {
+        return userStore.addUserAuthorityGroup( userAuthorityGroup );
+    }
+
+    public void updateUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup )
+    {
+        userStore.updateUserAuthorityGroup( userAuthorityGroup );
+    }
+
+    public void deleteUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup )
+    {
+        userStore.deleteUserAuthorityGroup( userAuthorityGroup );
+    }
+
+    public Collection<UserAuthorityGroup> getAllUserAuthorityGroups()
+    {
+        return userStore.getAllUserAuthorityGroups();
+    }
+
+    public UserAuthorityGroup getUserAuthorityGroup( int userAuthorityGroupId )
+    {
+        return userStore.getUserAuthorityGroup( userAuthorityGroupId );
+    }
+
+    public UserAuthorityGroup getUserAuthorityGroupByName( String userAuthorityGroupName )
+    {
+        return userStore.getUserAuthorityGroupByName( userAuthorityGroupName );
+    }
+
+    public Collection<UserAuthorityGroup> getUserRolesBetween( int first, int max )
+    {
+        return userStore.getUserRolesBetween( first, max );
+    }
+
+    public Collection<UserAuthorityGroup> getUserRolesBetweenByName( String name, int first, int max )
+    {
+        return userStore.getUserRolesBetweenByName( name, first, max );
+    }
+
+    // -------------------------------------------------------------------------
+    // UserCredentials
+    // -------------------------------------------------------------------------
+
+    public User addUserCredentials( UserCredentials userCredentials )
+    {
+        return userStore.addUserCredentials( userCredentials );
+    }
+
+    public void updateUserCredentials( UserCredentials userCredentials )
+    {
+        userStore.updateUserCredentials( userCredentials );
+    }
+
+    public void deleteUserCredentials( UserCredentials userCredentials )
+    {
+        userStore.deleteUserCredentials( userCredentials );
+    }
+
+    public Collection<UserCredentials> getAllUserCredentials()
+    {
+        return userStore.getAllUserCredentials();
+    }
+
+    public UserCredentials getUserCredentials( User user )
+    {
+        return userStore.getUserCredentials( user );
+    }
+
+    public UserCredentials getUserCredentialsByUsername( String userName )
+    {
+        return userStore.getUserCredentialsByUsername( userName );
+    }
+
+    public Collection<UserCredentials> getUsersBetween( int first, int max )
+    {
+        return userStore.getUsersBetween( first, max );
+    }
+
+    public Collection<UserCredentials> getUsersBetweenByName( String userName, int first, int max )
+    {
+        return userStore.getUsersBetweenByName( userName, first, max );
+    }
+
+    public Collection<UserCredentials> getUsersWithoutOrganisationUnitBetween( int first, int max )
+    {
+        return userStore.getUsersWithoutOrganisationUnitBetween( first, max );
+    }
+
+    public Collection<UserCredentials> getUsersWithoutOrganisationUnitBetweenByName( String userName, int first, int max )
+    {
+        return userStore.getUsersWithoutOrganisationUnitBetweenByName( userName, first, max );
+    }
+
+    public Collection<UserCredentials> searchUsersByName( String userName )
+    {
+        return userStore.searchUsersByName( userName );
+    }
+
+    // -------------------------------------------------------------------------
+    // UserSettings
+    // -------------------------------------------------------------------------
+
+    public void addUserSetting( UserSetting userSetting )
+    {
+        userStore.addUserSetting( userSetting );
+    }
+
+    public void updateUserSetting( UserSetting userSetting )
+    {
+        userStore.updateUserSetting( userSetting );
+    }
+
+    public void deleteUserSetting( UserSetting userSetting )
+    {
+        userStore.deleteUserSetting( userSetting );
+    }
+
+    public Collection<UserSetting> getAllUserSettings( User user )
+    {
+        return userStore.getAllUserSettings( user );
+    }
+
+    public UserSetting getUserSetting( User user, String name )
+    {
+        return userStore.getUserSetting( user, name );
+    }
+
+    // -------------------------------------------------------------------------
+    // UserRole
+    // -------------------------------------------------------------------------
+
+    public int getUserRoleCount()
+    {
+        return userStore.getUserRoleCount();
+    }
+
+    public int getUserRoleCountByName( String name )
+    {
+        return userStore.getUserRoleCountByName( name );
+    }
+
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java	2010-12-28 17:49:37 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java	2010-12-30 09:13:41 +0000
@@ -454,7 +454,10 @@
         return findByName( toUserCredentials( getUsersByOrganisationUnit( orgUnit ) ), name ).size();
     }
 
-    // ===================
+    // -------------------------------------------------------------------------
+    // 
+    // -------------------------------------------------------------------------
+    
     public Collection<UserCredentials> getUsersWithoutOrganisationUnitBetween( int first, int max )
     {
         return getBlockUser( toUserCredentials( getUsersWithoutOrganisationUnit()), first, max );
@@ -476,10 +479,12 @@
         return findByName( toUserCredentials( getUsersWithoutOrganisationUnit() ), name ).size();
     }
 
-    // ==============================
+    // -------------------------------------------------------------------------
+    // Supportive methods
+    // -------------------------------------------------------------------------
+    
     private Collection<UserCredentials> findByName( Collection<UserCredentials> users, String key )
     {
-
         List<UserCredentials> returnList = new ArrayList<UserCredentials>();
 
         for ( UserCredentials user : users )
@@ -496,8 +501,8 @@
     private List<UserCredentials> getBlockUser( Collection<UserCredentials> usersList, int startPos, int pageSize )
     {
         List<UserCredentials> returnList;
-
         List<UserCredentials> elementList = new ArrayList<UserCredentials>( usersList );
+        
         try
         {
             returnList = elementList.subList( startPos, startPos + pageSize );
@@ -506,6 +511,7 @@
         {
             returnList = elementList.subList( startPos, elementList.size() );
         }
+        
         return returnList;
     }
     

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataSetsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataSetsAction.java	2010-09-30 09:37:41 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataSetsAction.java	2010-12-30 09:13:41 +0000
@@ -39,7 +39,7 @@
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -75,11 +75,11 @@
         this.currentUserService = currentUserService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------------------------------------
@@ -137,7 +137,7 @@
         {
             Set<DataSet> ds = new HashSet<DataSet>();
 
-            for ( UserAuthorityGroup u : userStore.getUserCredentials( currentUserService.getCurrentUser() )
+            for ( UserAuthorityGroup u : userService.getUserCredentials( currentUserService.getCurrentUser() )
                 .getUserAuthorityGroups() )
             {
                 ds.addAll( u.getDataSets() );

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java	2010-05-27 08:42:06 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/AbstractAutomaticAccessProvider.java	2010-12-30 09:13:41 +0000
@@ -32,7 +32,7 @@
 import java.util.Set;
 
 import org.hisp.dhis.security.authority.SystemAuthoritiesProvider;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.authority.GrantedAuthorityImpl;
 
@@ -50,11 +50,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    protected UserStore userStore;
+    protected UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     protected SystemAuthoritiesProvider systemAuthoritiesProvider;
@@ -84,7 +84,7 @@
 
     private boolean isEnabled()
     {
-        return ( userStore.getAllUsers().size() == 0);
+        return ( userService.getAllUsers().size() == 0);
     }
 
     protected Collection<String> getAuthorities()

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/DatabaseAutomaticAccessProvider.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/DatabaseAutomaticAccessProvider.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/DatabaseAutomaticAccessProvider.java	2010-12-30 09:13:41 +0000
@@ -71,14 +71,14 @@
         user.setFirstName( username );
         user.setSurname( username );
 
-        userStore.addUser( user );
+        userService.addUser( user );
 
         UserAuthorityGroup userAuthorityGroup = new UserAuthorityGroup();
         userAuthorityGroup.setName( "Superuser" );
 
         userAuthorityGroup.setAuthorities( new HashSet<String>( getAuthorities() ) );
 
-        userStore.addUserAuthorityGroup( userAuthorityGroup );
+        userService.addUserAuthorityGroup( userAuthorityGroup );
 
         UserCredentials userCredentials = new UserCredentials();
         userCredentials.setUsername( username );
@@ -86,7 +86,7 @@
         userCredentials.setUser( user );
         userCredentials.getUserAuthorityGroups().add( userAuthorityGroup );
 
-        userStore.addUserCredentials( userCredentials );
+        userService.addUserCredentials( userCredentials );
     }
 
     public void access()

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java	2010-05-05 09:17:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java	2010-12-30 09:13:41 +0000
@@ -30,7 +30,7 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -49,7 +49,7 @@
 
     private CurrentUserService currentUserService;
 
-    private UserStore userStore;
+    private UserService userService;
 
     // -------------------------------------------------------------------------
     // Output
@@ -68,9 +68,9 @@
         this.currentUserService = currentUserService;
     }
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     public UserCredentials getUserCredentials()
@@ -97,7 +97,7 @@
     {
         User user = currentUserService.getCurrentUser();
 
-        userCredentials = userStore.getUserCredentials( user );
+        userCredentials = userService.getUserCredentials( user );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/UpdateUserAccountAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/UpdateUserAccountAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/UpdateUserAccountAction.java	2010-12-30 09:13:41 +0000
@@ -31,7 +31,7 @@
 import org.hisp.dhis.security.PasswordManager;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -47,7 +47,7 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
     private PasswordManager passwordManager;
 
@@ -81,9 +81,9 @@
         this.passwordManager = passwordManager;
     }
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     public void setOldPassword( String oldPassword )
@@ -153,9 +153,9 @@
             rawPassword = null;
         }
 
-        User user = userStore.getUser( id );
+        User user = userService.getUser( id );
 
-        UserCredentials userCredentials = userStore.getUserCredentials( user );
+        UserCredentials userCredentials = userService.getUserCredentials( user );
 
         String encodeOldPassword = passwordManager.encodePassword( userCredentials.getUsername(), oldPassword );
         String currentPassword = userCredentials.getPassword();
@@ -182,11 +182,11 @@
         {
             userCredentials.setPassword( passwordManager.encodePassword( userCredentials.getUsername(), rawPassword ) );
 
-            userStore.updateUserCredentials( userCredentials );
+            userService.updateUserCredentials( userCredentials );
 
         }
 
-        userStore.updateUser( user );
+        userService.updateUser( user );
 
         message = i18n.getString( "update_user_success" );
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2010-12-03 05:41:34 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2010-12-30 09:13:41 +0000
@@ -386,13 +386,13 @@
     <!-- Security : AccessProvider -->
     
 	<bean id="databaseAutomaticAccessProvider" class="org.hisp.dhis.security.DatabaseAutomaticAccessProvider">
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="systemAuthoritiesProvider" ref="simpleSystemAuthoritiesProvider" />
 		<property name="passwordManager" ref="org.hisp.dhis.security.PasswordManager" />
 	</bean>
 
 	<bean id="ghostAutomaticAccessProvider" class="org.hisp.dhis.security.GhostAutomaticAccessProvider">
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="systemAuthoritiesProvider" ref="simpleSystemAuthoritiesProvider" />
 	</bean>
 
@@ -653,7 +653,7 @@
 		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 		<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 	</bean>
 	
 	<bean id="org.hisp.dhis.commons.action.GetExpressionTextAction"
@@ -791,15 +791,15 @@
 		<property name="currentUserService">
 			<ref bean="org.hisp.dhis.user.CurrentUserService" />
 		</property>
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 	</bean>
 
 	<bean id="org.hisp.dhis.useraccount.action.UpdateUserAccountAction"
 		class="org.hisp.dhis.useraccount.action.UpdateUserAccountAction" scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="passwordManager">
 			<ref bean="org.hisp.dhis.security.PasswordManager" />

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java	2010-11-21 15:52:10 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/state/DefaultSelectedStateManager.java	2010-12-30 09:13:41 +0000
@@ -49,7 +49,7 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.ActionContext;
 
@@ -89,11 +89,11 @@
         this.selectionManager = selectionManager;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private CurrentUserService currentUserService;
@@ -154,7 +154,7 @@
 
         if ( !currentUserService.currentUserIsSuper() )
         {
-            UserCredentials userCredentials = userStore.getUserCredentials( currentUserService.getCurrentUser() );
+            UserCredentials userCredentials = userService.getUserCredentials( currentUserService.getCurrentUser() );
 
             Set<DataSet> dataSetUserAuthorityGroups = new HashSet<DataSet>();
 

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml	2010-11-24 20:34:35 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml	2010-12-30 09:13:41 +0000
@@ -19,7 +19,7 @@
 	<bean id="org.hisp.dhis.de.state.SelectedStateManager" class="org.hisp.dhis.de.state.DefaultSelectedStateManager">
 		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
 		<property name="selectionManager" ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 	</bean>

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/OpenReportExcelUserRoleAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/OpenReportExcelUserRoleAction.java	2010-04-26 08:34:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/OpenReportExcelUserRoleAction.java	2010-12-30 09:13:41 +0000
@@ -32,7 +32,7 @@
 import org.hisp.dhis.reportexcel.ReportExcel;
 import org.hisp.dhis.reportexcel.ReportExcelService;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -43,7 +43,6 @@
 public class OpenReportExcelUserRoleAction
     implements Action
 {
-
     // -------------------------------------------
     // Dependency
     // -------------------------------------------
@@ -55,11 +54,11 @@
         this.reportService = reportService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------
@@ -101,7 +100,7 @@
     {
         reportExcel = reportService.getReportExcel( id );
 
-        userRoles = new ArrayList<UserAuthorityGroup>( userStore.getAllUserAuthorityGroups() );
+        userRoles = new ArrayList<UserAuthorityGroup>( userService.getAllUserAuthorityGroups() );
 
         userRoles.removeAll( reportExcel.getUserRoles() );
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java	2010-12-17 04:01:43 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java	2010-12-30 09:13:41 +0000
@@ -34,7 +34,7 @@
 import org.hisp.dhis.reportexcel.ReportExcel;
 import org.hisp.dhis.reportexcel.ReportExcelService;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -46,7 +46,6 @@
 public class UpdateReportExcelUserRoleAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependency
     // -------------------------------------------------------------------------
@@ -58,11 +57,11 @@
         this.reportService = reportService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------------------------------------
@@ -93,7 +92,7 @@
 
         for ( Integer i : this.userRoles )
         {
-            userAutorities.add( userStore.getUserAuthorityGroup( i ) );
+            userAutorities.add( userService.getUserAuthorityGroup( i ) );
         }
 
         report.setUserRoles( userAutorities );

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/DefaultDataEntryStatusAction.java	2010-12-30 09:13:41 +0000
@@ -52,7 +52,7 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -71,7 +71,7 @@
 
     private CurrentUserService currentUserService;
 
-    private UserStore userStore;
+    private UserService userService;
 
     private OrganisationUnitSelectionManager selectionManager;
 
@@ -140,9 +140,9 @@
         this.selectionManager = selectionManager;
     }
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     public List<DataEntryStatus> getDataStatus()
@@ -177,7 +177,7 @@
 
             if ( !currentUserService.currentUserIsSuper() )
             {
-                UserCredentials userCredentials = userStore.getUserCredentials( currentUserService.getCurrentUser() );
+                UserCredentials userCredentials = userService.getUserCredentials( currentUserService.getCurrentUser() );
 
                 Set<DataSet> dataSetUserAuthorityGroups = new HashSet<DataSet>();
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/GetDataSetAction.java	2010-12-30 09:13:41 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 /**
@@ -56,7 +56,7 @@
 
     private OrganisationUnitSelectionManager selectionManager;
 
-    private UserStore userStore;
+    private UserService userService;
 
     private CurrentUserService currentUserService;
 
@@ -75,9 +75,9 @@
         return dataSets;
     }
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     public void setCurrentUserService( CurrentUserService currentUserService )
@@ -107,7 +107,7 @@
 
             if ( !currentUserService.currentUserIsSuper() )
             {
-                UserCredentials userCredentials = userStore.getUserCredentials( currentUserService.getCurrentUser() );
+                UserCredentials userCredentials = userService.getUserCredentials( currentUserService.getCurrentUser() );
 
                 Set<DataSet> dataSetUserAuthorityGroups = new HashSet<DataSet>();
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/ListDataEntryStatusAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/ListDataEntryStatusAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/dataentrystatus/action/ListDataEntryStatusAction.java	2010-12-30 09:13:41 +0000
@@ -39,7 +39,7 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -58,7 +58,7 @@
 
     private CurrentUserService currentUserService;
 
-    private UserStore userStore;
+    private UserService userService;
 
     private DataSetService dataSetService;
 
@@ -77,9 +77,9 @@
         this.dataSetService = dataSetService;
     }
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     public List<DataEntryStatus> getDataStatus()
@@ -104,7 +104,7 @@
 
         if ( !currentUserService.currentUserIsSuper() )
         {
-            UserCredentials userCredentials = userStore.getUserCredentials( currentUserService.getCurrentUser() );
+            UserCredentials userCredentials = userService.getUserCredentials( currentUserService.getCurrentUser() );
 
             Set<DataSet> dataSetUserAuthorityGroups = new HashSet<DataSet>();
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/DataSetCompletedReportFormAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/DataSetCompletedReportFormAction.java	2010-10-07 07:10:30 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/datasetcompleted/action/DataSetCompletedReportFormAction.java	2010-12-30 09:13:41 +0000
@@ -41,7 +41,7 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -71,11 +71,11 @@
         this.dataSetService = dataSetService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private CurrentUserService currentUserService;
@@ -124,7 +124,7 @@
         }
         else
         {
-            UserCredentials userCredentials = userStore.getUserCredentials( currentUserService.getCurrentUser() );
+            UserCredentials userCredentials = userService.getUserCredentials( currentUserService.getCurrentUser() );
 
             for ( UserAuthorityGroup userAuthorityGroup : userCredentials.getUserAuthorityGroups() )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/GetALLJchartAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/GetALLJchartAction.java	2010-10-07 07:10:30 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/GetALLJchartAction.java	2010-12-30 09:13:41 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.jchart.JChartSevice;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -60,11 +60,11 @@
         this.jchartService = jchartService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private CurrentUserService currentUserService;
@@ -100,7 +100,7 @@
         }
         else
         {
-            Set<UserAuthorityGroup> userRoles = userStore.getUserCredentials( currentUserService.getCurrentUser() )
+            Set<UserAuthorityGroup> userRoles = userService.getUserCredentials( currentUserService.getCurrentUser() )
                 .getUserAuthorityGroups();
 
             for ( JChart jchart : jcharts_ )

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleAction.java	2010-10-04 03:09:23 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleAction.java	2010-12-30 09:13:41 +0000
@@ -32,7 +32,7 @@
 
 import org.hisp.dhis.jchart.JChart;
 import org.hisp.dhis.jchart.JChartSevice;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -54,11 +54,11 @@
         this.jchartService = jchartService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------
@@ -90,7 +90,7 @@
 
         for ( Integer i : userRoles )
         {
-            jchart.addUserAuthorityGroup( userStore.getUserAuthorityGroup( i ) );
+            jchart.addUserAuthorityGroup( userService.getUserAuthorityGroup( i ) );
         }
         
         jchartService.updateJChart( jchart );

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleFormAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleFormAction.java	2010-10-04 03:09:23 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/jchart/action/UpdateJChartUserRoleFormAction.java	2010-12-30 09:13:41 +0000
@@ -32,7 +32,7 @@
 import org.hisp.dhis.jchart.JChart;
 import org.hisp.dhis.jchart.JChartSevice;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -54,11 +54,11 @@
         this.jchartService = jchartService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------
@@ -94,8 +94,7 @@
     public String execute()
         throws Exception
     {
-
-        userRoles = userStore.getAllUserAuthorityGroups();
+        userRoles = userService.getAllUserAuthorityGroups();
 
         jchart = jchartService.getJChart( id );
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml	2010-11-10 13:49:29 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/resources/META-INF/dhis/beans.xml	2010-12-30 09:13:41 +0000
@@ -177,7 +177,7 @@
 		class="org.hisp.dhis.reportexcel.action.OpenReportExcelUserRoleAction"
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 	</bean>
 
 	<bean
@@ -185,7 +185,7 @@
 		class="org.hisp.dhis.reportexcel.action.UpdateReportExcelUserRoleAction"
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 	</bean>
 
 	<!-- REPORT EXCEL CATEGORY BEAN -->
@@ -519,7 +519,7 @@
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
 		<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
 	</bean>
 
@@ -559,7 +559,7 @@
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reportexcel.ReportExcelService" />
 		<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="selectionManager"
 			ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
 		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
@@ -573,7 +573,7 @@
 		class="org.hisp.dhis.reportexcel.dataentrystatus.action.GetDataSetAction"
 		scope="prototype">
 		<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="selectionManager"
 			ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
 		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
@@ -1345,7 +1345,7 @@
 		class="org.hisp.dhis.reportexcel.datasetcompleted.action.DataSetCompletedReportFormAction"
 		scope="prototype">
 		<property name="bookmarkService" ref="org.hisp.dhis.reportexcel.BookmarkService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
 		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
 	</bean>
@@ -1379,7 +1379,7 @@
 		scope="prototype">
 		<property name="jchartService" ref="org.hisp.dhis.jchart.JChartService" />
 		<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 	</bean>
 
 	<bean id="org.hisp.dhis.reportexcel.jchart.action.AddJChartAction"
@@ -1414,7 +1414,7 @@
 		class="org.hisp.dhis.reportexcel.jchart.action.UpdateJChartUserRoleAction"
 		scope="prototype">
 		<property name="jchartService" ref="org.hisp.dhis.jchart.JChartService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 	</bean>
 
 	<bean
@@ -1422,7 +1422,7 @@
 		class="org.hisp.dhis.reportexcel.jchart.action.UpdateJChartUserRoleFormAction"
 		scope="prototype">
 		<property name="jchartService" ref="org.hisp.dhis.jchart.JChartService" />
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 	</bean>
 
 	<bean id="org.hisp.dhis.reportexcel.jchart.action.draw.DrawJChartAction"

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java	2010-12-22 04:05:46 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/AddDataSetAction.java	2010-12-30 09:13:41 +0000
@@ -40,7 +40,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -83,11 +83,11 @@
         this.currentUserService = currentUserService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------------------------------------
@@ -184,13 +184,13 @@
 
         if ( !currentUserService.currentUserIsSuper() && currentUser != null )
         {
-            UserCredentials userCredentials = userStore.getUserCredentials( currentUser );
+            UserCredentials userCredentials = userService.getUserCredentials( currentUser );
 
             for ( UserAuthorityGroup userAuthorityGroup : userCredentials.getUserAuthorityGroups() )
             {
                 userAuthorityGroup.getDataSets().add( dataSet );
 
-                userStore.updateUserAuthorityGroup( userAuthorityGroup );
+                userService.updateUserAuthorityGroup( userAuthorityGroup );
             }
         }
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/AddDataSetEditorAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/AddDataSetEditorAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/editor/AddDataSetEditorAction.java	2010-12-30 09:13:41 +0000
@@ -35,7 +35,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -72,11 +72,11 @@
         this.currentUserService = currentUserService;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------------------------------------
@@ -162,13 +162,13 @@
 
         if ( !currentUserService.currentUserIsSuper() && currentUser != null )
         {
-            UserCredentials userCredentials = userStore.getUserCredentials( currentUser );
+            UserCredentials userCredentials = userService.getUserCredentials( currentUser );
 
             for ( UserAuthorityGroup userAuthorityGroup : userCredentials.getUserAuthorityGroups() )
             {
                 userAuthorityGroup.getDataSets().add( dataSet );
 
-                userStore.updateUserAuthorityGroup( userAuthorityGroup );
+                userService.updateUserAuthorityGroup( userAuthorityGroup );
             }
         }
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml	2010-12-22 04:05:46 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/META-INF/dhis/beans.xml	2010-12-30 09:13:41 +0000
@@ -283,8 +283,8 @@
 		<property name="periodService">
 			<ref bean="org.hisp.dhis.period.PeriodService"/>
 		</property>
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore"/>
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService"/>
 		</property>
 		<property name="currentUserService">
 			<ref bean="org.hisp.dhis.user.CurrentUserService"/>
@@ -480,8 +480,8 @@
 		<property name="periodService">
 			<ref bean="org.hisp.dhis.period.PeriodService"/>
 		</property>
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore"/>
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService"/>
 		</property>
 		<property name="currentUserService">
 			<ref bean="org.hisp.dhis.user.CurrentUserService"/>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddRoleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddRoleAction.java	2010-04-21 19:45:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddRoleAction.java	2010-12-30 09:13:41 +0000
@@ -33,7 +33,7 @@
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -48,11 +48,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private DataSetService dataSetService;
@@ -115,7 +115,7 @@
 
         group.getAuthorities().addAll( selectedListAuthority );
 
-        userStore.addUserAuthorityGroup( group );
+        userService.addUserAuthorityGroup( group );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java	2010-05-17 16:13:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java	2010-12-30 09:13:41 +0000
@@ -37,7 +37,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -66,11 +66,11 @@
         this.selectionManager = selectionManager;
     }
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private PasswordManager passwordManager;
@@ -183,12 +183,12 @@
 
         for ( String id : selectedList )
         {
-            UserAuthorityGroup group = userStore.getUserAuthorityGroup( Integer.parseInt( id ) );
+            UserAuthorityGroup group = userService.getUserAuthorityGroup( Integer.parseInt( id ) );
             userCredentials.getUserAuthorityGroups().add( group );
         }
         
-        userStore.addUser( user );
-        userStore.addUserCredentials( userCredentials );
+        userService.addUser( user );
+        userService.addUserCredentials( userCredentials );
 
         if ( orgUnits.size() > 0 )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupAction.java	2010-12-26 15:38:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupAction.java	2010-12-30 09:13:41 +0000
@@ -34,7 +34,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -45,11 +45,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
     
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private UserGroupService userGroupService;
@@ -87,7 +87,7 @@
         
         for( Integer groupMember : groupMembers )
         {
-            User user = userStore.getUser( groupMember );
+            User user = userService.getUser( groupMember );
             userList.add( user ); 
         }
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupFormAction.java	2010-12-26 15:38:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupFormAction.java	2010-12-30 09:13:41 +0000
@@ -31,7 +31,7 @@
 import java.util.List;
 
 import org.hisp.dhis.user.User;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -42,11 +42,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
     
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
     
     // -------------------------------------------------------------------------
@@ -66,7 +66,7 @@
 
     public String execute() throws Exception
     {
-        availableUsers = new ArrayList<User>( userStore.getAllUsers() );
+        availableUsers = new ArrayList<User>( userService.getAllUsers() );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/DeleteCurrentUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/DeleteCurrentUserAction.java	2010-12-29 20:53:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/DeleteCurrentUserAction.java	2010-12-30 09:13:41 +0000
@@ -36,18 +36,10 @@
 import org.hisp.dhis.user.UserCredentials;
 import org.hisp.dhis.user.UserService;
 import org.hisp.dhis.user.UserSetting;
-import org.hisp.dhis.user.UserStore;
 
 public class DeleteCurrentUserAction 
     implements Action
 {
-    private UserStore userStore;
-
-    public void setUserStore( UserStore userStore )
-    {
-        this.userStore = userStore;
-    }
-
     private CurrentUserService currentUserService;
 
     public void setCurrentUserService( CurrentUserService currentUserService )
@@ -111,9 +103,9 @@
     public String execute() throws Exception
     {
         message = " ";
-        User user = userStore.getUser( currentUserService.getCurrentUser().getId() );
+        User user = userService.getUser( currentUserService.getCurrentUser().getId() );
 
-        UserCredentials userCredentials = userStore.getUserCredentials( user );
+        UserCredentials userCredentials = userService.getUserCredentials( user );
 
         username = userCredentials.getUsername();
         String oldPasswordFromDB = userCredentials.getPassword();
@@ -139,11 +131,11 @@
         }
         else
         {
-            Collection<UserSetting> userSettings = userStore.getAllUserSettings( user );
+            Collection<UserSetting> userSettings = userService.getAllUserSettings( user );
 
             for ( UserSetting userSetting : userSettings )
             {
-                userStore.deleteUserSetting( userSetting );
+                userService.deleteUserSetting( userSetting );
             }
 
             if ( userService.isLastSuperUser( userCredentials ) )
@@ -153,8 +145,8 @@
             }
             else
             {
-                userStore.deleteUserCredentials( userStore.getUserCredentials( user ) );
-                userStore.deleteUser( user );
+                userService.deleteUserCredentials( userService.getUserCredentials( user ) );
+                userService.deleteUser( user );
             }
             
             return "logout";

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/EditUserGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/EditUserGroupFormAction.java	2010-12-29 20:53:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/EditUserGroupFormAction.java	2010-12-30 09:13:41 +0000
@@ -33,7 +33,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -44,11 +44,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private UserGroupService userGroupService;
@@ -102,7 +102,7 @@
     public String execute()
         throws Exception
     {
-        availableUsers = new ArrayList<User>( userStore.getAllUsers() );
+        availableUsers = new ArrayList<User>( userService.getAllUsers() );
 
         group = userGroupService.getUserGroup( userGroupId );
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java	2010-12-29 20:53:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetOrgunitUserListAction.java	2010-12-30 09:13:41 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.paging.ActionPagingSupport;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 import org.hisp.dhis.user.comparator.UsernameComparator;
 
 /**
@@ -52,11 +52,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private OrganisationUnitSelectionManager selectionManager;
@@ -102,15 +102,15 @@
         {
             if ( organisationUnit == null )
             {
-                this.paging = createPaging( userStore.getUsersWithoutOrganisationUnitCountByName( key ) );
+                this.paging = createPaging( userService.getUsersWithoutOrganisationUnitCountByName( key ) );
                 
-                userCredentialsList = new ArrayList<UserCredentials>( userStore.getUsersWithoutOrganisationUnitBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+                userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersWithoutOrganisationUnitBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
             }
             else 
             {
-                this.paging = createPaging( userStore.getUsersByOrganisationUnitCountByName( organisationUnit, key ) );
+                this.paging = createPaging( userService.getUsersByOrganisationUnitCountByName( organisationUnit, key ) );
                 
-                userCredentialsList = new ArrayList<UserCredentials>( userStore.getUsersByOrganisationUnitBetweenByName( organisationUnit, key, paging.getStartPos(), paging.getPageSize() ) );
+                userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersByOrganisationUnitBetweenByName( organisationUnit, key, paging.getStartPos(), paging.getPageSize() ) );
                 
             }
         }
@@ -118,15 +118,15 @@
         {
             if ( organisationUnit == null )
             {
-                this.paging = createPaging( userStore.getUsersWithoutOrganisationUnitCount(  ) );
+                this.paging = createPaging( userService.getUsersWithoutOrganisationUnitCount(  ) );
                 
-                userCredentialsList = new ArrayList<UserCredentials>( userStore.getUsersWithoutOrganisationUnitBetween( paging.getStartPos(), paging.getPageSize() ) );
+                userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersWithoutOrganisationUnitBetween( paging.getStartPos(), paging.getPageSize() ) );
             }
             else 
             {
-                this.paging = createPaging( userStore.getUsersByOrganisationUnitCount( organisationUnit ) );
+                this.paging = createPaging( userService.getUsersByOrganisationUnitCount( organisationUnit ) );
                 
-                userCredentialsList = new ArrayList<UserCredentials>( userStore.getUsersByOrganisationUnitBetween( organisationUnit, paging.getStartPos(), paging.getPageSize() ) );
+                userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersByOrganisationUnitBetween( organisationUnit, paging.getStartPos(), paging.getPageSize() ) );
                 
             }
         }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleAction.java	2010-04-21 19:45:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleAction.java	2010-12-30 09:13:41 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.reportexcel.excelitem.ExcelItemGroup;
 import org.hisp.dhis.security.authority.SystemAuthoritiesProvider;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -53,11 +53,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private DataSetService dataSetService;
@@ -152,7 +152,7 @@
     public String execute()
         throws Exception
     {
-        userAuthorityGroup = userStore.getUserAuthorityGroup( id );
+        userAuthorityGroup = userService.getUserAuthorityGroup( id );
 
         // ---------------------------------------------------------------------
         // DataSets

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java	2010-12-11 20:38:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetRoleListAction.java	2010-12-30 09:13:41 +0000
@@ -34,7 +34,7 @@
 
 import org.hisp.dhis.paging.ActionPagingSupport;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 /**
  * @author Thanh Nguyen
@@ -47,11 +47,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------------------------------------
@@ -87,15 +87,15 @@
         
         if ( isNotBlank( key ) ) // Filter on key only if set
         {
-            this.paging = createPaging( userStore.getUserRoleCountByName( key ) );
+            this.paging = createPaging( userService.getUserRoleCountByName( key ) );
             
-            userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userStore.getUserRolesBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+            userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userService.getUserRolesBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
         }
         else
         {
-            this.paging = createPaging( userStore.getUserRoleCount() );
+            this.paging = createPaging( userService.getUserRoleCount() );
             
-            userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userStore.getUserRolesBetween( paging.getStartPos(), paging.getPageSize() ) );
+            userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userService.getUserRolesBetween( paging.getStartPos(), paging.getPageSize() ) );
         }
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserAction.java	2010-09-17 07:24:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserAction.java	2010-12-30 09:13:41 +0000
@@ -33,7 +33,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -48,11 +48,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     // -------------------------------------------------------------------------
@@ -87,11 +87,11 @@
     public String execute()
         throws Exception
     {
-        User user = userStore.getUser( id );
-
-        userCredentials = userStore.getUserCredentials( user );
-
-        userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userStore.getAllUserAuthorityGroups() );
+        User user = userService.getUser( id );
+
+        userCredentials = userService.getUserCredentials( user );
+
+        userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userService.getAllUserAuthorityGroups() );
 
         userAuthorityGroups.removeAll( userCredentials.getUserAuthorityGroups() );        
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java	2010-12-29 20:53:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserListAction.java	2010-12-30 09:13:41 +0000
@@ -37,7 +37,7 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 import org.hisp.dhis.user.comparator.UsernameComparator;
 
 /**
@@ -51,11 +51,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private CurrentUserService currentUserService;
@@ -104,20 +104,20 @@
     {        
         if ( isNotBlank( key ) ) // Filter on key only if set
         {
-            this.paging = createPaging( userStore.getUserCountByName( key ) );
+            this.paging = createPaging( userService.getUserCountByName( key ) );
             
-            userCredentialsList = new ArrayList<UserCredentials>( userStore.getUsersBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+            userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
         }
         else
         {
-            this.paging = createPaging( userStore.getUserCount() );
+            this.paging = createPaging( userService.getUserCount() );
             
-            userCredentialsList = new ArrayList<UserCredentials>( userStore.getUsersBetween( paging.getStartPos(), paging.getPageSize() ) );
+            userCredentialsList = new ArrayList<UserCredentials>( userService.getUsersBetween( paging.getStartPos(), paging.getPageSize() ) );
         }
 
         Collections.sort( userCredentialsList, new UsernameComparator() );
-        User currentUser = userStore.getUser( currentUserService.getCurrentUser().getId() );
-        UserCredentials userCredentials = userStore.getUserCredentials( currentUser );
+        User currentUser = userService.getUser( currentUserService.getCurrentUser().getId() );
+        UserCredentials userCredentials = userService.getUserCredentials( currentUser );
 
         currentUserName = userCredentials.getUsername();
         

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveRoleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveRoleAction.java	2010-06-09 10:37:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveRoleAction.java	2010-12-30 09:13:41 +0000
@@ -31,7 +31,6 @@
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserService;
-import org.hisp.dhis.user.UserStore;
 
 import com.opensymphony.xwork2.Action;
 
@@ -47,13 +46,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
-
-    public void setUserStore( UserStore userStore )
-    {
-        this.userStore = userStore;
-    }
-
     private UserService userService;
 
     public void setUserService( UserService userService )
@@ -93,7 +85,7 @@
     public String execute()
         throws Exception
     {
-        UserAuthorityGroup authorityGroup = userStore.getUserAuthorityGroup( id );
+        UserAuthorityGroup authorityGroup = userService.getUserAuthorityGroup( id );
 
         if ( authorityGroup != null )
         {
@@ -107,7 +99,7 @@
                 }
                 else
                 {
-                    userStore.deleteUserAuthorityGroup( authorityGroup );
+                    userService.deleteUserAuthorityGroup( authorityGroup );
                 }
             }
             catch ( DeleteNotAllowedException e )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserAction.java	2010-12-30 09:13:41 +0000
@@ -34,7 +34,6 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
 import org.hisp.dhis.user.UserSetting;
-import org.hisp.dhis.user.UserStore;
 import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
@@ -50,13 +49,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
-
-    public void setUserStore( UserStore userStore )
-    {
-        this.userStore = userStore;
-    }
-
     private CurrentUserService currentUserService;
 
     public void setCurrentUserService( CurrentUserService currentUserService )
@@ -103,20 +95,20 @@
     public String execute()
         throws Exception
     {
-        User user = userStore.getUser( id );
+        User user = userService.getUser( id );
 
         User currentUser = currentUserService.getCurrentUser();
 
         boolean isCurrentUser = currentUser != null && currentUser.equals( user );
 
-        Collection<UserSetting> userSettings = userStore.getAllUserSettings( user );
+        Collection<UserSetting> userSettings = userService.getAllUserSettings( user );
 
         for ( UserSetting userSetting : userSettings )
         {
-            userStore.deleteUserSetting( userSetting );
+            userService.deleteUserSetting( userSetting );
         }
 
-        UserCredentials userCredentials = userStore.getUserCredentials( user );
+        UserCredentials userCredentials = userService.getUserCredentials( user );
         
         if ( userService.isLastSuperUser( userCredentials ) )
         {
@@ -126,8 +118,8 @@
         }
         else
         {
-            userStore.deleteUserCredentials( userStore.getUserCredentials( user ) );
-            userStore.deleteUser( user );
+            userService.deleteUserCredentials( userService.getUserCredentials( user ) );
+            userService.deleteUser( user );
         }
 
         if ( isCurrentUser )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java	2010-10-29 12:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java	2010-12-30 09:13:41 +0000
@@ -37,7 +37,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -66,11 +66,11 @@
         this.selectionManager = selectionManager;
     }  
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     } 
 
     // -------------------------------------------------------------------------
@@ -117,18 +117,18 @@
         throws Exception
     {   
 
-        userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userStore.getAllUserAuthorityGroups() );
+        userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userService.getAllUserAuthorityGroups() );
         
         if ( id != null )
         {
-            User user = userStore.getUser( id );
+            User user = userService.getUser( id );
 
             if ( user.getOrganisationUnits().size() > 0 )
             {
                 selectionTreeManager.setSelectedOrganisationUnits( user.getOrganisationUnits() );
             }
             
-            userCredentials = userStore.getUserCredentials( userStore.getUser( id ) );            
+            userCredentials = userService.getUserCredentials( userService.getUser( id ) );            
 
             userAuthorityGroups.removeAll( userCredentials.getUserAuthorityGroups() );
         }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateRoleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateRoleAction.java	2010-04-21 19:45:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateRoleAction.java	2010-12-30 09:13:41 +0000
@@ -33,7 +33,7 @@
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -48,11 +48,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private DataSetService dataSetService;
@@ -115,7 +115,7 @@
     public String execute()
         throws Exception
     {
-        UserAuthorityGroup group = userStore.getUserAuthorityGroup( id );
+        UserAuthorityGroup group = userService.getUserAuthorityGroup( id );
 
         group.setName( name );
         group.setDescription( description );
@@ -132,7 +132,7 @@
 
         group.getAuthorities().addAll( selectedListAuthority );
 
-        userStore.updateUserAuthorityGroup( group );
+        userService.updateUserAuthorityGroup( group );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java	2010-05-17 16:13:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java	2010-12-30 09:13:41 +0000
@@ -38,7 +38,7 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -53,11 +53,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private PasswordManager passwordManager;
@@ -161,14 +161,14 @@
         
         Collection<OrganisationUnit> units = selectionTreeManager.getReloadedSelectedOrganisationUnits();
 
-        User user = userStore.getUser( id );
+        User user = userService.getUser( id );
         user.setSurname( surname );
         user.setFirstName( firstName );
         user.setEmail( email );
         user.setPhoneNumber( phoneNumber );
         user.setOrganisationUnits( units );
 
-        UserCredentials userCredentials = userStore.getUserCredentials( user );
+        UserCredentials userCredentials = userService.getUserCredentials( user );
         
         Set<UserAuthorityGroup> authorityGroups = userCredentials.getUserAuthorityGroups();
         
@@ -176,7 +176,7 @@
 
         for ( String id : selectedList )
         {
-            authorityGroups.add( userStore.getUserAuthorityGroup( Integer.parseInt( id ) ) );
+            authorityGroups.add( userService.getUserAuthorityGroup( Integer.parseInt( id ) ) );
         }
         
         if ( rawPassword != null )
@@ -184,8 +184,8 @@
             userCredentials.setPassword( passwordManager.encodePassword( userCredentials.getUsername(), rawPassword ) );
         }
 
-        userStore.updateUserCredentials( userCredentials );
-        userStore.updateUser( user );
+        userService.updateUserCredentials( userCredentials );
+        userService.updateUser( user );
         
         if ( units.size() > 0 )
         {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserGroupAction.java	2010-12-26 15:38:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserGroupAction.java	2010-12-30 09:13:41 +0000
@@ -34,17 +34,17 @@
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
 public class UpdateUserGroupAction implements Action
 { 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private UserGroupService userGroupService;
@@ -90,7 +90,7 @@
 
         for ( Integer groupMember : groupMembers )
         {
-            User user = userStore.getUser( groupMember );
+            User user = userService.getUser( groupMember );
             userList.add( user );
         }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateRoleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateRoleAction.java	2010-09-14 09:03:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateRoleAction.java	2010-12-30 09:13:41 +0000
@@ -29,7 +29,7 @@
 
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -44,11 +44,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private I18n i18n;
@@ -97,7 +97,7 @@
         if ( name != null )
         {
 
-            UserAuthorityGroup match = userStore.getUserAuthorityGroupByName( name );
+            UserAuthorityGroup match = userService.getUserAuthorityGroupByName( name );
 
             if ( match != null && (id == null || match.getId() != id) )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateUserAction.java	2010-12-26 15:38:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateUserAction.java	2010-12-30 09:13:41 +0000
@@ -29,7 +29,7 @@
 
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserStore;
+import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -44,11 +44,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private UserStore userStore;
+    private UserService userService;
 
-    public void setUserStore( UserStore userStore )
+    public void setUserService( UserService userService )
     {
-        this.userStore = userStore;
+        this.userService = userService;
     }
 
     private I18n i18n;
@@ -96,7 +96,7 @@
     {
         if ( username != null )
         {
-            UserCredentials match = userStore.getUserCredentialsByUsername( username );
+            UserCredentials match = userService.getUserCredentialsByUsername( username );
 
             if ( match != null && (id == null || match.getId() != id) )
             {

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml	2010-12-30 04:29:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml	2010-12-30 09:13:41 +0000
@@ -11,8 +11,8 @@
 
 	<bean id="org.hisp.dhis.user.action.AddUserAction" class="org.hisp.dhis.user.action.AddUserAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="passwordManager">
 			<ref bean="org.hisp.dhis.security.PasswordManager" />
@@ -27,9 +27,6 @@
 
 	<bean id="org.hisp.dhis.user.action.DeleteCurrentUserAction"
 		class="org.hisp.dhis.user.action.DeleteCurrentUserAction" scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
-		</property>
 		<property name="currentUserService">
 			<ref bean="org.hisp.dhis.user.CurrentUserService" />
 		</property>
@@ -44,15 +41,15 @@
 
 	<bean id="org.hisp.dhis.user.action.GetUserAction" class="org.hisp.dhis.user.action.GetUserAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 	</bean>
 
 	<bean id="org.hisp.dhis.user.action.GetOrgunitUserListAction"
 		class="org.hisp.dhis.user.action.GetOrgunitUserListAction" scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="selectionManager">
 			<ref bean="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
@@ -61,8 +58,8 @@
 
 	<bean id="org.hisp.dhis.user.action.GetUserListAction" class="org.hisp.dhis.user.action.GetUserListAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="currentUserService">
 			<ref bean="org.hisp.dhis.user.CurrentUserService" />
@@ -71,9 +68,6 @@
 
 	<bean id="org.hisp.dhis.user.action.RemoveUserAction" class="org.hisp.dhis.user.action.RemoveUserAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
-		</property>
 		<property name="currentUserService">
 			<ref bean="org.hisp.dhis.user.CurrentUserService" />
 		</property>
@@ -84,8 +78,8 @@
 
 	<bean id="org.hisp.dhis.user.action.UpdateUserAction" class="org.hisp.dhis.user.action.UpdateUserAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="passwordManager">
 			<ref bean="org.hisp.dhis.security.PasswordManager" />
@@ -100,8 +94,8 @@
 
 	<bean id="org.hisp.dhis.user.action.ValidateUserAction" class="org.hisp.dhis.user.action.ValidateUserAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 	</bean>
 
@@ -113,8 +107,8 @@
 		<property name="selectionManager">
 			<ref bean="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
 		</property>
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 	</bean>
 
@@ -146,8 +140,8 @@
 
 	<bean id="org.hisp.dhis.user.action.AddRoleAction" class="org.hisp.dhis.user.action.AddRoleAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="dataSetService">
 			<ref bean="org.hisp.dhis.dataset.DataSetService" />
@@ -156,8 +150,8 @@
 
 	<bean id="org.hisp.dhis.user.action.GetRoleAction" class="org.hisp.dhis.user.action.GetRoleAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="dataSetService">
 			<ref bean="org.hisp.dhis.dataset.DataSetService" />
@@ -168,16 +162,13 @@
 
 	<bean id="org.hisp.dhis.user.action.GetRoleListAction" class="org.hisp.dhis.user.action.GetRoleListAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 	</bean>
 
 	<bean id="org.hisp.dhis.user.action.RemoveRoleAction" class="org.hisp.dhis.user.action.RemoveRoleAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
-		</property>
 		<property name="userService">
 			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
@@ -185,8 +176,8 @@
 
 	<bean id="org.hisp.dhis.user.action.UpdateRoleAction" class="org.hisp.dhis.user.action.UpdateRoleAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 		<property name="dataSetService">
 			<ref bean="org.hisp.dhis.dataset.DataSetService" />
@@ -205,8 +196,8 @@
 
 	<bean id="org.hisp.dhis.user.action.ValidateRoleAction" class="org.hisp.dhis.user.action.ValidateRoleAction"
 		scope="prototype">
-		<property name="userStore">
-			<ref bean="org.hisp.dhis.user.UserStore" />
+		<property name="userService">
+			<ref bean="org.hisp.dhis.user.UserService" />
 		</property>
 	</bean>
 
@@ -219,24 +210,24 @@
 
 	<bean id="org.hisp.dhis.user.action.AddUserGroupFormAction" class="org.hisp.dhis.user.action.AddUserGroupFormAction"
 		scope="prototype">
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 	</bean>
 
 	<bean id="org.hisp.dhis.user.action.AddUserGroupAction" class="org.hisp.dhis.user.action.AddUserGroupAction"
 		scope="prototype">
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
 	</bean>
 
 	<bean id="org.hisp.dhis.user.action.EditUserGroupFormAction"
 		class="org.hisp.dhis.user.action.EditUserGroupFormAction" scope="prototype">
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
 	</bean>
 
 	<bean id="org.hisp.dhis.user.action.UpdateUserGroupAction" class="org.hisp.dhis.user.action.UpdateUserGroupAction"
 		scope="prototype">
-		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="userService" ref="org.hisp.dhis.user.UserService" />
 		<property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
 	</bean>