com.atlassian.confluence.user
Interface UserAccessor

All Superinterfaces:
com.atlassian.user.search.query.EntityQueryParser, UserAccessor

public interface UserAccessor
extends 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
 List filterUnaccessibleGroups(List groupList, com.atlassian.user.User user)
           
 com.atlassian.user.search.page.Pager filterUnaccessibleGroups(com.atlassian.user.search.page.Pager groupPager, com.atlassian.user.User user)
          Filters a pager of groups based on the passed User.
 List filterUnaccessibleUsers(List groupList, com.atlassian.user.User user)
          Filters a pager of groups based on the passed User.
 com.atlassian.user.search.page.Pager filterUnaccessibleUsers(com.atlassian.user.search.page.Pager userPager, com.atlassian.user.User user)
          Filters a pager of Users based on the groups of the passed User.
 List findUsersAsList(com.atlassian.user.search.query.Query search)
           
 ConfluenceUserPreferences getConfluenceUserPreferences(com.atlassian.user.User user)
           
 List getGroupsAsList()
           
 List<com.atlassian.user.Group> getGroupsAsList(com.atlassian.user.User user)
           
 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.
 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()
           
 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)
          Return true if the user is an all-powerful super-user (member of the confluence-administrators group).
 void setContentEntityManager(ContentEntityManager contentEntityManager)
           
 void setEventManager(com.atlassian.event.EventManager eventManager)
           
 void setNotificationManager(NotificationManager notificationManager)
           
 void setPersonalInformationManager(PersonalInformationManager personalInformationManager)
           
 void setSettingsManager(SettingsManager settingsManager)
           
 void setSpacePermissionManager(SpacePermissionManager permissionManager)
           
 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.
 void setUserStatusManager(UserStatusManager userStatusManager)
           
 
Methods inherited from interface bucket.user.UserAccessor
addGroup, addMembership, addMembership, addUser, addUser, alterPassword, authenticate, createGroup, createUser, deactivateUser, findUsers, getDefaultGroup, getDelegatingRepositories, getExternallMembers, getGroup, getGroupCreateIfNecessary, getGroups, getGroups, getLocalMembers, getMemberNames, getPropertySet, getRepository, getUser, getUserNames, getUserPreferences, getUsers, getUsersByEmail, getUsersWithConfluenceAccess, hasMembership, hasMembership, isDeactivated, isDeactivated, isLicensedToAddMoreUsers, isUserRemovable, reactivateUser, removeGroup, removeMembership, removeMembership, removeUser, saveUser, setAtlassianUserConfiguration
 
Methods inherited from interface com.atlassian.user.search.query.EntityQueryParser
findGroups, findGroups, findUsers
 

Field Detail

ANONYMOUS

static final String ANONYMOUS
See Also:
Constant Field Values

GROUP_CONFLUENCE_USERS

static final String GROUP_CONFLUENCE_USERS
See Also:
Constant Field Values

USER_GROUP_SUFFIX

static final String USER_GROUP_SUFFIX
See Also:
Constant Field Values

GROUP_CONFLUENCE_ADMINS

static final String GROUP_CONFLUENCE_ADMINS
See Also:
Constant Field Values

DEFAULT_GROUP_NAMES

static final List DEFAULT_GROUP_NAMES
List of names (as Strings) that are automatically created during Confluence setup.


PROFILE_PICTURE_BUILTIN_PATH

static final String PROFILE_PICTURE_BUILTIN_PATH
See Also:
Constant Field Values
Method Detail

setSpacePermissionManager

void setSpacePermissionManager(SpacePermissionManager permissionManager)

setContentEntityManager

void setContentEntityManager(ContentEntityManager contentEntityManager)

setNotificationManager

void setNotificationManager(NotificationManager notificationManager)

setEventManager

void setEventManager(com.atlassian.event.EventManager eventManager)

setPersonalInformationManager

void setPersonalInformationManager(PersonalInformationManager personalInformationManager)

setSettingsManager

void setSettingsManager(SettingsManager settingsManager)

setUserStatusManager

void setUserStatusManager(UserStatusManager userStatusManager)

isReadOnly

boolean isReadOnly(com.atlassian.user.User user)

isReadOnly

boolean isReadOnly(com.atlassian.user.Group group)

filterUnaccessibleUsers

com.atlassian.user.search.page.Pager filterUnaccessibleUsers(com.atlassian.user.search.page.Pager userPager,
                                                             com.atlassian.user.User user)
Filters a pager of Users based on the groups of the passed 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.

Parameters:
userPager - A Pager of User objects
user - The user to filter against
Returns:
a filtered Pager of User objects

filterUnaccessibleGroups

com.atlassian.user.search.page.Pager filterUnaccessibleGroups(com.atlassian.user.search.page.Pager groupPager,
                                                              com.atlassian.user.User user)
Filters a pager of groups based on the passed 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.

Parameters:
groupPager - The pager of groups
user - The user to filter against
Returns:
A filtered Pager of Group objects

getUserProfilePicture

ProfilePictureInfo getUserProfilePicture(String username)
Deprecated. since 2.9. Use getUserProfilePicture(User) instead.

Retrieve the path to a user's personal picture

Parameters:
username - the user whose picture to look up.
Returns:
The path to a user's personal picture, or null if they don't have one set.

getUserProfilePicture

ProfilePictureInfo getUserProfilePicture(com.atlassian.user.User user)
Retrieve the path to a user's personal picture

Parameters:
user - the user whose picture to look up.
Returns:
The path to a user's personal picture, or null if they don't have one set.

getConfluenceUserPreferences

ConfluenceUserPreferences getConfluenceUserPreferences(com.atlassian.user.User user)

isSuperUser

boolean isSuperUser(com.atlassian.user.User user)
Return true if the user is an all-powerful super-user (member of the confluence-administrators group).

Parameters:
user - the user to check for (the null user will always return false
Returns:
true if the user is a super-user, false otherwise.

filterUnaccessibleUsers

List filterUnaccessibleUsers(List groupList,
                             com.atlassian.user.User user)
Filters a pager of groups based on the passed 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.

Parameters:
groupList - The list of groups
user - The user to filter against
Returns:
A filtered List of Group objects

getGroupsAsList

List<com.atlassian.user.Group> getGroupsAsList(com.atlassian.user.User user)

filterUnaccessibleGroups

List filterUnaccessibleGroups(List groupList,
                              com.atlassian.user.User user)

getGroupsAsList

List getGroupsAsList()

getMemberNamesAsList

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.

Parameters:
group - to retrieve the member names from
Returns:
a list of Strings

getWriteableGroups

List<com.atlassian.user.Group> getWriteableGroups()
Gets all editable groups. That is, returns any groups that belong to read/write repositories. Groups in readonly repositories that are ReadOnly are not returned.

Returns:
list of Groups that can be edited.

getUsersWithConfluenceAccessAsList

List<com.atlassian.user.User> getUsersWithConfluenceAccessAsList()

getUserIfAvailable

com.atlassian.user.User getUserIfAvailable(String username)
Get the User if visible to the currently authenticated user in shared mode. If not in shared mode, the User will be returned if not null.


findUsersAsList

List findUsersAsList(com.atlassian.user.search.query.Query search)
                     throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

setUserProfilePicture

void setUserProfilePicture(com.atlassian.user.User user,
                           Attachment attachment)
Set the user profile picture to the given attachment. The attachment should be an image attached to that user's personal information, of size 48x48. No check is performed in this method that the image is valid or the right size.

Parameters:
user - the user to set a profile picture for
attachment - the attachment containing the user's profile picture
Throws:
IllegalArgumentException - if the image is not attached to the user's personal information

setUserProfilePicture

void setUserProfilePicture(com.atlassian.user.User targetUser,
                           String imagePath)
Set the user profile picture to a built-in image. The path should be the web-application-root-relative path to the image to be used as the user's profile picture and should be size 48x48. Neither are checked by the implementation

Parameters:
targetUser - the user to set a profile picture for
imagePath - the image path to that picture.


Copyright © 2003-2011 Atlassian. All Rights Reserved.