|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.user.impl.ehcache.EhcacheUserManager
public class EhcacheUserManager
| Field Summary | |
|---|---|
protected CacheManager |
cacheManager
|
static String |
REPOSITORY_CACHE
|
protected UserManager |
underlyingUserManager
|
static String |
USER_CACHE
|
static String |
USER_READ_ONLY_CACHE
|
| Constructor Summary | |
|---|---|
EhcacheUserManager(UserManager underlyingUserManager,
CacheManager cacheManager)
|
|
| 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)
|
Repository |
getRepository()
|
Repository |
getRepository(Entity entity)
|
User |
getUser(String username)
Caches users retrieved. Will also cache the fact that a user could not be found (so that we don't incur the expense of another search when have previously determined that a user doesn't exist) Hence this method will also cache null results. |
Pager |
getUserNames()
|
Pager |
getUsers()
|
void |
init(HashMap args)
Used during configuration initialization. |
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 group, if it is present. |
void |
saveUser(User user)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String USER_CACHE
public static final String USER_READ_ONLY_CACHE
public static final String REPOSITORY_CACHE
protected final UserManager underlyingUserManager
protected final CacheManager cacheManager
| Constructor Detail |
|---|
public EhcacheUserManager(UserManager underlyingUserManager,
CacheManager cacheManager)
| Method Detail |
|---|
public Pager getUsers()
throws EntityException
getUsers in interface UserManagerPager holding all users being managed.
EntityException
public Pager 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 UserManagerusername -
User 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
createUser in interface UserManagerusername -
UnsupportedOperationException
EntityException - UnsupportedOperationException (optional)
public void alterPassword(User user,
String plainTextPass)
throws EntityException
alterPassword in interface UserManageruser - plainTextPass -
EntityException - - representing a system error.
public void saveUser(User user)
throws EntityException
saveUser in interface UserManageruser -
EntityException
public void removeUser(User user)
throws EntityException
removeUser in interface UserManageruser -
EntityException - - prohibited removal
public boolean isReadOnly(User user)
throws EntityException
isReadOnly in interface UserManageruser -
Repository),
false indicates that the storage system will save changes or that this UserManager does not
know about the User.
EntityExceptionpublic Repository getRepository()
getRepository in interface EntityManagerPasswordEncryptor which handles the encrypytion of passwords for users managed by this
object.
UnsupportedOperationException - - for UserManager objects which do not create User objects.
public Repository getRepository(Entity entity)
throws EntityException
getRepository in interface EntityManagerentity -
Repository 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.public void init(HashMap args)
init in interface EntityManagerargs -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||