dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21437
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10151: Move the user group functionality from dhis-web-maintenance-user module to dhis-web-dashboard-int...
------------------------------------------------------------
revno: 10151
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-03-12 13:51:28 +0700
message:
Move the user group functionality from dhis-web-maintenance-user module to dhis-web-dashboard-integration module.
removed:
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/EditUserGroupFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserGroupAction.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/ValidateUserGroupAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserGroupForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserGroupForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/userGroupList.vm
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml
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/org/hisp/dhis/user/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/menu.vm
--
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-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2013-03-01 05:14:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2013-03-12 06:51:28 +0000
@@ -63,7 +63,7 @@
"rangelength" : [ 2, 210 ],
"alphanumericwithbasicpuncspaces" : true
},
- "memberValidator" : {
+ "groupMembersList" : {
"required" : true
}
},
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2012-12-14 13:46:47 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2013-03-12 06:51:28 +0000
@@ -115,5 +115,51 @@
<bean id="org.hisp.dhis.dashboard.profile.action.GetUserAction" class="org.hisp.dhis.dashboard.profile.action.GetUserAction"
scope="prototype"/>
+
+ <!-- User groups -->
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.AddUserGroupAction" class="org.hisp.dhis.dashboard.usergroup.action.AddUserGroupAction"
+ scope="prototype">
+ <property name="userService" ref="org.hisp.dhis.user.UserService" />
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.AddUserGroupFormAction" class="org.hisp.dhis.dashboard.usergroup.action.AddUserGroupFormAction">
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.GetUserGroupListAction" class="org.hisp.dhis.dashboard.usergroup.action.GetUserGroupListAction"
+ scope="prototype">
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.EditUserGroupFormAction" class="org.hisp.dhis.dashboard.usergroup.action.EditUserGroupFormAction"
+ scope="prototype">
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.UpdateUserGroupAction" class="org.hisp.dhis.dashboard.usergroup.action.UpdateUserGroupAction"
+ scope="prototype">
+ <property name="userService" ref="org.hisp.dhis.user.UserService" />
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.RemoveUserGroupAction" class="org.hisp.dhis.dashboard.usergroup.action.RemoveUserGroupAction"
+ scope="prototype">
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.GetUserGroupAction" class="org.hisp.dhis.dashboard.usergroup.action.GetUserGroupAction"
+ scope="prototype">
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.dashboard.usergroup.action.ValidateUserGroupAction" class="org.hisp.dhis.dashboard.usergroup.action.ValidateUserGroupAction"
+ scope="prototype">
+ <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
+ </bean>
</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2013-01-09 06:50:45 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2013-03-12 06:51:28 +0000
@@ -91,4 +91,14 @@
to_org_unit=To org unit
to_user=To user
update_profile=update profile!
-or=or
\ No newline at end of file
+or=or
+intro_user_group=Create user groups for functionality that should work on a group of users, like notifications.
+user_group_management=User group management
+confirm_delete=Are you sure you want to delete this user group ?
+edit_user_group=Edit user group
+user_group_details=User group details
+available_users=Available users
+group_members=Group members
+add_user_group=Add user group
+no_of_Users=Number of users
+user_group=User Group
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2012-11-14 12:39:53 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2013-03-12 06:51:28 +0000
@@ -149,6 +149,56 @@
<param name="javascripts">javascript/profile.js,javascript/interpretation.js</param>
<param name="stylesheets">style/dashboard.css</param>
</action>
+
+ <!-- User Group -->
+
+ <action name="getAllUserGroups" class="org.hisp.dhis.dashboard.usergroup.action.GetUserGroupListAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-dashboard-integration/userGroupList.vm</param>
+ <param name="javascripts">javascript/usergroup.js</param>
+ <param name="requiredAuthorities">F_USERGROUP_LIST</param>
+ </action>
+
+ <action name="getUserGroup" class="org.hisp.dhis.dashboard.usergroup.action.GetUserGroupAction">
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonUserGroup.vm</result>
+ </action>
+
+ <action name="addUserGroupForm" class="org.hisp.dhis.dashboard.usergroup.action.AddUserGroupFormAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-dashboard-integration/addUserGroupForm.vm</param>
+ <param name="javascripts">javascript/usergroup.js</param>
+ <param name="anyAuthorities">F_USERGROUP_PUBLIC_ADD, F_USERGROUP_PRIVATE_ADD</param>
+ </action>
+
+ <action name="addUserGroup" class="org.hisp.dhis.dashboard.usergroup.action.AddUserGroupAction">
+ <param name="javascripts">javascript/user.js</param>
+ <result name="success" type="redirect">getAllUserGroups.action</result>
+ <param name="anyAuthorities">F_USERGROUP_PUBLIC_ADD, F_USERGROUP_PRIVATE_ADD</param>
+ </action>
+
+ <action name="editUserGroupForm" class="org.hisp.dhis.dashboard.usergroup.action.EditUserGroupFormAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-dashboard-integration/updateUserGroupForm.vm</param>
+ <param name="requiredAuthorities">F_USERGROUP_UPDATE</param>
+ </action>
+
+ <action name="updateUserGroup" class="org.hisp.dhis.dashboard.usergroup.action.UpdateUserGroupAction">
+ <result name="success" type="redirect">getAllUserGroups.action?currentPage=${keyCurrentPage}</result>
+ <param name="requiredAuthorities">F_USERGROUP_UPDATE</param>
+ </action>
+
+ <action name="removeUserGroup" class="org.hisp.dhis.dashboard.usergroup.action.RemoveUserGroupAction">
+ <result name="success" type="velocity">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity">/dhis-web-commons/ajax/jsonResponseError.vm</result>
+ <param name="requiredAuthorities">F_USERGROUP_DELETE</param>
+ </action>
+
+ <action name="validateUserGroup" class="org.hisp.dhis.dashboard.usergroup.action.ValidateUserGroupAction">
+ <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity-json">/dhis-web-commons/ajax/jsonResponseError.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
+ </action>
</package>
</struts>
=== removed 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 2012-07-01 11:33:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,119 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.List;
-
-import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.system.util.AttributeUtils;
-import org.hisp.dhis.user.User;
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.user.UserGroupService;
-import org.hisp.dhis.user.UserService;
-
-import com.opensymphony.xwork2.Action;
-
-public class AddUserGroupAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private UserService userService;
-
- public void setUserService( UserService userService )
- {
- this.userService = userService;
- }
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- private AttributeService attributeService;
-
- public void setAttributeService( AttributeService attributeService )
- {
- this.attributeService = attributeService;
- }
-
- // -------------------------------------------------------------------------
- // Parameters
- // -------------------------------------------------------------------------
-
- private List<Integer> groupMembersList;
-
- public void setGroupMembersList( List<Integer> groupMembersList )
- {
- this.groupMembersList = groupMembersList;
- }
-
- private String name;
-
- public void setName( String name )
- {
- this.name = name;
- }
-
- private List<String> jsonAttributeValues;
-
- public void setJsonAttributeValues( List<String> jsonAttributeValues )
- {
- this.jsonAttributeValues = jsonAttributeValues;
- }
-
- // -------------------------------------------------------------------------
- // Action Implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- UserGroup userGroup = new UserGroup( name );
-
- for ( Integer groupMember : groupMembersList )
- {
- User user = userService.getUser( groupMember );
- userGroup.addUser( user );
- }
-
- if ( jsonAttributeValues != null )
- {
- AttributeUtils.updateAttributeValuesFromJson( userGroup.getAttributeValues(), jsonAttributeValues,
- attributeService );
- }
-
- userGroupService.addUserGroup( userGroup );
-
- return SUCCESS;
- }
-}
=== removed 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 2012-06-01 13:19:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserGroupFormAction.java 1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import com.opensymphony.xwork2.Action;
-import org.hisp.dhis.attribute.Attribute;
-import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-public class AddUserGroupFormAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private AttributeService attributeService;
-
- public void setAttributeService( AttributeService attributeService )
- {
- this.attributeService = attributeService;
- }
-
- // -------------------------------------------------------------------------
- // Parameters
- // -------------------------------------------------------------------------
-
- private List<Attribute> attributes;
-
- public List<Attribute> getAttributes()
- {
- return attributes;
- }
-
- // -------------------------------------------------------------------------
- // Action Implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- attributes = new ArrayList<Attribute>( attributeService.getUserGroupAttributes() );
- Collections.sort( attributes, IdentifiableObjectNameComparator.INSTANCE );
-
- return SUCCESS;
- }
-}
=== removed 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 2012-11-08 12:35:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/EditUserGroupFormAction.java 1970-01-01 00:00:00 +0000
@@ -1,128 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import com.opensymphony.xwork2.Action;
-import org.hisp.dhis.attribute.Attribute;
-import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.hisp.dhis.system.util.AttributeUtils;
-import org.hisp.dhis.user.User;
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.user.UserGroupService;
-
-import java.util.*;
-
-/**
- * @author Lars Helge Overland
- */
-public class EditUserGroupFormAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- private AttributeService attributeService;
-
- public void setAttributeService( AttributeService attributeService )
- {
- this.attributeService = attributeService;
- }
-
- // -------------------------------------------------------------------------
- // Parameters
- // -------------------------------------------------------------------------
-
- private Integer userGroupId;
-
- public void setUserGroupId( Integer userGroupId )
- {
- this.userGroupId = userGroupId;
- }
-
- public Integer getUserGroupId()
- {
- return userGroupId;
- }
-
- private List<User> groupMembers = new ArrayList<User>();
-
- public List<User> getGroupMembers()
- {
- return groupMembers;
- }
-
- private UserGroup group;
-
- public UserGroup getGroup()
- {
- return group;
- }
-
- private List<Attribute> attributes;
-
- public List<Attribute> getAttributes()
- {
- return attributes;
- }
-
- public Map<Integer, String> attributeValues = new HashMap<Integer, String>();
-
- public Map<Integer, String> getAttributeValues()
- {
- return attributeValues;
- }
-
- // -------------------------------------------------------------------------
- // Action Implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- group = userGroupService.getUserGroup( userGroupId );
-
- groupMembers = new ArrayList<User>( group.getMembers() );
-
- attributes = new ArrayList<Attribute>( attributeService.getUserGroupAttributes() );
-
- attributeValues = AttributeUtils.getAttributeValueMap( group.getAttributeValues() );
-
- Collections.sort( attributes, IdentifiableObjectNameComparator.INSTANCE );
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,91 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.user.UserGroupService;
-
-import com.opensymphony.xwork2.Action;
-
-public class GetUserGroupAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- // -------------------------------------------------------------------------
- // Input/output
- // -------------------------------------------------------------------------
-
- private Integer userGroupId;
-
- public void setUserGroupId( Integer userGroupId )
- {
- this.userGroupId = userGroupId;
- }
-
- public Integer getUserGroupId()
- {
- return userGroupId;
- }
-
- private UserGroup group ;
-
- public UserGroup getGroup()
- {
- return group;
- }
-
- private int memberCount;
-
- public int getMemberCount()
- {
- return memberCount;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- group = userGroupService.getUserGroup(userGroupId );
-
- memberCount =group.getMembers().size();
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/GetUserGroupListAction.java 1970-01-01 00:00:00 +0000
@@ -1,97 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.paging.ActionPagingSupport;
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.user.UserGroupService;
-
-public class GetUserGroupListAction
- extends ActionPagingSupport<UserGroup>
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- // -------------------------------------------------------------------------
- // Parameters
- // -------------------------------------------------------------------------
-
- private List<UserGroup> userGroupList;
-
- public List<UserGroup> getUserGroupList()
- {
- return userGroupList;
- }
-
- private String key;
-
- public String getKey()
- {
- return key;
- }
-
- public void setKey( String key )
- {
- this.key = key;
- }
- // -------------------------------------------------------------------------
- // Action Implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- if ( isNotBlank( key ) ) // Filter on key only if set
- {
- this.paging = createPaging( userGroupService.getUserGroupCountByName( key ) );
-
- userGroupList = new ArrayList<UserGroup>( userGroupService.getUserGroupsBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
- }
- else
- {
- this.paging = createPaging( userGroupService.getUserGroupCount() );
-
- userGroupList = new ArrayList<UserGroup>( userGroupService.getUserGroupsBetween( paging.getStartPos(), paging.getPageSize() ) );
- }
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserGroupAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/RemoveUserGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,102 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.hisp.dhis.common.DeleteNotAllowedException;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.user.UserGroupService;
-
-import com.opensymphony.xwork2.Action;
-
-public class RemoveUserGroupAction
- implements Action
-{
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- // -------------------------------------------------------------------------
- // I18n
- // -------------------------------------------------------------------------
-
- private I18n i18n;
-
- public void setI18n( I18n i18n )
- {
- this.i18n = i18n;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- // -------------------------------------------------------------------------
- // Output
- // -------------------------------------------------------------------------
-
- private String message;
-
- public String getMessage()
- {
- return message;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- try
- {
- userGroupService.deleteUserGroup( userGroupService.getUserGroup( id ) );
- }
- catch ( DeleteNotAllowedException ex )
- {
- if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
- {
- message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getMessage();
-
- return ERROR;
- }
- }
-
- return SUCCESS;
- }
-}
=== removed 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 2012-07-01 11:33:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,128 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import com.opensymphony.xwork2.Action;
-import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.system.util.AttributeUtils;
-import org.hisp.dhis.user.User;
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.user.UserGroupService;
-import org.hisp.dhis.user.UserService;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class UpdateUserGroupAction
- implements Action
-{
- private UserService userService;
-
- public void setUserService( UserService userService )
- {
- this.userService = userService;
- }
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- private AttributeService attributeService;
-
- public void setAttributeService( AttributeService attributeService )
- {
- this.attributeService = attributeService;
- }
-
- // -------------------------------------------------------------------------
- // Parameters
- // -------------------------------------------------------------------------
-
- private List<Integer> groupMembersList;
-
- public void setGroupMembersList( List<Integer> groupMembersList )
- {
- this.groupMembersList = groupMembersList;
- }
-
- private String name;
-
- public void setName( String name )
- {
- this.name = name;
- }
-
- private Integer userGroupId;
-
- public void setUserGroupId( Integer userGroupId )
- {
- this.userGroupId = userGroupId;
- }
-
- private List<String> jsonAttributeValues;
-
- public void setJsonAttributeValues( List<String> jsonAttributeValues )
- {
- this.jsonAttributeValues = jsonAttributeValues;
- }
-
- // -------------------------------------------------------------------------
- // Action Implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- Set<User> userList = new HashSet<User>();
-
- for ( Integer groupMember : groupMembersList )
- {
- User user = userService.getUser( groupMember );
- userList.add( user );
- }
-
- UserGroup userGroup = userGroupService.getUserGroup( userGroupId );
-
- userGroup.setName( name );
- userGroup.updateUsers( userList );
-
- if ( jsonAttributeValues != null )
- {
- AttributeUtils.updateAttributeValuesFromJson( userGroup.getAttributeValues(), jsonAttributeValues,
- attributeService );
- }
-
- userGroupService.updateUserGroup( userGroup );
-
- return SUCCESS;
- }
-}
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateUserGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateUserGroupAction.java 2013-02-12 06:55:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/ValidateUserGroupAction.java 1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
-package org.hisp.dhis.user.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import com.opensymphony.xwork2.Action;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.user.UserGroup;
-import org.hisp.dhis.user.UserGroupService;
-
-public class ValidateUserGroupAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private UserGroupService userGroupService;
-
- public void setUserGroupService( UserGroupService userGroupService )
- {
- this.userGroupService = userGroupService;
- }
-
- private I18n i18n;
-
- public void setI18n( I18n i18n )
- {
- this.i18n = i18n;
- }
-
- // -------------------------------------------------------------------------
- // Parameters
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- private String name;
-
- public void setName( String name )
- {
- this.name = name;
- }
-
- private String message;
-
- public String getMessage()
- {
- return message;
- }
-
- // -------------------------------------------------------------------------
- // Action Implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
-
- if ( name != null )
- {
- UserGroup match = userGroupService.getUserGroupByName( name ).get( 0 );
-
- if ( match != null && (id == null || match.getId() != id) )
- {
- message = i18n.getString( "name_in_use" );
-
- return ERROR;
- }
- }
-
- message = i18n.getString( "everything_is_ok" );
-
- return SUCCESS;
- }
-}
=== 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 2012-12-14 13:46:47 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml 2013-03-12 06:51:28 +0000
@@ -111,53 +111,7 @@
scope="prototype">
<property name="userService" ref="org.hisp.dhis.user.UserService" />
</bean>
-
- <!-- User groups -->
-
- <bean id="org.hisp.dhis.user.action.AddUserGroupFormAction" class="org.hisp.dhis.user.action.AddUserGroupFormAction">
- <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
- </bean>
-
- <bean id="org.hisp.dhis.user.action.GetUserGroupListAction" class="org.hisp.dhis.user.action.GetUserGroupListAction"
- scope="prototype">
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- </bean>
-
- <bean id="org.hisp.dhis.user.action.AddUserGroupAction" class="org.hisp.dhis.user.action.AddUserGroupAction"
- scope="prototype">
- <property name="userService" ref="org.hisp.dhis.user.UserService" />
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
- </bean>
-
- <bean id="org.hisp.dhis.user.action.EditUserGroupFormAction" class="org.hisp.dhis.user.action.EditUserGroupFormAction"
- scope="prototype">
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
- </bean>
-
- <bean id="org.hisp.dhis.user.action.UpdateUserGroupAction" class="org.hisp.dhis.user.action.UpdateUserGroupAction"
- scope="prototype">
- <property name="userService" ref="org.hisp.dhis.user.UserService" />
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- <property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
- </bean>
-
- <bean id="org.hisp.dhis.user.action.RemoveUserGroupAction" class="org.hisp.dhis.user.action.RemoveUserGroupAction"
- scope="prototype">
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- </bean>
-
- <bean id="org.hisp.dhis.user.action.GetUserGroupAction" class="org.hisp.dhis.user.action.GetUserGroupAction"
- scope="prototype">
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- </bean>
-
- <bean id="org.hisp.dhis.user.action.ValidateUserGroupAction" class="org.hisp.dhis.user.action.ValidateUserGroupAction"
- scope="prototype">
- <property name="userGroupService" ref="org.hisp.dhis.user.UserGroupService" />
- </bean>
-
+
<bean id="org.hisp.dhis.user.action.GetSystemAuthoritiesAction" class="org.hisp.dhis.user.action.GetSystemAuthoritiesAction"
scope="prototype">
<property name="authoritiesProvider" ref="org.hisp.dhis.security.authority.SystemAuthoritiesProvider" />
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2013-03-07 20:07:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties 2013-03-12 06:51:28 +0000
@@ -293,16 +293,6 @@
can_not_remove_last_super_user=Can not remove the last super user.
can_not_remove_last_super_user_role=Can not remove the last super user role.
delete_current_user=Delete Current User
-user_group=User Group
-intro_user_group=Create user groups for functionality that should work on a group of users, like notifications.
-user_group_management=User group management
-edit_user_group=Edit user group
-user_group_details=User group details
-confirm_delete=Confirm delete
-add_user_group=Add user group
-available_users=Available users
-group_members=Group members
-no_of_Users=Number of users
last_login=Last login
inactive_for=Inactive for
month=month
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserGroupForm.vm 2013-02-12 06:55:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserGroupForm.vm 1970-01-01 00:00:00 +0000
@@ -1,90 +0,0 @@
-<script type="text/javascript">
- jQuery(function() {
- validation2( 'addUserGroupForm', function( form )
- {
- form.submit();
- }, {
- 'beforeValidateHandler' : function()
- {
- listValidator( 'memberValidator', 'groupMembersList' );
- #tblDynamicAttributesJavascript()
- },
- 'rules' : getValidationRules( "userGroup" )
- } );
-
- /* remote validation */
- // checkValueIsExist( "name", "validateUserGroup.action" );
-
- jQuery("#availableUsersList").dhisAjaxSelect({
- source: "../dhis-web-commons-ajax-json/getUsers.action",
- iterator: "users",
- connectedTo: 'groupMembersList',
- handler: function(item) {
- var option = jQuery("<option />");
- option.text( item.surname + ", " + item.firstName );
- option.attr( "value", item.id );
-
- return option;
- }
- });
- });
-</script>
-
-<h3>$i18n.getString( "add_user_group" )</h3>
-
-<form id="addUserGroupForm" name="addUserGroupForm" action="addUserGroup.action" method="post" class="inputForm">
-
-<table id="detailsList">
- <col style="width: 120px"/>
-
- <tr>
- <th colspan="2">$i18n.getString( "user_group_details" )</th>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name"></td>
- </tr>
-</table>
-
-#tblDynamicAttributes( { "attributes": $attributes } )
-
-<table>
- <colgroup>
- <col style="width: 500px;"/>
- <col/>
- <col style="width: 500px;"/>
- </colgroup>
-
- <tr>
- <th>$i18n.getString( "available_users" )</th>
- <th></th>
- <th>$i18n.getString( "group_members" )
- <select id="memberValidator" multiple="multiple" style="display:none"/>
- </th>
- </tr>
-
- <tr>
- <td>
- <select id="availableUsersList" name="availableUsersList" multiple="multiple" style="height: 200px; width: 100%;"></select>
- </td>
-
- <td style="text-align:center">
- <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableUsersList' );"/><br/>
- <input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'groupMembersList' );"/><br/>
- <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableUsersList' );"/><br/>
- <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'groupMembersList' );"/>
- </td>
-
- <td>
- <select id="groupMembersList" name="groupMembersList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;"></select>
- </td>
- </tr>
-</table>
-
-<p>
- <input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
- <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='getAllUserGroups.action'" style="width:10em"/>
-</p>
-
-</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm 2012-11-08 19:17:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/index.vm 2013-03-12 06:51:28 +0000
@@ -12,5 +12,4 @@
#introListImgItem( "alluser.action" "user" "user" )
#introListImgItem( "alluser.action?selfRegistered=true" "self_registered_user" "user" )
#introListImgItem( "allRole.action" "user_role" "user" )
- #introListImgItem( "getAllUserGroups.action" "user_group" "user" )
</ul>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js 2012-11-08 13:26:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js 2013-03-12 06:51:28 +0000
@@ -127,23 +127,3 @@
} );
}
}
-
-// -----------------------------------------------------------------------------
-// Usergroup functionality
-// -----------------------------------------------------------------------------
-
-function showUserGroupDetails( userGroupId )
-{
- jQuery.post( 'getUserGroup.action', { userGroupId: userGroupId },
- function ( json ) {
- setInnerHTML( 'nameField', json.userGroup.name );
- setInnerHTML( 'noOfGroupField', json.userGroup.noOfUsers );
-
- showDetails();
- });
-}
-
-function removeUserGroup( userGroupId, userGroupName )
-{
- removeItem( userGroupId, userGroupName, i18n_confirm_delete, 'removeUserGroup.action' );
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/menu.vm 2012-11-08 09:46:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/menu.vm 2013-03-12 06:51:28 +0000
@@ -5,5 +5,4 @@
<li><a href="alluser.action?selfRegistered=true">$i18n.getString( "self_registered_user" ) </a></li>
<li><a href="allRole.action" title="$i18n.getString( "user_role" )">$i18n.getString( "user_role" ) </a></li>
<li><a href="deleteCurrentUser.action" title="$i18n.getString( "delete_current_user" )">$i18n.getString( "delete_current_user" )</a></li>
- <li><a href="getAllUserGroups.action" title="$i18n.getString( "user_group" )" >$i18n.getString( "user_group" )</a></li>
</ul>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserGroupForm.vm 2013-02-12 06:55:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserGroupForm.vm 1970-01-01 00:00:00 +0000
@@ -1,99 +0,0 @@
-<script type="text/javascript">
- jQuery(document).ready(function() {
- validation2( 'editUserGroupForm', function( form )
- {
- form.submit();
- }, {
- 'beforeValidateHandler' : function()
- {
- listValidator( 'memberValidator', 'groupMembersList' );
- #tblDynamicAttributesJavascript();
- },
- 'rules' : getValidationRules( "userGroup" )
- } );
-
- jQuery("#availableUsersList").dhisAjaxSelect({
- source: "../dhis-web-commons-ajax-json/getUsers.action",
- iterator: "users",
- connectedTo: 'groupMembersList',
- handler: function(item) {
- var option = jQuery("<option />");
- option.text( item.surname + ", " + item.firstName );
- option.attr( "value", item.id );
-
- return option;
- }
- });
-
- /* remote validation */
- /* checkValueIsExist( "name", "validateUserGroup.action", {
- id : $group.id
- } ); */
- });
-</script>
-
-<h3>$i18n.getString( "edit_user_group" )</h3>
-
-<form id="editUserGroupForm" name="editUserGroupForm" action="updateUserGroup.action" method="post" class="inputForm">
-
-<input type="hidden" name="userGroupId" id="userGroupId" value="$group.id" />
-<table id="detailsList">
- <col style="width: 120px"/>
- <col style="width: 270px"/>
-
- <tr>
- <th colspan="2">$i18n.getString( "user_group_details" )</th>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name" value ="$encoder.htmlEncode( $group.name )"></td>
- </tr>
-
-</table>
-
-#tblDynamicAttributes( { "attributes": $attributes, "attributeValues": $attributeValues } )
-
-<table>
- <colgroup>
- <col style="width: 500px;"/>
- <col/>
- <col style="width: 500px;"/>
- </colgroup>
-
- <tr>
- <th>$i18n.getString( "available_users" )</th>
- <th></th>
- <th>$i18n.getString( "group_members" )
- <select id="memberValidator" multiple="multiple" style="display:none"/>
- </th>
- </tr>
-
- <tr>
- <td>
- <select id="availableUsersList" name="availableUsersList" multiple="multiple" style="height: 200px; width: 100%;"></select>
- </td>
-
- <td style="text-align:center">
- <input type="button" value=">" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableUsersList' );"/><br/>
- <input type="button" value="<" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'groupMembersList' );"/><br/>
- <input type="button" value=">>" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableUsersList' );"/><br/>
- <input type="button" value="<<" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'groupMembersList' );"/>
- </td>
-
- <td>
- <select id="groupMembersList" name="groupMembersList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;">
- #foreach( $user in $groupMembers )
- <option value="$user.id">$encoder.htmlEncode( $user.surname ), $!encoder.htmlEncode( $user.firstName )</option>
- #end
- </select>
- </td>
- </tr>
-</table>
-
-<p>
- <input type="submit" value="$i18n.getString( 'save' )" style="width:10em" />
- <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='getAllUserGroups.action'" style="width:10em" />
-</p>
-
-</form>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/userGroupList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/userGroupList.vm 2013-01-30 08:25:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/userGroupList.vm 1970-01-01 00:00:00 +0000
@@ -1,82 +0,0 @@
-
-#sharingDialog()
-
-<script type="text/javascript" src="javascript/userGroupList.js"></script>
-<script type="text/javascript">
- var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete" ) , "'" )';
-</script>
-
-<h3>$i18n.getString( "user_group_management" ) #openHelp( "user_group_management" )</h3>
-
-<table class="mainPageTable">
- <tr>
- <td style="vertical-align:top">
- <table width="100%">
- <tr>
- <td>#filterDiv( "getAllUserGroups" )</td>
- <td colspan="9" style="text-align:right">
- <input type="button" value="$i18n.getString( 'add_new' )" onclick="window.location.href='addUserGroupForm.action'" style="width:80px"/></a>
- </td>
- </tr>
- </table>
- <table class="listTable" id="listTable">
- <col/>
- <col width="120"/>
- <thead>
- <tr>
- <th>$i18n.getString( "name" )</th>
- <th style="text-align:center" class="{sorter: false}">$i18n.getString( "operations" )</th>
- </tr>
- </thead>
- <tbody id="list">
- #foreach( $userGroup in $userGroupList )
- <tr id="tr${userGroup.id}">
- <td onclick="showUserGroupDetails( $userGroup.id )">$encoder.htmlEncode( $userGroup.name )</td>
- <td style="text-align:center">
-
- #if ( $security.canManage( $userGroup ) )
- <a href="javascript:showSharingDialog('userGroup', '$userGroup.uid');"><img src="../images/relationship.png" alt="$i18n.getString( 'sharing_settings' )"></a>
- #else
- <img src="../images/relationship-denied.png">
- #end
-
- #if( $security.canUpdate( $userGroup ) )
- <a href="editUserGroupForm.action?userGroupId=$userGroup.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/></a>
- #else
- <img src="../images/edit-denied.png">
- #end
-
- #if( $security.canDelete( $userGroup ) )
- <a href="javascript:removeUserGroup( '$userGroup.id', '$encoder.jsEncode( $userGroup.name )' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></a>
- #else
- <img src="../images/delete-denied.png">
- #end
-
- <a href="javascript:showUserGroupDetails( $userGroup.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"/></a>
-
- </td>
- </tr>
- #end
- </tbody>
- </table>
- <p></p>
- #parse( "/dhis-web-commons/paging/paging.vm" )
- </td>
- <td style="width:20em; padding-left:2em; vertical-align:top">
- <div id="detailsArea" style="display:none">
- <div style="float:right">
- <a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/hide.png" alt="$i18n.getString( 'hide_details' )"/></a>
- </div>
- <p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
- <p><label>$i18n.getString( "no_of_Users" ):</label><br/><span id="noOfGroupField"></span></p>
- </div>
-
- <div id="warningArea" style="position:fixed;right:10px;top:200px;display:none">
- <div style="float:right">
- <a href="javascript:hideWarning()" title="$i18n.getString( 'hide_warning' )"><img src="../images/hide.png" alt="$i18n.getString( 'hide_warning' )"/></a>
- </div>
- <p><span id="warningField"></span></p>
- </div>
- </td>
- </tr>
-</table>