@PublicApi
public interface AvatarService
Avatars.| Modifier and Type | Method and Description |
|---|---|
boolean |
canSetCustomUserAvatar(ApplicationUser remoteUser,
ApplicationUser user)
Returns a boolean indicating whether the calling user can edit the custom user avatar for the user with the given
username.
|
boolean |
canSetCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username)
Deprecated.
|
Avatar |
getAvatar(ApplicationUser remoteUser,
ApplicationUser avatarUser)
Returns the Avatar for the given user, if configured.
|
Avatar |
getAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username)
Deprecated.
|
URI |
getAvatarAbsoluteURL(ApplicationUser remoteUser,
ApplicationUser avatarUser,
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 |
getAvatarAbsoluteURL(com.atlassian.crowd.embedded.api.User remoteUser,
String username,
Avatar.Size size)
|
Avatar |
getAvatarTagged(ApplicationUser remoteUser,
ApplicationUser avatarUser) |
URI |
getAvatarURL(ApplicationUser remoteUser,
ApplicationUser avatarUser)
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(ApplicationUser remoteUser,
ApplicationUser avatarUser,
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 |
getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser,
String username)
Deprecated.
|
URI |
getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser,
String username,
Avatar.Size size)
|
URI |
getAvatarUrlNoPermCheck(ApplicationUser avatarUser,
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 |
getAvatarUrlNoPermCheck(ApplicationUser applicationUser,
Avatar avatar,
Avatar.Size size)
Deprecated.
|
URI |
getAvatarUrlNoPermCheck(String username,
Avatar.Size size)
Deprecated.
|
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.
|
URI |
getProjectDefaultAvatarAbsoluteURL(Avatar.Size size)
Returns the URL for the default avatar of a project.
|
URI |
getProjectDefaultAvatarURL(Avatar.Size size)
Returns the URL for the default avatar of a project.
|
boolean |
hasCustomUserAvatar(ApplicationUser remoteUser,
ApplicationUser username)
Returns true if the user has configured a custom avatar, false otherwise.
|
boolean |
hasCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username)
Deprecated.
|
boolean |
isGravatarEnabled()
Deprecated.
this is an avatar-provider plugin-implementation-specific concern
|
boolean |
isUsingExternalAvatar(ApplicationUser remoteUser,
ApplicationUser avatarUser)
Check whether a user currently has an external avatar (for example, a Gravatar).
|
void |
setCustomUserAvatar(ApplicationUser remoteUser,
ApplicationUser user,
Long avatarId)
Sets a custom avatar for a given user.
|
void |
setCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username,
Long avatarId)
Deprecated.
|
Avatar getAvatar(com.atlassian.crowd.embedded.api.User remoteUser, String username) throws AvatarsDisabledException
getAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser). Since v6.0remoteUser - the User that wants to view an Avatarusername - a String containing a username (may have been deleted)AvatarsDisabledException - if avatars are disabledAvatar getAvatar(ApplicationUser remoteUser, ApplicationUser avatarUser) throws AvatarsDisabledException
remoteUser - the User that wants to view an AvataravatarUser - the User that the avatar will be returned for (if null it will return a default avatar if it's set or null)AvatarsDisabledException - if avatars are disabledURI getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser, String username) throws AvatarsDisabledException
getAvatarURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser). Since v6.0remoteUser - a User object for the currently logged in userusername - a String containing a username (may have been deleted)AvatarsDisabledException - if avatars are disabledgetAvatar(com.atlassian.crowd.embedded.api.User, String)URI getAvatarURL(ApplicationUser remoteUser, ApplicationUser avatarUser) throws AvatarsDisabledException
remoteUser - a User object for the currently logged in useravatarUser - a User object to get the avatar for (if null, the default avatar is used)AvatarsDisabledException - if avatars are disabledgetAvatar(com.atlassian.crowd.embedded.api.User, String)URI getAvatarURL(com.atlassian.crowd.embedded.api.User remoteUser, String username, Avatar.Size size) throws AvatarsDisabledException
getAvatarURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size). Since v6.0remoteUser - a User object for the currently logged in userusername - 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 getAvatarURL(ApplicationUser remoteUser, ApplicationUser avatarUser, Avatar.Size size) throws AvatarsDisabledException
remoteUser - a User object for the currently logged in useravatarUser - a User to get the avatar for (if null, the default avatar is used)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 username, Avatar.Size size) throws AvatarsDisabledException
getAvatarUrlNoPermCheck(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size). Since v6.0getAvatarURL(com.atlassian.crowd.embedded.api.User, String,
com.atlassian.jira.avatar.Avatar.Size) but does no permission checking.username - a String containing a username (may have been deleted)size - the size of the avatar to be displayedAvatarsDisabledException - if avatars are disabledURI getAvatarUrlNoPermCheck(ApplicationUser avatarUser, Avatar.Size size) throws AvatarsDisabledException
getAvatarURL(com.atlassian.crowd.embedded.api.User, String,
com.atlassian.jira.avatar.Avatar.Size) but does no permission checking.avatarUser - a String containing a username (if null, the default avatar is used)size - the size of the avatar to be displayedAvatarsDisabledException - if avatars are disabled@Deprecated URI getAvatarUrlNoPermCheck(ApplicationUser applicationUser, Avatar avatar, @Nonnull Avatar.Size size) throws AvatarsDisabledException
applicationUser - 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 getAvatarAbsoluteURL(com.atlassian.crowd.embedded.api.User remoteUser, String username, Avatar.Size size) throws AvatarsDisabledException
getAvatarAbsoluteURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size). Since v6.0getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but returns an absolute URL.AvatarsDisabledExceptionURI getAvatarAbsoluteURL(ApplicationUser remoteUser, ApplicationUser avatarUser, Avatar.Size size) throws AvatarsDisabledException
getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but returns an absolute URL.AvatarsDisabledExceptionURI 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)URI getProjectDefaultAvatarURL(Avatar.Size size)
size - the size of the avatar to be displayed (if null, the default size is used)URI getProjectDefaultAvatarAbsoluteURL(Avatar.Size size)
size - 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)
hasCustomUserAvatar(ApplicationUser remoteUser, ApplicationUser username). Since v6.0remoteUser - a User object for the currently logged in userusername - the username of the user whose avatar we will check@ExperimentalApi boolean hasCustomUserAvatar(ApplicationUser remoteUser, ApplicationUser username)
remoteUser - a User object for the currently logged in userusername - the username of the user whose avatar we will check@ExperimentalApi @Deprecated boolean isGravatarEnabled()
boolean isUsingExternalAvatar(ApplicationUser remoteUser, ApplicationUser avatarUser)
getAvatarURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser)
to get the avatar URL.@ExperimentalApi
void setCustomUserAvatar(com.atlassian.crowd.embedded.api.User remoteUser,
String username,
Long avatarId)
throws AvatarsDisabledException,
NoPermissionException
setCustomUserAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, Long). Since v6.0remoteUser - 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 userAvatarsDisabledException - if avatars are disabledNoPermissionException - if the remote user does not have permission to update the given user's avatarcanSetCustomUserAvatar(com.atlassian.crowd.embedded.api.User, String)@ExperimentalApi void setCustomUserAvatar(ApplicationUser remoteUser, ApplicationUser user, Long avatarId) throws AvatarsDisabledException, NoPermissionException
remoteUser - a User object for the currently logged in useruser - the user whose avatar we will configureavatarId - the id of the avatar to configure for the userAvatarsDisabledException - if avatars are disabledNoPermissionException - 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)
canSetCustomUserAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser). Since v6.0remoteUser - a User object for the currently logged in userusername - the username of the user whose avatar we will configure@ExperimentalApi boolean canSetCustomUserAvatar(ApplicationUser remoteUser, ApplicationUser user)
remoteUser - a User object for the currently logged in useruser - the user whose avatar we will configureAvatar getAvatarTagged(ApplicationUser remoteUser, ApplicationUser avatarUser) throws AvatarsDisabledException
AvatarsDisabledExceptionCopyright © 2002-2015 Atlassian. All Rights Reserved.