public class GravatarService extends Object implements AvatarService
Avatar thumbnail implementation for Gravatar. The current implementation omits rating and the default image (mistery man) of Gravatar is used in case Gravatar does not know the provided email address.
| Constructor and Description |
|---|
GravatarService(String gravatarBaseUrl,
org.springframework.core.io.Resource defaultAvatarResource,
String defaultAvatarMediaType,
int timeoutInMilliseconds) |
| Modifier and Type | Method and Description |
|---|---|
Thumbnail |
getAvatar(String email,
int size)
Gets the avatar
Thumbnail for a given email. |
Thumbnail |
getDefaultAvatar()
Gets the default avatar input stream which is stored on the file system.
|
public Thumbnail getAvatar(String email, int size)
AvatarServiceGets the avatar Thumbnail for a given email.
getAvatar in interface AvatarServiceemail - email address optional of the user for which to get the avatar thumbnailsize - the preferred size of the avatar image, 0 for the original sizepublic Thumbnail getDefaultAvatar()
AvatarServiceGets the default avatar input stream which is stored on the file system. Thus it does not need an active internet connection.
getDefaultAvatar in interface AvatarServiceCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.