|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface AvatarService
Service for manipulating Avatar
's.
Method Summary | |
---|---|
boolean |
canSetCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username)
Returns a boolean indicating whether the calling user can edit the custom user avatar for the user with the given username. |
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 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)
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 |
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 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. |
boolean |
hasCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username)
|
boolean |
isGravatarEnabled()
Returns true if Gravatar support is enabled. |
void |
setCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username,
Long avatarId)
Sets a custom avatar for a given user. |
Method Detail |
---|
Avatar getAvatar(com.atlassian.crowd.embedded.api.User remoteUser, String avatarUserId) throws AvatarsDisabledException
remoteUser
- the User that wants to view an AvataravatarUserId
- a String containing a username (may have been deleted)
AvatarsDisabledException
- if avatars are disabledURI getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser, String avatarUserId) throws AvatarsDisabledException
remoteUser
- a User object for the currently logged in useravatarUserId
- a String containing a username (may have been deleted)
AvatarsDisabledException
- if avatars are disabledgetAvatar(com.atlassian.crowd.embedded.api.User, String)
URI getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser, String avatarUserId, Avatar.Size size) throws AvatarsDisabledException
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 disabledgetAvatar(com.atlassian.crowd.embedded.api.User, String)
URI getAvatarUrlNoPermCheck(String avatarUserId, Avatar.Size size) throws AvatarsDisabledException
getAvatarURL(com.atlassian.crowd.embedded.api.User, String,
com.atlassian.jira.avatar.Avatar.Size)
but does no permission checking.
avatarUserId
- 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 disabledURI getAvatarAbsoluteURL(com.atlassian.crowd.embedded.api.User remoteUser, String avatarUserId, Avatar.Size size) throws AvatarsDisabledException
getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but returns an absolute URL.
AvatarsDisabledException
URI getProjectAvatarURL(Project project, Avatar.Size size)
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)
URI getProjectAvatarAbsoluteURL(Project project, Avatar.Size size)
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)
@ExperimentalApi boolean hasCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser, String username)
@ExperimentalApi boolean isGravatarEnabled()
@ExperimentalApi void setCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser, String username, Long avatarId) throws AvatarsDisabledException, NoPermissionException
remoteUser
- a User object for the currently logged in userusername
- the username of the user whose avatar we will configureavatarId
- the id of the avatar to configure for the user
AvatarsDisabledException
- if avatars are disabled
NoPermissionException
- if the remote user does not have permission to update the given user's avatarcanSetCustomUserAvatar(com.atlassian.crowd.embedded.api.User, String)
@ExperimentalApi boolean canSetCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser, String username)
remoteUser
- a User object for the currently logged in userusername
- the username of the user whose avatar we will configure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |