java.lang.Object | |
↳ | com.atlassian.jira.avatar.AvatarServiceImpl |
Implementation of the AvatarService. Uses AvatarPlugin module for user Avatars.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Injectable constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a boolean indicating whether the calling user can edit the custom user avatar for the user with the given
username.
| |||||||||||
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.
| |||||||||||
Returns the Avatar for the given user, if configured.
| |||||||||||
This is the same as
getAvatarURL(ApplicationUser, String, Avatar.Size)
but returns an absolute URL. | |||||||||||
This is the same as
getAvatarURL(ApplicationUser, String, 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.
| |||||||||||
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 is the same as
getAvatarURL(ApplicationUser, String, Size) but does no permission checking. | |||||||||||
This is the same as #getAvatarURL(.ApplicationUser, String, Size) but does no permission checking.
| |||||||||||
Builds a URI for a JIRA avatar with the requested size.
| |||||||||||
If Gravatar is enabled returns Gravatar url for given user at given size.
| |||||||||||
Returns the URL for the avatar of the given project.
| |||||||||||
Returns the URL for the avatar of the given project.
| |||||||||||
Returns the URL for the default avatar of a project.
| |||||||||||
Returns the URL for the default avatar of a project.
| |||||||||||
Returns true if the user has configured a custom avatar, false otherwise.
| |||||||||||
Returns true if the user has configured a custom avatar, false otherwise.
| |||||||||||
Returns true if Gravatar support is enabled.
| |||||||||||
Check whether a user currently has an external avatar (for example, a Gravatar).
| |||||||||||
Sets a custom avatar for a given user.
| |||||||||||
Sets a custom avatar for a given user.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the avatar id that is configured for the given User.
| |||||||||||
Returns the anonymous avatar, if configured.
| |||||||||||
Sets the given avatar id as the configured avatar id for a user.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.avatar.AvatarService
|
Injectable constructor.
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 |
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 |
---|---|
username | a String containing a username (may have been deleted) |
AvatarsDisabledException |
---|
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 |
---|
This is the same as
getAvatarURL(ApplicationUser, String, Avatar.Size)
but returns an absolute URL.
AvatarsDisabledException |
---|
This is the same as
getAvatarURL(ApplicationUser, String, Avatar.Size)
but returns an absolute URL.
AvatarsDisabledException |
---|
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 |
---|---|
username | a String containing a username (may have been deleted) |
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.
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 |
---|
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 |
---|
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 |
---|
This is the same as getAvatarURL(ApplicationUser, String, 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 |
AvatarsDisabledException |
---|
This is the same as #getAvatarURL(.ApplicationUser, String, 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 |
AvatarsDisabledException |
---|
Builds a URI for a JIRA avatar with the requested size.
avatarUser | the ApplicationUser whose avatar we'd like to display |
---|---|
avatar | the Avatar whose URI we want |
size | the size in which the avatar should be displayed |
If Gravatar is enabled returns Gravatar url for given user at given size.
avatarUser | a User to get the avatar for (if null, Optional.empty() is returned) |
---|---|
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.
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) |
Returns the URL for the default avatar of a project.
This will always return an absolute URL (eg. "http://example.com/jira/...").
size | the size of the avatar to be displayed (if null, the default size is used) |
---|
Returns the URL for the default avatar of a 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/...").
size | the size of the avatar to be displayed (if null, the default size is used) |
---|
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 |
Returns true if the user has configured a custom avatar, false otherwise.
remoteUser | a User object for the currently logged in user |
---|---|
user | the username of the user whose avatar we will check |
Returns true if Gravatar support is enabled.
Check whether a user currently has an external avatar (for example, a Gravatar).
Use getAvatarURL(ApplicationUser, ApplicationUser)
to get the avatar URL.
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 |
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 |
Returns the avatar id that is configured for the given User. If the user has not configured an avatar, this method returns null.
user | the user whose avatar we want |
---|
Returns the anonymous avatar, if configured. Otherwise returns null.
Sets the given avatar id as the configured avatar id for a user.
user | the User whose avatar is being configured |
---|---|
avatarId | the avatar id to configure |