|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.user.impl.memory.MemoryUserManager
public class MemoryUserManager
| Constructor Summary | |
|---|---|
MemoryUserManager(RepositoryIdentifier repository,
MemoryProvider provider,
PasswordEncryptor passwordEncryptor)
|
|
| Method Summary | |
|---|---|
void |
alterPassword(User user,
String plainTextPass)
Encrypts the plain password, sets it on the user, and saves the user. |
User |
createUser(String username)
Creates a new user with the username provided. |
RepositoryIdentifier |
getIdentifier()
|
RepositoryIdentifier |
getRepository(Entity entity)
|
User |
getUser(String username)
|
Pager<String> |
getUserNames()
|
Pager<User> |
getUsers()
|
boolean |
isCreative()
Used to detemine whether an entity can be created (eg, can call UserManager.createUser(String) or
GroupManager.createGroup(String). |
boolean |
isReadOnly(User user)
|
void |
removeUser(User user)
Removes the specified user from the repository. |
void |
saveUser(User user)
Persists any changes made to the user to the storage system used by this user manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryUserManager(RepositoryIdentifier repository,
MemoryProvider provider,
PasswordEncryptor passwordEncryptor)
| Method Detail |
|---|
public Pager<User> getUsers()
getUsers in interface UserManagerPager holding all users being managed.
public Pager<String> getUserNames()
throws EntityException
getUserNames in interface UserManagerPager holding the names of all users being managed.
EntityExceptionpublic User getUser(String username)
getUser in interface UserManagernull or a User if one could be found.
public User createUser(String username)
throws EntityException
UserManager
createUser in interface UserManagerUser object representing the new user.
DuplicateEntityException - if a user with the username already exists.
EntityException
public void alterPassword(User user,
String plainTextPass)
throws EntityException
alterPassword in interface UserManagerEntityException
public void removeUser(User user)
throws EntityException
UserManager
removeUser in interface UserManagerEntityExceptionpublic boolean isReadOnly(User user)
isReadOnly in interface UserManagerRepositoryIdentifier),
false indicates that the storage system will save changes or that this UserManager does not
know about the User.
public void saveUser(User user)
throws EntityException
UserManagerUser.setEmail(String), User.setFullName(String) or User.setPassword(String).
saveUser in interface UserManagerEntityExceptionpublic RepositoryIdentifier getIdentifier()
getIdentifier in interface EntityManagerRepositoryIdentifier which is managed by this instance.
public RepositoryIdentifier getRepository(Entity entity)
throws EntityException
getRepository in interface EntityManagerRepositoryIdentifier of the repository in which the entity is stored, or null
if the entity cannot be found.
EntityException - if the entity cannot be found, or trying to retrieve it results in an errorpublic boolean isCreative()
EntityManagerUserManager.createUser(String) or
GroupManager.createGroup(String).
isCreative in interface EntityManagerEntity objects can be created by this manager, or false to indicate
not.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||