public class UserServiceImpl extends BaseOpenStackService implements UserService
BaseOpenStackService.Invocation<R>
Constructor and Description |
---|
UserServiceImpl() |
Modifier and Type | Method and Description |
---|---|
ActionResponse |
changePassword(String userId,
String password)
Changes a password for the specified user by ID
|
User |
create(String tenantId,
String name,
String password,
String email,
boolean enabled)
Creates a new User
|
User |
create(User user)
Creates a User
|
ActionResponse |
delete(String userId)
Deletes a user by ID
|
User |
enableUser(String userId,
boolean enabled)
Enables/Disables a user by ID
|
User |
get(String userId)
Gets the detailed User information by ID
|
User |
getByName(String userName)
API added by @ Sandeep Kumar Singh
Gets detailed information about a specified user by name
|
List<? extends User> |
list()
Lists current users
|
List<? 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 identifier
|
User |
update(User user)
Updates a User
|
delete, deleteWithResponse, get, getProvider, getServiceVersion, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, request, toList, uri
public List<? extends User> list()
UserService
list
in interface UserService
public User get(String userId)
UserService
get
in interface UserService
userId
- the user idpublic List<? extends User> listTenantUsers(String tenantId)
UserService
listTenantUsers
in interface UserService
tenantId
- the tenant idpublic User create(String tenantId, String name, String password, String email, boolean enabled)
UserService
create
in interface UserService
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 enabledpublic User create(User user)
UserService
create
in interface UserService
user
- the user to createpublic ActionResponse delete(String userId)
UserService
delete
in interface UserService
userId
- the user idpublic User enableUser(String userId, boolean enabled)
UserService
enableUser
in interface UserService
userId
- the user idenabled
- true to enable the userpublic User update(User user)
UserService
update
in interface UserService
user
- the userpublic ActionResponse changePassword(String userId, String password)
UserService
changePassword
in interface UserService
userId
- the user idpassword
- the new passwordpublic List<? extends Role> listRoles(String userId)
UserService
listRoles
in interface UserService
userId
- the user idpublic List<? extends Role> listRoles(User user)
UserService
listRoles
in interface UserService
user
- the userpublic List<? extends Role> listRolesOnTenant(String userId, String tenantId)
UserService
listRolesOnTenant
in interface UserService
userId
- the user idtenantId
- the tenant idpublic List<? extends Role> listRolesOnCurrentTenant(User user)
UserService
listRolesOnCurrentTenant
in interface UserService
user
- the userpublic User getByName(String userName)
UserService
getByName
in interface UserService
userName
- the user nameCopyright © 2017. All rights reserved.