public interface GravatarService
This class is thread-safe, Gravatar objects can be shared.
Currently this service is set to only allow images for general audiences and the Default image is hardcoded.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_GRAVATAR_URL |
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultGravatarUrl(int size)
Returns the url for the default gravatar.
|
String |
getGravatarServerUrl() |
String |
getGravatarUrl(String email)
Returns A gravatar for the given emails with the default size of 25 pixels.
|
String |
getGravatarUrl(String email,
int size) |
boolean |
isGravatarSupportEnabled() |
void |
setGravatarSupported(boolean enabled,
String newUrl)
Updates whether or not gravatars are enabled for this Bamboo instance
|
static final String DEFAULT_GRAVATAR_URL
@Nullable String getGravatarUrl(@Nullable String email, int size)
email - to get gravatar url forsize - Specify a gravatar size between 1 and 512 pixels.@Nullable String getGravatarUrl(@Nullable String email)
email - to get gravatar url for@Nullable String getDefaultGravatarUrl(int size)
size - a gravatar size between 1 and 512 pixels.void setGravatarSupported(boolean enabled,
@NotNull
String newUrl)
enabled - whether its enabled or notnewUrl - the URL of the Gravatar server the user wants to useboolean isGravatarSupportEnabled()
@NotNull String getGravatarServerUrl()
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.