Class UserServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.identity.v3.internal.BaseIdentityServices
-
- org.openstack4j.openstack.identity.v3.internal.UserServiceImpl
-
- All Implemented Interfaces:
UserService,RestService
public class UserServiceImpl extends BaseIdentityServices implements UserService
implementation of v3 user service
-
-
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 originalPassword, String password)change password for user.Usercreate(String domainId, String name, String password, String email, boolean enabled)creates a new userUsercreate(User user)create a new userActionResponsedelete(String userId)delete a user by idUserget(String userId)gets detailed information about a specified user by idList<? extends User>getByName(String userName)get detailed information about users matching specified name across all domainsUsergetByName(String userName, String domainId)get detailed information about a user specified by username and domain idDomaingetUserDomain(String userId)List<? extends User>list()lists users.List<? extends Role>listDomainUserRoles(String userId, String domainId)list role assignment for specified user in domain contextList<? extends Role>listProjectUserRoles(String userId, String projectId)list role assignments for specified user in project contextList<? extends Group>listUserGroups(String userId)lists groups for a specified userList<? extends Project>listUserProjects(String userId)lists projects for a specified userUserupdate(User user)updates the password for or enables or disables a specified 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
-
get
public User get(String userId)
gets detailed information about a specified user by id- Specified by:
getin interfaceUserService- Parameters:
userId- the user id- Returns:
- the user
-
getByName
public List<? extends User> getByName(String userName)
get detailed information about users matching specified name across all domains- Specified by:
getByNamein interfaceUserService- Parameters:
userName- the user name- Returns:
- the of list users matching the name across all domains
-
getByName
public User getByName(String userName, String domainId)
get detailed information about a user specified by username and domain id- Specified by:
getByNamein interfaceUserService- Parameters:
userName- the user namedomainId- the domain identifier- Returns:
- the user or null if not found
-
getUserDomain
public Domain getUserDomain(String userId)
- Specified by:
getUserDomainin interfaceUserService- Parameters:
userId- the user id- Returns:
- the domain of the user
-
delete
public ActionResponse delete(String userId)
delete a user by id- Specified by:
deletein interfaceUserService- Returns:
- the action response
-
update
public User update(User user)
updates the password for or enables or disables a specified user.- Specified by:
updatein interfaceUserService- Parameters:
user- the user set to update- Returns:
- the updated user
-
create
public User create(User user)
create a new user- Specified by:
createin interfaceUserService- Parameters:
user- the user- Returns:
- the newly created user
-
create
public User create(String domainId, String name, String password, String email, boolean enabled)
creates a new user- Specified by:
createin interfaceUserService- Parameters:
domainId- the domain idname- the name of the new userpassword- the password of the new useremail- the email of the new userenabled- the enabled of the new user- Returns:
- the newly created user
-
listUserGroups
public List<? extends Group> listUserGroups(String userId)
lists groups for a specified user- Specified by:
listUserGroupsin interfaceUserService- Parameters:
userId- the user id- Returns:
- list of groups for a user
-
listUserProjects
public List<? extends Project> listUserProjects(String userId)
lists projects for a specified user- Specified by:
listUserProjectsin interfaceUserService- Returns:
- list of projects for a user
-
list
public List<? extends User> list()
lists users.- Specified by:
listin interfaceUserService- Returns:
- list of users
-
listProjectUserRoles
public List<? extends Role> listProjectUserRoles(String userId, String projectId)
list role assignments for specified user in project context- Specified by:
listProjectUserRolesin interfaceUserService- Parameters:
userId- the user id- Returns:
- list of role assignments for specified user
-
listDomainUserRoles
public List<? extends Role> listDomainUserRoles(String userId, String domainId)
list role assignment for specified user in domain context- Specified by:
listDomainUserRolesin interfaceUserService- Parameters:
userId- the user identifierdomainId- the domain identifier- Returns:
- list of role assignments for specified user and domain
-
changePassword
public ActionResponse changePassword(String userId, String originalPassword, String password)
change password for user.- Specified by:
changePasswordin interfaceUserService- Parameters:
userId- the user identifieroriginalPassword- the original passwordpassword- the new password- Returns:
- the action response
-
-