public interface UserAccountManager
UserAccount
instances.Modifier and Type | Method and Description |
---|---|
void |
changePassword(UserAccount userAccount,
String password)
Changes the password of the
UserAccount . |
boolean |
contains(UserAccountIdentifier userAccountIdentifier)
Checks if an
UserAccount exists. |
UserAccount |
create(String userName,
String password,
Role... roles)
Creates a new
UserAccount and persists it right away. |
void |
disable(UserAccountIdentifier userAccountIdentifier)
Disables the
UserAccount . |
void |
enable(UserAccountIdentifier userAccountIdentifier)
Enables the
UserAccount . |
Streamable<UserAccount> |
findAll()
Finds all
UserAccount s. |
Optional<UserAccount> |
findByUsername(String username)
Returns the user with the given user name.
|
Streamable<UserAccount> |
findDisabled()
Finds only disabled
UserAccount s. |
Streamable<UserAccount> |
findEnabled()
Finds only enabled
UserAccount s. |
Optional<UserAccount> |
get(UserAccountIdentifier userAccountIdentifier)
Returns an
UserAccount for a given identifier. |
UserAccount |
save(UserAccount userAccount)
Saves the
UserAccount |
UserAccount create(String userName, String password, Role... roles)
UserAccount
and persists it right away.userName
- the unique name of the user, the name is also used as login name.password
- the passwordroles
- zero or more rolesUserAccount
, will never be null.NullPointerException
- if userName, password or roles is nullOptional<UserAccount> get(UserAccountIdentifier userAccountIdentifier)
UserAccount
for a given identifier.userAccountIdentifier
- UserAccount save(UserAccount userAccount)
UserAccount
userAccount
- void enable(UserAccountIdentifier userAccountIdentifier)
UserAccount
.userAccountIdentifier
- void disable(UserAccountIdentifier userAccountIdentifier)
UserAccount
.userAccountIdentifier
- void changePassword(UserAccount userAccount, String password)
UserAccount
.userAccount
- password
- boolean contains(UserAccountIdentifier userAccountIdentifier)
UserAccount
exists.userAccountIdentifier
- Streamable<UserAccount> findAll()
UserAccount
s.Streamable<UserAccount> findEnabled()
UserAccount
s.Streamable<UserAccount> findDisabled()
UserAccount
s.Optional<UserAccount> findByUsername(String username)
username
- must not be null or empty.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.