Package com.atlassian.bamboo.avatar
Class HigherOrderAvatarProviderImpl
- java.lang.Object
-
- com.atlassian.bamboo.avatar.HigherOrderAvatarProviderImpl
-
- All Implemented Interfaces:
HigherOrderAvatarProvider
public class HigherOrderAvatarProviderImpl extends Object implements HigherOrderAvatarProvider
-
-
Constructor Summary
Constructors Constructor Description HigherOrderAvatarProviderImpl(AvatarService avatarService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull io.atlassian.fugue.Either<String,CacheableAvatarSupplier>
getForAnonymousUser(int size)
Returns either the avatar supplier or the gravatar url for an anonymous user.@NotNull io.atlassian.fugue.Either<String,CacheableAvatarSupplier>
getForUser(@NotNull com.atlassian.user.User user, int size)
Returns either the avatar supplier or the gravatar url for the given user.protected GravatarService
getGravatarService()
-
-
-
Constructor Detail
-
HigherOrderAvatarProviderImpl
@Inject public HigherOrderAvatarProviderImpl(AvatarService avatarService)
-
-
Method Detail
-
getGravatarService
protected GravatarService getGravatarService()
-
getForUser
@NotNull public @NotNull io.atlassian.fugue.Either<String,CacheableAvatarSupplier> getForUser(@NotNull @NotNull com.atlassian.user.User user, int size)
Description copied from interface:HigherOrderAvatarProvider
Returns either the avatar supplier or the gravatar url for the given user. All UI related use cases.- Specified by:
getForUser
in interfaceHigherOrderAvatarProvider
- Parameters:
user
- the user to get the avatar forsize
- the size to retrieve the avatar in- Returns:
- either the avatar supplier for the given user or gravatar url
-
getForAnonymousUser
@NotNull public @NotNull io.atlassian.fugue.Either<String,CacheableAvatarSupplier> getForAnonymousUser(int size)
Description copied from interface:HigherOrderAvatarProvider
Returns either the avatar supplier or the gravatar url for an anonymous user. All UI related use cases.- Specified by:
getForAnonymousUser
in interfaceHigherOrderAvatarProvider
- Parameters:
size
- the size to retrieve the avatar in- Returns:
- either the avatar supplier or gravatar url
-
-