com.atlassian.jira.avatar.AvatarService |
Known Indirect Subclasses |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Service for manipulating Avatar
's.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
canSetCustomUserAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser) . Since v6.0 | |||||||||||
Returns a boolean indicating whether the calling user can edit the custom user avatar for the user with the given
username.
| |||||||||||
Returns the Avatar for the given user, if configured.
| |||||||||||
This method is deprecated.
Use
getAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser) . Since v6.0 | |||||||||||
This method is deprecated.
Use
getAvatarAbsoluteURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size) . Since v6.0
| |||||||||||
This is the same as
getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but returns an absolute URL. | |||||||||||
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.
| |||||||||||
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.
| |||||||||||
This method is deprecated.
Use
getAvatarURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size) . Since v6.0 | |||||||||||
This method is deprecated.
Use
getAvatarURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser) . Since v6.0 | |||||||||||
This method is deprecated.
Use
getAvatarUrlNoPermCheck(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size) . Since v6.0 | |||||||||||
This is the same as
getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size) but does no permission checking. | |||||||||||
Returns the URL for the avatar of the given project.
| |||||||||||
Returns the URL for the avatar of the given project.
| |||||||||||
This method is deprecated.
Use
hasCustomUserAvatar(ApplicationUser, ApplicationUser) . Since v6.0 | |||||||||||
Returns true if the user has configured a custom avatar, false otherwise.
| |||||||||||
Returns true if Gravatar support is enabled.
| |||||||||||
This method is deprecated.
Use
setCustomUserAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, Long) . Since v6.0 | |||||||||||
Sets a custom avatar for a given user.
|
@Internal
or @PublicApi
.
This method is deprecated.
Use canSetCustomUserAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser)
. Since v6.0
Returns a boolean indicating whether the calling user can edit the custom user avatar for the user with the given username.
remoteUser | a User object for the currently logged in user |
---|---|
username | the username of the user whose avatar we will configure |
@Internal
or @PublicApi
.
Returns a boolean indicating whether the calling user can edit the custom user avatar for the user with the given username.
remoteUser | a User object for the currently logged in user |
---|---|
user | the user whose avatar we will configure |
Returns the Avatar for the given user, if configured. If the user does not have a custom avatar, or if the calling user does not have permission to view the Avatar, this method returns the default avatar. If the user does not exist, this method returns the anonymous avatar.
If this method would return the default user avatar but none is configured, or if this method would return the anonymous avatar but none is configured, this method returns null.remoteUser | the User that wants to view an Avatar |
---|---|
avatarUser | 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 disabled |
---|
This method is deprecated.
Use getAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser)
. Since v6.0
Returns the Avatar for the given user, if configured. If the user does not have a custom avatar, or if the calling user does not have permission to view the Avatar, this method returns the default avatar. If the user does not exist, this method returns the anonymous avatar.
If this method would return the default user avatar but none is configured, or if this method would return the anonymous avatar but none is configured, this method returns null.remoteUser | the User that wants to view an Avatar |
---|---|
username | a String containing a username (may have been deleted) |
AvatarsDisabledException | if avatars are disabled |
---|
This method is deprecated.
Use getAvatarAbsoluteURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size)
. Since v6.0
This is the same as
getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but returns an absolute URL.
AvatarsDisabledException |
---|
This is the same as
getAvatarURL(com.atlassian.crowd.embedded.api.User, String, com.atlassian.jira.avatar.Avatar.Size)
but returns an absolute URL.
AvatarsDisabledException |
---|
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. This method returns a URL for an avatar with the default size.
If the user does not have a custom avatar, or if the calling user does not have permission to view the Avatar, this method returns the URL of the default avatar. If the user does not exist, this method returns the URL of the anonymous avatar.remoteUser | a User object for the currently logged in user |
---|---|
avatarUser | a User object to get the avatar for (if null, the default avatar is used) |
AvatarsDisabledException | if avatars are disabled |
---|
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.
If the user does not have a custom avatar, or if the calling user does not have permission to view the Avatar, this method returns the URL of the default avatar. If the user does not exist, this method returns the URL of the anonymous avatar.remoteUser | a User object for the currently logged in user |
---|---|
avatarUser | 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 disabled |
---|
This method is deprecated.
Use getAvatarURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size)
. Since v6.0
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.
If the user does not have a custom avatar, or if the calling user does not have permission to view the Avatar, this method returns the URL of the default avatar. If the user does not exist, this method returns the URL of the anonymous avatar.remoteUser | a User object for the currently logged in user |
---|---|
username | 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 disabled |
---|
This method is deprecated.
Use getAvatarURL(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser)
. Since v6.0
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. This method returns a URL for an avatar with the default size.
If the user does not have a custom avatar, or if the calling user does not have permission to view the Avatar, this method returns the URL of the default avatar. If the user does not exist, this method returns the URL of the anonymous avatar.remoteUser | a User object for the currently logged in user |
---|---|
username | a String containing a username (may have been deleted) |
AvatarsDisabledException | if avatars are disabled |
---|
This method is deprecated.
Use getAvatarUrlNoPermCheck(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.avatar.Avatar.Size)
. Since v6.0
This is the same as getAvatarURL(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 displayed (if null, the default size is used) |
AvatarsDisabledException | if avatars are disabled |
---|
This is the same as 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 displayed (if null, the default size is used) |
AvatarsDisabledException | if avatars are disabled |
---|
Returns the URL for the avatar of the given project.
This will always return an absolute URL (eg. "http://example.com/jira/...").project | the Project of which to get the avatar URL |
---|---|
size | the size of the avatar to be displayed (if null, the default size is used) |
Returns the URL for the avatar of the given project.
If running in the context of a web request, this will return a URL relative to the server root (ie "/jira/..."). Otherwise, it will return an absolute URL (eg. "http://example.com/jira/...").project | the Project of which to get the avatar URL |
---|---|
size | the size of the avatar to be displayed (if null, the default size is used) |
@Internal
or @PublicApi
.
This method is deprecated.
Use hasCustomUserAvatar(ApplicationUser, ApplicationUser)
. Since v6.0
Returns true if the user has configured a custom avatar, false otherwise.
remoteUser | a User object for the currently logged in user |
---|---|
username | the username of the user whose avatar we will check |
@Internal
or @PublicApi
.
Returns true if the user has configured a custom avatar, false otherwise.
remoteUser | a User object for the currently logged in user |
---|---|
username | the username of the user whose avatar we will check |
@Internal
or @PublicApi
.
Returns true if Gravatar support is enabled.
@Internal
or @PublicApi
.
This method is deprecated.
Use setCustomUserAvatar(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.user.ApplicationUser, Long)
. Since v6.0
Sets a custom avatar for a given user.
remoteUser | a User object for the currently logged in user |
---|---|
username | the username of the user whose avatar we will configure |
avatarId | 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 avatar |
@Internal
or @PublicApi
.
Sets a custom avatar for a given user.
remoteUser | a User object for the currently logged in user |
---|---|
user | the user whose avatar we will configure |
avatarId | 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 avatar |