public abstract class DefaultUserAccessor extends Object implements UserAccessor
Modifier and Type | Field and Description |
---|---|
String |
DEFAULT_GROUP_NAME
Deprecated.
since 3.5 not used in Confluence
|
com.atlassian.user.Group |
defaultGroup |
Modifier | Constructor and Description |
---|---|
protected |
DefaultUserAccessor(com.atlassian.user.configuration.RepositoryAccessor repositoryAccessor) |
Modifier and Type | Method and Description |
---|---|
com.atlassian.user.Group |
addGroup(String name)
Creates a group with the specified name and returns it.
|
void |
addMembership(com.atlassian.user.Group group,
com.atlassian.user.User user) |
void |
addMembership(String groupname,
String username) |
com.atlassian.user.User |
addUser(String username,
String password,
String email,
String fullname) |
com.atlassian.user.User |
addUser(String username,
String password,
String email,
String fullname,
String[] groups)
Deprecated.
since 3.5 use
createUser(User, Credential) and addMembership(Group, User) |
void |
alterPassword(com.atlassian.user.User user,
String plainTextPassword) |
boolean |
authenticate(String username,
String password) |
com.atlassian.user.Group |
createGroup(String groupname)
Note that this method creates a group with case sensitive name.
|
com.atlassian.user.User |
createUser(String username) |
com.atlassian.user.User |
createUser(com.atlassian.user.User userTemplate,
com.atlassian.user.security.password.Credential credential) |
com.atlassian.user.search.SearchResult<com.atlassian.user.Group> |
findGroups(com.atlassian.user.search.query.Query<com.atlassian.user.Group> query)
Generates a
SearchResult object for each repository the
entityQueryParser can search. |
com.atlassian.user.search.SearchResult<com.atlassian.user.Group> |
findGroups(com.atlassian.user.search.query.Query<com.atlassian.user.Group> query,
com.atlassian.user.search.query.QueryContext context)
Allows specification of
QueryContext . |
com.atlassian.user.search.SearchResult<com.atlassian.user.User> |
findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> query) |
com.atlassian.user.search.SearchResult<com.atlassian.user.User> |
findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> query,
com.atlassian.user.search.query.QueryContext context)
Allows specification of
QueryContext . |
protected com.atlassian.user.security.authentication.Authenticator |
getAuthenticator() |
List<com.atlassian.user.repository.RepositoryIdentifier> |
getDelegatingRepositories()
Deprecated.
since 3.5 not used anywhere
|
protected com.atlassian.user.search.query.EntityQueryParser |
getEntityQueryParser() |
com.atlassian.user.search.page.Pager<String> |
getExternallMembers(com.atlassian.user.Group group) |
com.atlassian.user.Group |
getGroup(String name)
Returns the group with the specified name, or
null if the user doesn't exist or the name is null . |
com.atlassian.user.Group |
getGroupCreateIfNecessary(String name)
Get a group - and if it does not exist, create it first.
|
protected com.atlassian.user.GroupManager |
getGroupManager() |
com.atlassian.user.search.page.Pager<com.atlassian.user.Group> |
getGroups()
Returns a pager of all groups in the system.
|
com.atlassian.user.search.page.Pager<com.atlassian.user.Group> |
getGroups(com.atlassian.user.User user) |
com.atlassian.user.search.page.Pager<String> |
getLocalMembers(com.atlassian.user.Group group) |
com.atlassian.user.search.page.Pager<String> |
getMemberNames(com.atlassian.user.Group group)
Returns a pager containing the usernames of users who are members of the specified group
(either directly or as a member of a nested group).
|
com.opensymphony.module.propertyset.PropertySet |
getPropertySet(com.atlassian.user.User user) |
protected com.atlassian.user.properties.PropertySetFactory |
getPropertySetFactory() |
com.atlassian.user.repository.RepositoryIdentifier |
getRepository(com.atlassian.user.Entity entity) |
com.atlassian.user.User |
getUser(String name)
Deprecated.
since 5.2. Use Confluence core UserAccessor.getUserByName(String) instead.
|
protected com.atlassian.user.UserManager |
getUserManager() |
com.atlassian.user.search.page.Pager<String> |
getUserNames()
Returns a pager of all usernames in the system.
|
com.atlassian.core.user.preferences.UserPreferences |
getUserPreferences(com.atlassian.user.User user) |
com.atlassian.user.search.page.Pager<com.atlassian.user.User> |
getUsers()
Returns a pager of all users in the system.
|
com.atlassian.user.search.SearchResult |
getUsersByEmail(String email) |
boolean |
hasMembership(com.atlassian.user.Group group,
com.atlassian.user.User user)
Returns
true if the specified user and group both exist, and the user is a member of the
group (either directly or as a member of a nested group). |
boolean |
hasMembership(String groupName,
String username)
Returns
true if the specified user and group both exist, and the user is a member of the
group (either directly or as a member of a nested group). |
boolean |
isLicensedToAddMoreUsers() |
boolean |
isUserRemovable(com.atlassian.user.User user) |
void |
removeGroup(com.atlassian.user.Group group)
Removes the specified group.
|
boolean |
removeMembership(com.atlassian.user.Group group,
com.atlassian.user.User user) |
boolean |
removeMembership(String groupname,
String username) |
void |
removeUser(com.atlassian.user.User user)
Removes the specified user.
|
void |
saveUser(com.atlassian.user.User user)
Persists changes made to a user (e.g.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deactivateUser, getUsersWithConfluenceAccess, isDeactivated, isDeactivated, reactivateUser
public com.atlassian.user.Group defaultGroup
@Deprecated public final String DEFAULT_GROUP_NAME
protected DefaultUserAccessor(com.atlassian.user.configuration.RepositoryAccessor repositoryAccessor)
public com.atlassian.user.repository.RepositoryIdentifier getRepository(com.atlassian.user.Entity entity) throws com.atlassian.user.EntityException
getRepository
in interface UserAccessor
com.atlassian.user.EntityException
@Deprecated public com.atlassian.user.User addUser(String username, String password, String email, String fullname, String[] groups)
createUser(User, Credential)
and addMembership(Group, User)
addUser
in interface UserAccessor
public com.atlassian.user.User addUser(String username, String password, String email, String fullname)
addUser
in interface UserAccessor
public com.atlassian.user.User createUser(com.atlassian.user.User userTemplate, com.atlassian.user.security.password.Credential credential)
createUser
in interface UserAccessor
public com.atlassian.user.search.page.Pager<String> getUserNames()
UserAccessor
UserAccessor.findUsers(Query)
or the CrowdService API instead.getUserNames
in interface UserAccessor
public com.atlassian.user.search.page.Pager<com.atlassian.user.User> getUsers()
UserAccessor
UserAccessor.findUsers(Query)
or the CrowdService API instead.getUsers
in interface UserAccessor
@Deprecated public com.atlassian.user.User getUser(String name)
UserAccessor
null
if the user doesn't exist or the name is null
.
Note that username lookups are case-insensitive, so the user you get back may not have exactly the same
name as the name passed to this method.getUser
in interface UserAccessor
public com.atlassian.user.search.page.Pager<com.atlassian.user.Group> getGroups()
UserAccessor
EntityQueryParser.findGroups(Query)
or the CrowdService API instead.getGroups
in interface UserAccessor
public com.atlassian.user.Group addGroup(String name)
UserAccessor
addGroup
in interface UserAccessor
public void removeGroup(com.atlassian.user.Group group)
UserAccessor
removeGroup
in interface UserAccessor
public void removeUser(com.atlassian.user.User user)
UserAccessor
removeUser
in interface UserAccessor
public void saveUser(com.atlassian.user.User user)
UserAccessor
saveUser
in interface UserAccessor
public com.atlassian.user.search.SearchResult<com.atlassian.user.User> findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> query) throws com.atlassian.user.EntityException
findUsers
in interface UserAccessor
findUsers
in interface com.atlassian.user.search.query.EntityQueryParser
com.atlassian.user.EntityException
public com.atlassian.user.search.SearchResult<com.atlassian.user.Group> findGroups(com.atlassian.user.search.query.Query<com.atlassian.user.Group> query) throws com.atlassian.user.EntityException
SearchResult
object for each repository the
entityQueryParser can search. These are grouped in an array and returned.
Thus, if the entityQueryParser only knows about one configuration, the array will either have a size of 0 (no sucesses) or 1.
findGroups
in interface com.atlassian.user.search.query.EntityQueryParser
com.atlassian.user.EntityException
public com.atlassian.user.search.SearchResult<com.atlassian.user.User> findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> query, com.atlassian.user.search.query.QueryContext context) throws com.atlassian.user.EntityException
QueryContext
.findUsers
in interface com.atlassian.user.search.query.EntityQueryParser
com.atlassian.user.EntityException
public com.atlassian.user.search.SearchResult<com.atlassian.user.Group> findGroups(com.atlassian.user.search.query.Query<com.atlassian.user.Group> query, com.atlassian.user.search.query.QueryContext context) throws com.atlassian.user.EntityException
QueryContext
.findGroups
in interface com.atlassian.user.search.query.EntityQueryParser
com.atlassian.user.EntityException
public com.atlassian.user.search.SearchResult getUsersByEmail(String email)
getUsersByEmail
in interface UserAccessor
public com.atlassian.user.Group getGroup(String name)
UserAccessor
null
if the user doesn't exist or the name is null
.getGroup
in interface UserAccessor
public com.atlassian.user.Group getGroupCreateIfNecessary(String name)
getGroupCreateIfNecessary
in interface UserAccessor
public com.atlassian.core.user.preferences.UserPreferences getUserPreferences(com.atlassian.user.User user)
getUserPreferences
in interface UserAccessor
public boolean isLicensedToAddMoreUsers()
isLicensedToAddMoreUsers
in interface UserAccessor
public boolean isUserRemovable(com.atlassian.user.User user) throws com.atlassian.user.EntityException
isUserRemovable
in interface UserAccessor
com.atlassian.user.EntityException
public com.atlassian.user.search.page.Pager<com.atlassian.user.Group> getGroups(com.atlassian.user.User user)
getGroups
in interface UserAccessor
public boolean hasMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
UserAccessor
true
if the specified user and group both exist, and the user is a member of the
group (either directly or as a member of a nested group). In all other circumstances, returns
false
.hasMembership
in interface UserAccessor
public boolean hasMembership(String groupName, String username)
UserAccessor
true
if the specified user and group both exist, and the user is a member of the
group (either directly or as a member of a nested group). In all other circumstances, returns
false
.hasMembership
in interface UserAccessor
public void addMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
addMembership
in interface UserAccessor
public void addMembership(String groupname, String username)
addMembership
in interface UserAccessor
public boolean removeMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
removeMembership
in interface UserAccessor
public boolean removeMembership(String groupname, String username)
removeMembership
in interface UserAccessor
public com.opensymphony.module.propertyset.PropertySet getPropertySet(com.atlassian.user.User user)
getPropertySet
in interface UserAccessor
public com.atlassian.user.search.page.Pager<String> getMemberNames(com.atlassian.user.Group group)
UserAccessor
getMemberNames
in interface UserAccessor
public com.atlassian.user.search.page.Pager<String> getLocalMembers(com.atlassian.user.Group group)
getLocalMembers
in interface UserAccessor
public com.atlassian.user.search.page.Pager<String> getExternallMembers(com.atlassian.user.Group group)
getExternallMembers
in interface UserAccessor
public com.atlassian.user.User createUser(String username)
createUser
in interface UserAccessor
public com.atlassian.user.Group createGroup(String groupname)
createGroup
in interface UserAccessor
public boolean authenticate(String username, String password)
authenticate
in interface UserAccessor
public void alterPassword(com.atlassian.user.User user, String plainTextPassword) throws com.atlassian.user.EntityException
alterPassword
in interface UserAccessor
com.atlassian.user.EntityException
@Deprecated public List<com.atlassian.user.repository.RepositoryIdentifier> getDelegatingRepositories()
getDelegatingRepositories
in interface UserAccessor
protected com.atlassian.user.UserManager getUserManager()
protected com.atlassian.user.GroupManager getGroupManager()
protected com.atlassian.user.security.authentication.Authenticator getAuthenticator()
protected com.atlassian.user.properties.PropertySetFactory getPropertySetFactory()
protected com.atlassian.user.search.query.EntityQueryParser getEntityQueryParser()
Copyright © 2003–2017 Atlassian. All rights reserved.