|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.user.impl.delegation.DelegatingUserManager
public class DelegatingUserManager
| Constructor Summary | |
|---|---|
DelegatingUserManager(List<UserManager> userManagers)
|
|
| 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()
|
protected UserManager |
getMatchingUserManager(User user)
Helper method to locate the first userManager responsible for the given user, in the delegation. |
RepositoryIdentifier |
getRepository(Entity entity)
|
User |
getUser(String username)
|
List |
getUserManagers()
|
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 DelegatingUserManager(List<UserManager> userManagers)
| Method Detail |
|---|
public Pager<User> getUsers()
throws EntityException
getUsers in interface UserManagerPager holding all users being managed.
EntityException
public Pager<String> getUserNames()
throws EntityException
getUserNames in interface UserManagerPager holding the names of all users being managed.
EntityException
public User getUser(String username)
throws EntityException
getUser in interface UserManagerUser if one could be found, otherwise null.
EntityException - - representing the exception which prohibited looking for or
retrieving the user.
public User createUser(String username)
throws EntityException
UserManager
createUser in interface UserManagerEntityException - If user cannot be created in any user managers.
DuplicateEntityException - if a user with the username already exists.
public void alterPassword(User user,
String plainTextPass)
throws EntityException
alterPassword in interface UserManagerEntityException
public void saveUser(User user)
throws EntityException
UserManagerUser.setEmail(String), User.setFullName(String) or User.setPassword(String).
saveUser in interface UserManagerEntityException
public void removeUser(User user)
throws EntityException
UserManager
removeUser in interface UserManagerEntityException
public boolean isReadOnly(User user)
throws EntityException
isReadOnly in interface UserManagerRepositoryIdentifier),
false indicates that the storage system will save changes or that this UserManager does not
know about the User.
EntityExceptionpublic RepositoryIdentifier getIdentifier()
getIdentifier in interface EntityManagerRepositoryIdentifier which is managed by this instance.
public RepositoryIdentifier getRepository(Entity entity)
throws EntityException
getRepository in interface EntityManagerRepositoryIdentifier in which the entity is stored, otherwise null.
EntityExceptionpublic boolean isCreative()
UserManager.createUser(String) or
GroupManager.createGroup(String)
isCreative in interface EntityManagerEntity objects can be created by this manager, or false to indicate
not.
protected UserManager getMatchingUserManager(User user)
throws EntityException
EntityExceptionpublic List getUserManagers()
UserManagers which this manager delegates to,
in the order of delegation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||