|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserAccessor
Facade which controls calls relating to User
, Group
, or membership. It is also capable
of relaying Query
objects to underlying components which can generate SearchResult
objects in reply.
Method Summary | |
---|---|
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)
Deprecated. since 3.5 use createUser(User, Credential) |
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)
|
com.atlassian.user.User |
createUser(String username)
Deprecated. since 3.5 use createUser(User, Credential) instead |
com.atlassian.user.User |
createUser(com.atlassian.user.User userTemplate,
com.atlassian.user.security.password.Credential password)
|
void |
deactivateUser(com.atlassian.user.User user)
Deactivate the specified user, which prevents them logging in. |
com.atlassian.user.search.SearchResult<com.atlassian.user.User> |
findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> search)
|
com.atlassian.user.Group |
getDefaultGroup()
Deprecated. since 3.5 not used anywhere |
List<com.atlassian.user.repository.RepositoryIdentifier> |
getDelegatingRepositories()
Deprecated. since 3.5 not used anywhere |
com.atlassian.user.search.page.Pager<String> |
getExternallMembers(com.atlassian.user.Group group)
Deprecated. since 4.0 returns an empty pager |
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)
|
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)
Deprecated. since 4.0 returns the same as getMemberNames(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)
|
com.atlassian.user.repository.RepositoryIdentifier |
getRepository(com.atlassian.user.Entity entity)
Deprecated. since 4.0 use com.atlassian.crowd.embedded.api.CrowdDirectoryService to query for directory information |
com.atlassian.user.User |
getUser(String name)
Returns the user with the specified name, or null if the user doesn't exist or the name is null . |
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)
|
com.atlassian.user.search.page.Pager<com.atlassian.user.User> |
getUsersWithConfluenceAccess()
Deprecated. since 3.5.1. This method is very slow, use countUsersWithConfluenceAccess() if you need to know the number of users. |
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 |
isDeactivated(String username)
Returns true if the user with the specified username exists and is unable to log in, otherwise false. |
boolean |
isDeactivated(com.atlassian.user.User user)
Returns true if the user exists and is unable to log in, otherwise false. |
boolean |
isLicensedToAddMoreUsers()
|
boolean |
isUserRemovable(com.atlassian.user.User user)
|
void |
reactivateUser(com.atlassian.user.User user)
Marks the specified user as active, which allows them to log in. |
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. |
Methods inherited from interface com.atlassian.user.search.query.EntityQueryParser |
---|
findGroups, findGroups, findUsers |
Method Detail |
---|
@Deprecated com.atlassian.user.repository.RepositoryIdentifier getRepository(com.atlassian.user.Entity entity) throws com.atlassian.user.EntityException
com.atlassian.user.EntityException
@Deprecated com.atlassian.user.User addUser(String username, String password, String email, String fullname, String[] groups)
createUser(User, Credential)
and addMembership(Group, User)
@Deprecated com.atlassian.user.User addUser(String username, String password, String email, String fullname)
createUser(User, Credential)
com.atlassian.user.User getUser(String name)
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.
com.atlassian.user.search.page.Pager<String> getUserNames()
findUsers(Query)
or the CrowdService API instead.
com.atlassian.user.search.page.Pager<com.atlassian.user.User> getUsers()
findUsers(Query)
or the CrowdService API instead.
com.atlassian.user.Group getGroup(String name)
null
if the user doesn't exist or the name is null
.
com.atlassian.user.search.page.Pager<com.atlassian.user.Group> getGroups()
EntityQueryParser.findGroups(Query)
or the CrowdService API instead.
com.atlassian.user.Group addGroup(String name)
IllegalArgumentException
- if the group name is empty or null
com.atlassian.core.exception.InfrastructureException
- if the group could not be createdvoid removeGroup(com.atlassian.user.Group group)
com.atlassian.core.exception.InfrastructureException
- if the group could not be removedvoid removeUser(com.atlassian.user.User user) throws com.atlassian.core.exception.InfrastructureException
com.atlassian.core.exception.InfrastructureException
- if the user could not be removedcom.atlassian.user.Group getGroupCreateIfNecessary(String name)
com.atlassian.core.user.preferences.UserPreferences getUserPreferences(com.atlassian.user.User user)
void saveUser(com.atlassian.user.User user)
com.atlassian.core.exception.InfrastructureException
- if the user could not be updated successfullycom.atlassian.user.search.SearchResult getUsersByEmail(String email)
void deactivateUser(com.atlassian.user.User user)
void reactivateUser(com.atlassian.user.User user)
@Deprecated com.atlassian.user.search.page.Pager<com.atlassian.user.User> getUsersWithConfluenceAccess()
boolean isLicensedToAddMoreUsers()
boolean isUserRemovable(com.atlassian.user.User user) throws com.atlassian.user.EntityException
com.atlassian.user.EntityException
com.atlassian.user.search.page.Pager<com.atlassian.user.Group> getGroups(com.atlassian.user.User user)
boolean hasMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
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
.
boolean hasMembership(String groupName, String username)
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
.
void addMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
void addMembership(String groupname, String username)
boolean removeMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
com.opensymphony.module.propertyset.PropertySet getPropertySet(com.atlassian.user.User user)
com.atlassian.user.search.page.Pager<String> getMemberNames(com.atlassian.user.Group group)
@Deprecated com.atlassian.user.search.page.Pager<String> getLocalMembers(com.atlassian.user.Group group)
getMemberNames(Group)
@Deprecated com.atlassian.user.search.page.Pager<String> getExternallMembers(com.atlassian.user.Group group)
@Deprecated com.atlassian.user.User createUser(String username)
createUser(User, Credential)
instead
com.atlassian.user.User createUser(com.atlassian.user.User userTemplate, com.atlassian.user.security.password.Credential password)
com.atlassian.user.Group createGroup(String groupname)
boolean isDeactivated(com.atlassian.user.User user)
boolean isDeactivated(String username)
boolean authenticate(String username, String password)
com.atlassian.user.search.SearchResult<com.atlassian.user.User> findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> search) throws com.atlassian.user.EntityException
findUsers
in interface com.atlassian.user.search.query.EntityQueryParser
com.atlassian.user.EntityException
@Deprecated com.atlassian.user.Group getDefaultGroup()
void alterPassword(com.atlassian.user.User user, String plainTextPassword) throws com.atlassian.user.EntityException
com.atlassian.user.EntityException
@Deprecated List<com.atlassian.user.repository.RepositoryIdentifier> getDelegatingRepositories()
boolean removeMembership(String groupname, String username)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |