Class UserServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.identity.v2.internal.UserServiceImpl
-
- All Implemented Interfaces:
UserService
public class UserServiceImpl extends BaseOpenStackService implements UserService
Identity User based Operations- Author:
- Jeremy Unruh
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description UserServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionResponsechangePassword(String userId, String password)Changes a password for the specified user by IDUsercreate(String tenantId, String name, String password, String email, boolean enabled)Creates a new UserUsercreate(User user)Creates a UserActionResponsedelete(String userId)Deletes a user by IDUserenableUser(String userId, boolean enabled)Enables/Disables a user by IDUserget(String userId)Gets the detailed User information by IDUsergetByName(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 identifierUserupdate(User user)Updates a User-
Methods inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
delete, deleteWithResponse, get, getProvider, getServiceVersion, getWithResponse, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, putWithResponse, request, toList, uri
-
-
-
-
Method Detail
-
list
public List<? extends User> list()
Description copied from interface:UserServiceLists current users- Specified by:
listin interfaceUserService- Returns:
- List of User
-
get
public User get(String userId)
Description copied from interface:UserServiceGets the detailed User information by ID- Specified by:
getin interfaceUserService- Parameters:
userId- the user id- Returns:
- the user
-
listTenantUsers
public List<? extends User> listTenantUsers(String tenantId)
Description copied from interface:UserServiceList users who are associated with the given tenant identifier- Specified by:
listTenantUsersin interfaceUserService- Parameters:
tenantId- the tenant id- Returns:
- List of User
-
create
public User create(String tenantId, String name, String password, String email, boolean enabled)
Description copied from interface:UserServiceCreates a new User- Specified by:
createin interfaceUserService- 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
public User create(User user)
Description copied from interface:UserServiceCreates a User- Specified by:
createin interfaceUserService- Parameters:
user- the user to create- Returns:
- the newly created user
-
delete
public ActionResponse delete(String userId)
Description copied from interface:UserServiceDeletes a user by ID- Specified by:
deletein interfaceUserService- Parameters:
userId- the user id- Returns:
- the action response
-
enableUser
public User enableUser(String userId, boolean enabled)
Description copied from interface:UserServiceEnables/Disables a user by ID- Specified by:
enableUserin interfaceUserService- Parameters:
userId- the user idenabled- true to enable the user- Returns:
- the updated User
-
update
public User update(User user)
Description copied from interface:UserServiceUpdates a User- Specified by:
updatein interfaceUserService- Parameters:
user- the user- Returns:
- the updated user
-
changePassword
public ActionResponse changePassword(String userId, String password)
Description copied from interface:UserServiceChanges a password for the specified user by ID- Specified by:
changePasswordin interfaceUserService- Parameters:
userId- the user idpassword- the new password- Returns:
- the action response
-
listRoles
public List<? extends Role> listRoles(String userId)
Description copied from interface:UserServiceLists global roles for a specified user. Excludes tenant roles- Specified by:
listRolesin interfaceUserService- Parameters:
userId- the user id- Returns:
- List of Role
-
listRoles
public List<? extends Role> listRoles(User user)
Description copied from interface:UserServiceLists global roles for a specified user. Excludes tenant roles.- Specified by:
listRolesin interfaceUserService- Parameters:
user- the user- Returns:
- List of Role
-
listRolesOnTenant
public List<? extends Role> listRolesOnTenant(String userId, String tenantId)
Description copied from interface:UserServiceLists the tenant roles for a specified user.- Specified by:
listRolesOnTenantin interfaceUserService- Parameters:
userId- the user idtenantId- the tenant id- Returns:
- List of Role
-
listRolesOnCurrentTenant
public List<? extends Role> listRolesOnCurrentTenant(User user)
Description copied from interface:UserServiceList roles on current tenant (default tenant for the given user)- Specified by:
listRolesOnCurrentTenantin interfaceUserService- Parameters:
user- the user- Returns:
- List of Role
-
getByName
public User getByName(String userName)
Description copied from interface:UserServiceAPI added by @ Sandeep Kumar Singh Gets detailed information about a specified user by name- Specified by:
getByNamein interfaceUserService- Parameters:
userName- the user name- Returns:
- the user
-
-