public class JiraUserAvatarProvider extends Object implements com.atlassian.plugins.avatar.AvatarProvider<ApplicationUser,Long>
Constructor and Description |
---|
JiraUserAvatarProvider(BaseUrl baseUrl,
EncodingConfiguration encodingConfiguration,
GravatarSettings gravatarSettings,
AvatarManager avatarManager,
UserManager userManager,
UserPropertyManager userPropertyManager) |
JiraUserAvatarProvider(VelocityRequestContextFactory velocityRequestContextFactory,
GravatarSettings gravatarSettings,
AvatarManager avatarManager,
UserManager userManager,
UserPropertyManager userPropertyManager,
EncodingConfiguration encodingConfiguration)
Injectable constructor, to be deleted when
BaseUrl becomes an API component. |
Modifier and Type | Method and Description |
---|---|
protected Long |
configuredAvatarIdFor(ApplicationUser user)
Returns the avatar id that is configured for the given User.
|
com.atlassian.plugins.avatar.Avatar |
getAvatar(com.atlassian.plugins.avatar.AvatarOwner<ApplicationUser> avatarOwner,
com.google.common.base.Function<com.atlassian.plugins.avatar.AvatarOwner<ApplicationUser>,com.atlassian.plugins.avatar.Avatar> fallbackFunction,
int size) |
com.atlassian.plugins.avatar.Avatar |
getAvatar(com.atlassian.plugins.avatar.AvatarOwner<ApplicationUser> applicationUserAvatarOwner,
int size) |
com.atlassian.plugins.avatar.Avatar |
getAvatar(String email,
int size)
Gets the avatar for the user with the given userKey.
|
com.atlassian.plugins.avatar.Avatar |
getAvatarById(Long id,
int size) |
boolean |
isGravatarEnabled()
Returns true if Gravatar support is enabled.
|
boolean |
isUsingExternalAvatar(ApplicationUser avatarUser) |
public JiraUserAvatarProvider(VelocityRequestContextFactory velocityRequestContextFactory, GravatarSettings gravatarSettings, AvatarManager avatarManager, UserManager userManager, UserPropertyManager userPropertyManager, EncodingConfiguration encodingConfiguration)
BaseUrl
becomes an API component.public JiraUserAvatarProvider(BaseUrl baseUrl, EncodingConfiguration encodingConfiguration, GravatarSettings gravatarSettings, AvatarManager avatarManager, UserManager userManager, UserPropertyManager userPropertyManager)
public com.atlassian.plugins.avatar.Avatar getAvatar(String email, int size)
getAvatar
in interface com.atlassian.plugins.avatar.AvatarProvider<ApplicationUser,Long>
public com.atlassian.plugins.avatar.Avatar getAvatar(com.atlassian.plugins.avatar.AvatarOwner<ApplicationUser> applicationUserAvatarOwner, int size)
getAvatar
in interface com.atlassian.plugins.avatar.AvatarProvider<ApplicationUser,Long>
public com.atlassian.plugins.avatar.Avatar getAvatarById(Long id, int size)
getAvatarById
in interface com.atlassian.plugins.avatar.AvatarProvider<ApplicationUser,Long>
public com.atlassian.plugins.avatar.Avatar getAvatar(com.atlassian.plugins.avatar.AvatarOwner<ApplicationUser> avatarOwner, com.google.common.base.Function<com.atlassian.plugins.avatar.AvatarOwner<ApplicationUser>,com.atlassian.plugins.avatar.Avatar> fallbackFunction, int size)
getAvatar
in interface com.atlassian.plugins.avatar.AvatarProvider<ApplicationUser,Long>
public boolean isGravatarEnabled()
public boolean isUsingExternalAvatar(ApplicationUser avatarUser)
protected Long configuredAvatarIdFor(ApplicationUser user)
user
- the user whose avatar we wantAvatarManager.getDefaultAvatarId(com.atlassian.jira.avatar.Avatar.Type)
,
AvatarManager.getAnonymousAvatarId()
Copyright © 2002-2015 Atlassian. All Rights Reserved.