it.eng.rdlab.soa3.um.rest.impl
Class GroupManagerImpl

java.lang.Object
  extended by it.eng.rdlab.soa3.um.rest.impl.GroupManagerImpl
All Implemented Interfaces:
IUserManagementService.GroupManager

public class GroupManagerImpl
extends Object
implements IUserManagementService.GroupManager

This class is a layer between the RESTFul WS and the LDAPUserManagement for operations on groups

Version:
1.0
Author:
Ermanno Travaglino

Constructor Summary
GroupManagerImpl(String ldapUrl)
           
 
Method Summary
 String createGroup(String groupName, String organizationName, String description, String adminUserId, String password)
          Creates a new group by groupName (and organizationName)
 boolean deleteGroup(String groupName, String organizationName, String adminUserId, String password)
          Deletes a group by groupName (and by organizationName)
 boolean deleteGroups(String organizationName, String adminUserId, String password)
          Deletes all present groups under an organization by organizationName
 GroupModel getGroup(String groupName, String organizationName, String adminUserId, String password)
          Gets the group by groupName (and by organizatioName)
 List<GroupModel> listGroupsByOrganization(String organizationName, String adminUserId, String password)
          Lists all groups under an organization by organizationName
 List<GroupModel> listGroupsByUser(String userId, String organizationName, String adminUserId, String password)
           
 boolean removeAllUsers(String groupName, String organizationName, String adminUserId, String password)
          Removes all users with a specific groupName group (and by organizationName)
 boolean updateGroup(GroupModel group, String organizationName, String adminUserId, String password)
          Updates group's attribute
 boolean updateGroupsOfOrganization(List<String> groupsNameList, String organizationName, String adminUserId, String password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupManagerImpl

public GroupManagerImpl(String ldapUrl)
Method Detail

createGroup

public String createGroup(String groupName,
                          String organizationName,
                          String description,
                          String adminUserId,
                          String password)
Description copied from interface: IUserManagementService.GroupManager
Creates a new group by groupName (and organizationName)

Specified by:
createGroup in interface IUserManagementService.GroupManager
Returns:
group creation process response String

deleteGroup

public boolean deleteGroup(String groupName,
                           String organizationName,
                           String adminUserId,
                           String password)
Description copied from interface: IUserManagementService.GroupManager
Deletes a group by groupName (and by organizationName)

Specified by:
deleteGroup in interface IUserManagementService.GroupManager
Returns:
true if the group was removed as a result of this call

listGroupsByOrganization

public List<GroupModel> listGroupsByOrganization(String organizationName,
                                                 String adminUserId,
                                                 String password)
Description copied from interface: IUserManagementService.GroupManager
Lists all groups under an organization by organizationName

Specified by:
listGroupsByOrganization in interface IUserManagementService.GroupManager
Returns:
a List containing all groups by organization as a result of the call

listGroupsByUser

public List<GroupModel> listGroupsByUser(String userId,
                                         String organizationName,
                                         String adminUserId,
                                         String password)

updateGroup

public boolean updateGroup(GroupModel group,
                           String organizationName,
                           String adminUserId,
                           String password)
Description copied from interface: IUserManagementService.GroupManager
Updates group's attribute

Specified by:
updateGroup in interface IUserManagementService.GroupManager
Returns:
true if this group updated as a result of the call

updateGroupsOfOrganization

public boolean updateGroupsOfOrganization(List<String> groupsNameList,
                                          String organizationName,
                                          String adminUserId,
                                          String password)

deleteGroups

public boolean deleteGroups(String organizationName,
                            String adminUserId,
                            String password)
Description copied from interface: IUserManagementService.GroupManager
Deletes all present groups under an organization by organizationName

Specified by:
deleteGroups in interface IUserManagementService.GroupManager
Returns:
true if the group have been removed as a result of this call

removeAllUsers

public boolean removeAllUsers(String groupName,
                              String organizationName,
                              String adminUserId,
                              String password)
Description copied from interface: IUserManagementService.GroupManager
Removes all users with a specific groupName group (and by organizationName)

Specified by:
removeAllUsers in interface IUserManagementService.GroupManager
Returns:
true if the group was removed from all users as a result of this call

getGroup

public GroupModel getGroup(String groupName,
                           String organizationName,
                           String adminUserId,
                           String password)
Description copied from interface: IUserManagementService.GroupManager
Gets the group by groupName (and by organizatioName)

Specified by:
getGroup in interface IUserManagementService.GroupManager
Returns:
object with specified name GroupModel


Copyright © 2013. All Rights Reserved.