it.eng.rdlab.soa3.um.rest
Interface IUserManagementService.UserManager

All Known Implementing Classes:
UserManagerImpl
Enclosing interface:
IUserManagementService

public static interface IUserManagementService.UserManager

The user interface in the user management hierarchy.

Version:
1.0
Author:
Ermanno Travaglino

Field Summary
static int CHANGE_PASSWORD_EQUAL_PASSWORDS
          Status code of user credentials' change operation
static int CHANGE_PASSWORD_GENERIC_ERROR
          Status code of user credentials' change operation
static int CHANGE_PASSWORD_INVALID_NEW_PASSWORD
          Status code of user credentials' change operation
static int CHANGE_PASSWORD_OK
          Status code of user credentials' change operation
static int CHANGE_PASSWORD_USER_NOT_FOUND
          Status code of user credentials' change operation
static int CHANGE_PASSWORD_WRONG_USER_PASSWORD
          Status code of user credentials' change operation
 
Method Summary
 boolean addUserToGroup(String userId, String groupName, String organizationName, String adminUserId, String adminPassword)
          Adds an user, by userId, to a group, by groupName (and organizationName)
 boolean assignRoleToUser(String roleName, String userId, String organizationName, String adminUserId, String adminPassword)
          Assigns a role, by roleName, to an user, by userId (and organizationName)
 int changePassword(String userId, String oldPassword, String newPassword, String organizationName, String adminUserId, String adminPassword)
          Changes user's password by userId and old/newPassword (and organizationName)
 String createUser(UserModel user, String organizationName, String adminUserId, String adminPassword)
          Creates a new user by UserModel (and organizationName)
 boolean deleteUser(String userId, String organizationName, String adminUserId, String adminPassword)
          Deletes an user by userId (and organizationName)
 boolean deleteUsers(String organizationId, String adminUserId, String adminPassword)
          Deletes all users under an organization by organizationId
 boolean dismissRoleToUser(String roleName, String userId, String organizationName, String adminUserId, String adminPassword)
          Dismisses a role, by roleName, to an user, by userId (and organizationName)
 UserModel getUser(String userId, String organizationName, String adminUserId, String adminPassword)
          Gets user by userId (and organizationName)
 HashMap<UserModel,List<GroupModel>> listAllUsersAndGroups(String organizationName, String adminUserId, String adminPassword)
          Lists all users with the associated groups (by organizationName)
 HashMap<UserModel,List<RoleModel>> listAllUsersAndRoles(String organizationName, String adminUserId, String adminPassword)
          Lists all users with the associated roles (by organizationName)
 List<UserModel> listUsers(String adminUserId, String adminPassword)
          Lists all present users
 List<UserModel> listUsersByAttribute(Map<String,String> attributes, String adminUserId, String adminPassword)
          Lists all the users with the attributes send as parameters
 List<UserModel> listUsersByGroup(String groupName, String organizationName, String adminUserId, String adminPassword)
          Lists all users with the groupName group
 List<UserModel> listUsersByOrganization(String organizationName, String adminUserId, String adminPassword)
          Lists all users under an organization by organizationName
 List<UserModel> listUsersByOrganizationAndAttributes(String organizationName, Map<String,String> attributes, String adminUserId, String adminPassword)
          Lists all users under an organization by organizationName
 List<UserModel> listUsersByRole(String roleName, String organizationName, String adminUserId, String adminPassword)
          Lists all users with the roleName role
 boolean removeUserFromGroup(String userId, String groupName, String organizationName, String adminUserId, String adminPassword)
          Removes an user, by userId, from a group, by groupName (and organizationName)
 boolean updateUser(UserModel user, String organizationName, String adminUserId, String adminPassword)
          Updates user's attributes
 

Field Detail

CHANGE_PASSWORD_OK

static final int CHANGE_PASSWORD_OK
Status code of user credentials' change operation

See Also:
Constant Field Values

CHANGE_PASSWORD_WRONG_USER_PASSWORD

static final int CHANGE_PASSWORD_WRONG_USER_PASSWORD
Status code of user credentials' change operation

See Also:
Constant Field Values

CHANGE_PASSWORD_EQUAL_PASSWORDS

static final int CHANGE_PASSWORD_EQUAL_PASSWORDS
Status code of user credentials' change operation

See Also:
Constant Field Values

CHANGE_PASSWORD_INVALID_NEW_PASSWORD

static final int CHANGE_PASSWORD_INVALID_NEW_PASSWORD
Status code of user credentials' change operation

See Also:
Constant Field Values

CHANGE_PASSWORD_USER_NOT_FOUND

static final int CHANGE_PASSWORD_USER_NOT_FOUND
Status code of user credentials' change operation

See Also:
Constant Field Values

CHANGE_PASSWORD_GENERIC_ERROR

static final int CHANGE_PASSWORD_GENERIC_ERROR
Status code of user credentials' change operation

See Also:
Constant Field Values
Method Detail

createUser

String createUser(UserModel user,
                  String organizationName,
                  String adminUserId,
                  String adminPassword)
Creates a new user by UserModel (and organizationName)

Parameters:
user -
organizationName -
adminUserId -
adminPassword -
Returns:
user creation process response String

deleteUser

boolean deleteUser(String userId,
                   String organizationName,
                   String adminUserId,
                   String adminPassword)
Deletes an user by userId (and organizationName)

Parameters:
userId -
organizationName -
adminUserId -
adminPassword -
Returns:
true if the user was removed as a result of this call

changePassword

int changePassword(String userId,
                   String oldPassword,
                   String newPassword,
                   String organizationName,
                   String adminUserId,
                   String adminPassword)
Changes user's password by userId and old/newPassword (and organizationName)

Parameters:
userId -
oldPassword -
newPassword -
organizationName -
adminUserId -
adminPassword -
Returns:
status code as a result of this call

deleteUsers

boolean deleteUsers(String organizationId,
                    String adminUserId,
                    String adminPassword)
Deletes all users under an organization by organizationId

Parameters:
organizationId -
adminUserId -
adminPassword -
Returns:
true if the users have been removed as a result of this call

getUser

UserModel getUser(String userId,
                  String organizationName,
                  String adminUserId,
                  String adminPassword)
Gets user by userId (and organizationName)

Parameters:
userId -
organizationName -
adminUserId -
adminPassword -
Returns:
object with specified name UserModel

updateUser

boolean updateUser(UserModel user,
                   String organizationName,
                   String adminUserId,
                   String adminPassword)
Updates user's attributes

Parameters:
userId -
organizationName -
adminUserId -
adminPassword -
Returns:
true if this user updated as a result of the call

listUsersByAttribute

List<UserModel> listUsersByAttribute(Map<String,String> attributes,
                                     String adminUserId,
                                     String adminPassword)
Lists all the users with the attributes send as parameters

Parameters:
attributes - key-value couple of the attributes
adminUserId -
adminPassword -
Returns:
a List containing all users

listUsers

List<UserModel> listUsers(String adminUserId,
                          String adminPassword)
Lists all present users

Parameters:
adminUserId -
adminPassword -
Returns:
a List containing all users

listUsersByOrganization

List<UserModel> listUsersByOrganization(String organizationName,
                                        String adminUserId,
                                        String adminPassword)
Lists all users under an organization by organizationName

Parameters:
organizationName -
adminUserId -
adminPassword -
Returns:
a List containing all users by organization as a result of the call

listUsersByOrganizationAndAttributes

List<UserModel> listUsersByOrganizationAndAttributes(String organizationName,
                                                     Map<String,String> attributes,
                                                     String adminUserId,
                                                     String adminPassword)
Lists all users under an organization by organizationName

Parameters:
organizationName -
attributes - key-value couple of the attributes
adminUserId -
adminPassword -
Returns:
a List containing all users by organization as a result of the call

listUsersByRole

List<UserModel> listUsersByRole(String roleName,
                                String organizationName,
                                String adminUserId,
                                String adminPassword)
Lists all users with the roleName role

Parameters:
roleName -
organizationName -
adminUserId -
adminPassword -
Returns:
a List containing all users by role as a result of the call

listUsersByGroup

List<UserModel> listUsersByGroup(String groupName,
                                 String organizationName,
                                 String adminUserId,
                                 String adminPassword)
Lists all users with the groupName group

Parameters:
groupName -
organizationName -
adminUserId -
adminPassword -
Returns:
a List containing all users by group as a result of the call

listAllUsersAndRoles

HashMap<UserModel,List<RoleModel>> listAllUsersAndRoles(String organizationName,
                                                        String adminUserId,
                                                        String adminPassword)
Lists all users with the associated roles (by organizationName)

Parameters:
organizationName -
adminUserId -
adminPassword -
Returns:
an HashMap containing all users and associated roles as a result of the call

listAllUsersAndGroups

HashMap<UserModel,List<GroupModel>> listAllUsersAndGroups(String organizationName,
                                                          String adminUserId,
                                                          String adminPassword)
Lists all users with the associated groups (by organizationName)

Parameters:
groupName -
organizationName -
adminUserId -
adminPassword -
Returns:
an HashMap containing all users and associated groups as a result of the call

assignRoleToUser

boolean assignRoleToUser(String roleName,
                         String userId,
                         String organizationName,
                         String adminUserId,
                         String adminPassword)
Assigns a role, by roleName, to an user, by userId (and organizationName)

Parameters:
roleName -
userId -
organizationName -
adminUserId -
adminPassword -
Returns:
true if the user's role has been assigned as a result of the call

dismissRoleToUser

boolean dismissRoleToUser(String roleName,
                          String userId,
                          String organizationName,
                          String adminUserId,
                          String adminPassword)
Dismisses a role, by roleName, to an user, by userId (and organizationName)

Parameters:
roleName -
userId -
organizationName -
adminUserId -
adminPassword -
Returns:
true if the user's role has been dismissed as a result of the call

addUserToGroup

boolean addUserToGroup(String userId,
                       String groupName,
                       String organizationName,
                       String adminUserId,
                       String adminPassword)
Adds an user, by userId, to a group, by groupName (and organizationName)

Parameters:
groupName -
userId -
organizationName -
adminUserId -
adminPassword -
Returns:
true if the user has been added to group as a result of the call

removeUserFromGroup

boolean removeUserFromGroup(String userId,
                            String groupName,
                            String organizationName,
                            String adminUserId,
                            String adminPassword)
Removes an user, by userId, from a group, by groupName (and organizationName)

Parameters:
groupName -
userId -
organizationName -
adminUserId -
adminPassword -
Returns:
true if the user has been removed from group as a result of the call


Copyright © 2013. All Rights Reserved.