|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.avatar.AvatarServiceImpl
public class AvatarServiceImpl
Implementation of the AvatarService.
| Constructor Summary | |
|---|---|
AvatarServiceImpl(UserManager userManager,
AvatarManager avatarManager,
UserPropertyManager userPropertyManager,
VelocityRequestContextFactory velocityRequestContextFactory,
ApplicationProperties applicationProperties)
|
|
| Method Summary | |
|---|---|
protected boolean |
canViewAvatar(com.atlassian.crowd.embedded.api.User user,
Avatar avatar)
Returns true if the passed in user has permission to view the passed in avatar. |
protected Long |
configuredAvatarIdFor(com.atlassian.crowd.embedded.api.User user)
Returns the avatar id that is configured for the given User. |
Avatar |
getAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String avatarUserId)
Returns the Avatar for the given user, if configured. |
URI |
getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser,
String avatarUserId,
Avatar.Size size)
Returns the URL for the avatar of the user having the given username for displaying on a page that should be shown for the passed in remoteUser. |
URI |
getAvatarUrlNoPermCheck(String avatarUserId,
Avatar.Size size)
This is the same as AvatarService.getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but does no permission checking. |
boolean |
isUserAvatarsEnabled()
Returns a boolean indicating whether user Avatars are enabled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AvatarServiceImpl(UserManager userManager,
AvatarManager avatarManager,
UserPropertyManager userPropertyManager,
VelocityRequestContextFactory velocityRequestContextFactory,
ApplicationProperties applicationProperties)
| Method Detail |
|---|
public boolean isUserAvatarsEnabled()
AvatarService
isUserAvatarsEnabled in interface AvatarService
public Avatar getAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String avatarUserId)
throws AvatarsDisabledException
AvatarService
getAvatar in interface AvatarServiceremoteUser - the User that wants to view an AvataravatarUserId - a String containing a username (may have been deleted)
AvatarsDisabledException - if avatars are disabled
public URI getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser,
String avatarUserId,
Avatar.Size size)
throws AvatarsDisabledException
AvatarService
getAvatarURL in interface AvatarServiceremoteUser - a User object for the currently logged in useravatarUserId - a String containing a username (may have been deleted)size - the size of the avatar to be displayed (if null, the default size is used)
AvatarsDisabledException - if avatars are disabledAvatarService.getAvatar(com.atlassian.crowd.embedded.api.User, String)
public URI getAvatarUrlNoPermCheck(String avatarUserId,
Avatar.Size size)
throws AvatarsDisabledException
AvatarServiceAvatarService.getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but does no permission checking.
getAvatarUrlNoPermCheck in interface AvatarServiceAvatarsDisabledExceptionprotected Long configuredAvatarIdFor(com.atlassian.crowd.embedded.api.User user)
user - the user whose avatar we want
AvatarManager.getDefaultAvatarId(com.atlassian.jira.avatar.Avatar.Type),
AvatarManager.getAnonymousAvatarId()
protected boolean canViewAvatar(com.atlassian.crowd.embedded.api.User user,
Avatar avatar)
user - a Useravatar - an Avatar
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||