|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 |
getAvatarAbsoluteURL(com.atlassian.crowd.embedded.api.User remoteUser,
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 returns an absolute URL. |
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. |
URI |
getProjectAvatarAbsoluteURL(Project project,
Avatar.Size size)
Returns the URL for the avatar of the given project. |
URI |
getProjectAvatarURL(Project project,
Avatar.Size size)
Returns the URL for the avatar of the given project. |
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 Avatar getAvatar(com.atlassian.crowd.embedded.api.User remoteUser, String avatarUserId) throws AvatarsDisabledException
AvatarService
getAvatar
in interface AvatarService
remoteUser
- the User that wants to view an AvataravatarUserId
- a String containing a username (may have been deleted)
AvatarsDisabledException
- if avatars are disabledpublic URI getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser, String avatarUserId, Avatar.Size size) throws AvatarsDisabledException
AvatarService
getAvatarURL
in interface AvatarService
remoteUser
- 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
AvatarService
AvatarService.getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but does no permission checking.
getAvatarUrlNoPermCheck
in interface AvatarService
AvatarsDisabledException
public URI getAvatarAbsoluteURL(com.atlassian.crowd.embedded.api.User remoteUser, String avatarUserId, Avatar.Size size) throws AvatarsDisabledException
AvatarService
AvatarService.getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but returns an absolute URL.
getAvatarAbsoluteURL
in interface AvatarService
AvatarsDisabledException
public URI getProjectAvatarURL(Project project, Avatar.Size size)
AvatarService
getProjectAvatarURL
in interface AvatarService
project
- the Project of which to get the avatar URLsize
- the size of the avatar to be displayed (if null, the default size is used)
public URI getProjectAvatarAbsoluteURL(Project project, Avatar.Size size)
AvatarService
getProjectAvatarAbsoluteURL
in interface AvatarService
project
- the Project of which to get the avatar URLsize
- the size of the avatar to be displayed (if null, the default size is used)
protected 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 |