Package com.atlassian.confluence.user
Class ConfluenceUserManager
- java.lang.Object
-
- com.atlassian.confluence.user.ConfluenceUserManager
-
- All Implemented Interfaces:
UserExistenceChecker
,com.atlassian.user.EntityManager
,com.atlassian.user.UserManager
public class ConfluenceUserManager extends Object implements com.atlassian.user.UserManager, UserExistenceChecker
A UserManager which is aware of ConfluenceUser's and will take care of the ConfluenceUser specific persistence requirements before delegating to the "standard" UserManager
-
-
Constructor Summary
Constructors Constructor Description ConfluenceUserManager(com.atlassian.user.UserManager delegate, ConfluenceUserDao dao, com.atlassian.event.api.EventPublisher eventPublisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
alterPassword(com.atlassian.user.User user, String plainTextPass)
com.atlassian.user.User
createUser(com.atlassian.user.User userTemplate, com.atlassian.user.security.password.Credential credential)
com.atlassian.user.User
createUser(String username)
boolean
exists(String name)
A lightweight operation to check if a user exists for a given username.com.atlassian.user.repository.RepositoryIdentifier
getIdentifier()
com.atlassian.user.repository.RepositoryIdentifier
getRepository(com.atlassian.user.Entity entity)
com.atlassian.user.User
getUser(String username)
com.atlassian.user.search.page.Pager<String>
getUserNames()
com.atlassian.user.search.page.Pager<com.atlassian.user.User>
getUsers()
boolean
isCreative()
boolean
isReadOnly(com.atlassian.user.User user)
void
removeUser(com.atlassian.user.User user)
void
saveUser(com.atlassian.user.User user)
-
-
-
Constructor Detail
-
ConfluenceUserManager
public ConfluenceUserManager(com.atlassian.user.UserManager delegate, ConfluenceUserDao dao, com.atlassian.event.api.EventPublisher eventPublisher)
-
-
Method Detail
-
getIdentifier
public com.atlassian.user.repository.RepositoryIdentifier getIdentifier()
- Specified by:
getIdentifier
in interfacecom.atlassian.user.EntityManager
-
getRepository
public com.atlassian.user.repository.RepositoryIdentifier getRepository(com.atlassian.user.Entity entity) throws com.atlassian.user.EntityException
- Specified by:
getRepository
in interfacecom.atlassian.user.EntityManager
- Throws:
com.atlassian.user.EntityException
-
isCreative
public boolean isCreative()
- Specified by:
isCreative
in interfacecom.atlassian.user.EntityManager
-
getUsers
public com.atlassian.user.search.page.Pager<com.atlassian.user.User> getUsers() throws com.atlassian.user.EntityException
- Specified by:
getUsers
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
-
getUserNames
public com.atlassian.user.search.page.Pager<String> getUserNames() throws com.atlassian.user.EntityException
- Specified by:
getUserNames
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
-
getUser
public com.atlassian.user.User getUser(String username) throws com.atlassian.user.EntityException
- Specified by:
getUser
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
-
createUser
public com.atlassian.user.User createUser(String username) throws com.atlassian.user.EntityException
- Specified by:
createUser
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
-
createUser
public com.atlassian.user.User createUser(com.atlassian.user.User userTemplate, com.atlassian.user.security.password.Credential credential) throws com.atlassian.user.EntityException, UnsupportedOperationException, IllegalArgumentException
- Specified by:
createUser
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
UnsupportedOperationException
IllegalArgumentException
-
saveUser
public void saveUser(com.atlassian.user.User user) throws com.atlassian.user.EntityException, IllegalArgumentException
- Specified by:
saveUser
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
IllegalArgumentException
-
removeUser
public void removeUser(com.atlassian.user.User user) throws com.atlassian.user.EntityException, IllegalArgumentException
- Specified by:
removeUser
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
IllegalArgumentException
-
alterPassword
public void alterPassword(com.atlassian.user.User user, String plainTextPass) throws com.atlassian.user.EntityException
- Specified by:
alterPassword
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
-
isReadOnly
public boolean isReadOnly(com.atlassian.user.User user) throws com.atlassian.user.EntityException
- Specified by:
isReadOnly
in interfacecom.atlassian.user.UserManager
- Throws:
com.atlassian.user.EntityException
-
exists
public boolean exists(String name)
Description copied from interface:UserExistenceChecker
A lightweight operation to check if a user exists for a given username. Should be significantly more efficient than other operations that attempt to return an actual user object.- Specified by:
exists
in interfaceUserExistenceChecker
- Parameters:
name
- username of the user- Returns:
- true if a user exists with the given username
- Since:
- 7.18
-
-