|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserAccessor
| Field Summary | |
|---|---|
static String |
ANONYMOUS
|
static List |
DEFAULT_GROUP_NAMES
List of names (as Strings) that are automatically created during Confluence setup. |
static String |
GROUP_CONFLUENCE_ADMINS
|
static String |
GROUP_CONFLUENCE_USERS
|
static String |
PROFILE_PICTURE_BUILTIN_PATH
|
static String |
USER_GROUP_SUFFIX
|
| Method Summary | |
|---|---|
int |
countUsersWithConfluenceAccess()
Returns the number of users which have access to use Confluence. |
List<com.atlassian.user.Group> |
filterUnaccessibleGroups(List<com.atlassian.user.Group> groupList,
com.atlassian.user.User user)
|
com.atlassian.user.search.page.Pager<com.atlassian.user.Group> |
filterUnaccessibleGroups(com.atlassian.user.search.page.Pager<com.atlassian.user.Group> groupPager,
com.atlassian.user.User user)
Filters a pager of groups based on the passed User. |
List<com.atlassian.user.User> |
filterUnaccessibleUsers(List<com.atlassian.user.User> groupList,
com.atlassian.user.User user)
|
com.atlassian.user.search.page.Pager<com.atlassian.user.User> |
filterUnaccessibleUsers(com.atlassian.user.search.page.Pager<com.atlassian.user.User> userPager,
com.atlassian.user.User user)
Filters a pager of Users based on the groups of the passed User. |
List<com.atlassian.user.User> |
findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> search)
|
ConfluenceUserPreferences |
getConfluenceUserPreferences(com.atlassian.user.User user)
|
List<String> |
getGroupNames(com.atlassian.user.User user)
Gets the list of group names representing the groups the passed in user is a member of. |
List<String> |
getGroupNamesForUserName(String userName)
Gets the list of group names representing the groups the passed in user is a member of. |
List<com.atlassian.user.Group> |
getGroupsAsList()
|
List<com.atlassian.user.Group> |
getGroupsAsList(com.atlassian.user.User user)
Deprecated. since 3.5.4 callers should use getGroupNames(User) or getGroupNamesForUserName(String) |
List<String> |
getMemberNamesAsList(com.atlassian.user.Group group)
Same as UserAccessor.getMemberNames(com.atlassian.user.Group) but returns a List of user names as Strings
rather than a Pager. |
com.atlassian.user.User |
getUserIfAvailable(String username)
Get the User if visible to the currently authenticated user in shared mode. |
List<String> |
getUserNamesWithConfluenceAccess()
Deprecated. since 3.5.1. This method is very slow, use countUsersWithConfluenceAccess() if you need to know the number of users. |
ProfilePictureInfo |
getUserProfilePicture(String username)
Deprecated. since 2.9. Use getUserProfilePicture(User) instead. |
ProfilePictureInfo |
getUserProfilePicture(com.atlassian.user.User user)
Retrieve the path to a user's personal picture |
List<com.atlassian.user.User> |
getUsersWithConfluenceAccessAsList()
Deprecated. since 3.5.1. This method is very slow, use countUsersWithConfluenceAccess() if you need to know the number of users. |
List<com.atlassian.user.Group> |
getWriteableGroups()
Gets all editable groups. |
boolean |
isReadOnly(com.atlassian.user.Group group)
|
boolean |
isReadOnly(com.atlassian.user.User user)
|
boolean |
isSuperUser(com.atlassian.user.User user)
Deprecated. since 3.5 the permission checks in the application take care of checking for this membership |
void |
setUserProfilePicture(com.atlassian.user.User user,
Attachment attachment)
Set the user profile picture to the given attachment. |
void |
setUserProfilePicture(com.atlassian.user.User targetUser,
String imagePath)
Set the user profile picture to a built-in image. |
| Methods inherited from interface com.atlassian.user.search.query.EntityQueryParser |
|---|
findGroups, findGroups, findUsers |
| Field Detail |
|---|
static final String ANONYMOUS
static final String GROUP_CONFLUENCE_USERS
static final String USER_GROUP_SUFFIX
static final String GROUP_CONFLUENCE_ADMINS
static final List DEFAULT_GROUP_NAMES
Strings) that are automatically created during Confluence setup.
static final String PROFILE_PICTURE_BUILTIN_PATH
| Method Detail |
|---|
boolean isReadOnly(com.atlassian.user.User user)
boolean isReadOnly(com.atlassian.user.Group group)
com.atlassian.user.search.page.Pager<com.atlassian.user.User> filterUnaccessibleUsers(com.atlassian.user.search.page.Pager<com.atlassian.user.User> userPager,
com.atlassian.user.User user)
User. If in "shared" mode
and the user isn't a global administrator, only users who are members of the same groups will be returned.
Otherwise, the pager will be returned unmodified.
userPager - A Pager of User objectsuser - The user to filter against
Pager of User objects
com.atlassian.user.search.page.Pager<com.atlassian.user.Group> filterUnaccessibleGroups(com.atlassian.user.search.page.Pager<com.atlassian.user.Group> groupPager,
com.atlassian.user.User user)
User. If in "shared" mode and the user isn't a global
administrator, only the groups of the user will be returned. Otherwise, the pager will be returned unmodified.
groupPager - The pager of groupsuser - The user to filter against
Pager of Group objectsProfilePictureInfo getUserProfilePicture(String username)
getUserProfilePicture(User) instead.
username - the user whose picture to look up.
ProfilePictureInfo getUserProfilePicture(com.atlassian.user.User user)
user - the user whose picture to look up.
ConfluenceUserPreferences getConfluenceUserPreferences(com.atlassian.user.User user)
boolean isSuperUser(com.atlassian.user.User user)
user - the user to check for (the null user will always return false
List<com.atlassian.user.User> filterUnaccessibleUsers(List<com.atlassian.user.User> groupList,
com.atlassian.user.User user)
List<com.atlassian.user.Group> getGroupsAsList(com.atlassian.user.User user)
getGroupNames(User) or getGroupNamesForUserName(String)
List<com.atlassian.user.Group> filterUnaccessibleGroups(List<com.atlassian.user.Group> groupList,
com.atlassian.user.User user)
List<com.atlassian.user.Group> getGroupsAsList()
List<String> getMemberNamesAsList(com.atlassian.user.Group group)
UserAccessor.getMemberNames(com.atlassian.user.Group) but returns a List of user names as Strings
rather than a Pager.
group - to retrieve the member names from
StringsList<String> getGroupNames(com.atlassian.user.User user)
user - the user to perform the membership check for
List<String> getGroupNamesForUserName(String userName)
userName - the name of the user to perform the membership check for
List<com.atlassian.user.Group> getWriteableGroups()
Groups that can be edited.List<com.atlassian.user.User> getUsersWithConfluenceAccessAsList()
countUsersWithConfluenceAccess() if you need to know the number of users.
countUsersWithConfluenceAccess()List<String> getUserNamesWithConfluenceAccess()
countUsersWithConfluenceAccess() if you need to know the number of users.
countUsersWithConfluenceAccess()int countUsersWithConfluenceAccess()
com.atlassian.user.User getUserIfAvailable(String username)
User if visible to the currently authenticated user in shared mode.
If not in shared mode, the User will be returned if not null.
List<com.atlassian.user.User> findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> search)
throws com.atlassian.user.EntityException
com.atlassian.user.EntityException
void setUserProfilePicture(com.atlassian.user.User user,
Attachment attachment)
user - the user to set a profile picture forattachment - the attachment containing the user's profile picture
IllegalArgumentException - if the image is not attached to the user's personal information
void setUserProfilePicture(com.atlassian.user.User targetUser,
String imagePath)
targetUser - the user to set a profile picture forimagePath - the image path to that picture.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||