Package org.openstack4j.api.identity.v2
Interface UserService
-
- All Known Implementing Classes:
UserServiceImpl
public interface UserService
Identity User based Operations- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActionResponse
changePassword(String userId, String password)
Changes a password for the specified user by IDUser
create(String tenantId, String name, String password, String email, boolean enabled)
Creates a new UserUser
create(User user)
Creates a UserActionResponse
delete(String userId)
Deletes a user by IDUser
enableUser(String userId, boolean enabled)
Enables/Disables a user by IDUser
get(String userId)
Gets the detailed User information by IDUser
getByName(String userName)
API added by @ Sandeep Kumar Singh Gets detailed information about a specified user by nameList<? extends User>
list()
Lists current usersList<? extends Role>
listRoles(String userId)
Lists global roles for a specified user.List<? extends Role>
listRoles(User user)
Lists global roles for a specified user.List<? extends Role>
listRolesOnCurrentTenant(User user)
List roles on current tenant (default tenant for the given user)List<? extends Role>
listRolesOnTenant(String userId, String tenantId)
Lists the tenant roles for a specified user.List<? extends User>
listTenantUsers(String tenantId)
List users who are associated with the given tenant identifierUser
update(User user)
Updates a User
-
-
-
Method Detail
-
get
User get(String userId)
Gets the detailed User information by ID- Parameters:
userId
- the user id- Returns:
- the user
-
getByName
User getByName(String userName)
API added by @ Sandeep Kumar Singh Gets detailed information about a specified user by name- Parameters:
userName
- the user name- Returns:
- the user
-
listTenantUsers
List<? extends User> listTenantUsers(String tenantId)
List users who are associated with the given tenant identifier- Parameters:
tenantId
- the tenant id- Returns:
- List of User
-
create
User create(String tenantId, String name, String password, String email, boolean enabled)
Creates a new User- Parameters:
tenantId
- the tenant idname
- the name of the userpassword
- the password for the useremail
- the email address of the userenabled
- if true the user will be immediately enabled- Returns:
- the newly created user
-
create
User create(User user)
Creates a User- Parameters:
user
- the user to create- Returns:
- the newly created user
-
delete
ActionResponse delete(String userId)
Deletes a user by ID- Parameters:
userId
- the user id- Returns:
- the action response
-
enableUser
User enableUser(String userId, boolean enabled)
Enables/Disables a user by ID- Parameters:
userId
- the user idenabled
- true to enable the user- Returns:
- the updated User
-
changePassword
ActionResponse changePassword(String userId, String password)
Changes a password for the specified user by ID- Parameters:
userId
- the user idpassword
- the new password- Returns:
- the action response
-
listRoles
List<? extends Role> listRoles(String userId)
Lists global roles for a specified user. Excludes tenant roles- Parameters:
userId
- the user id- Returns:
- List of Role
-
listRoles
List<? extends Role> listRoles(User user)
Lists global roles for a specified user. Excludes tenant roles.- Parameters:
user
- the user- Returns:
- List of Role
-
listRolesOnTenant
List<? extends Role> listRolesOnTenant(String userId, String tenantId)
Lists the tenant roles for a specified user.- Parameters:
userId
- the user idtenantId
- the tenant id- Returns:
- List of Role
-
-