public class BasicAvatarsImageResolver extends Object implements AvatarImageResolver
Modifier and Type | Field and Description |
---|---|
static String |
AVATAR_ID_PARAM |
static String |
AVATAR_TYPE_PARAM |
static String |
PATH_PREFIX |
static String |
SIZE_PARAM |
Constructor and Description |
---|
BasicAvatarsImageResolver(Avatar.Type type,
VelocityRequestContextFactory velocityRequestContextFactory,
ApplicationProperties applicationProperties) |
Modifier and Type | Method and Description |
---|---|
URI |
getAvatarAbsoluteUri(ApplicationUser avatarUser,
Avatar avatar,
Avatar.Size requestedSize)
Return absolute link to display avatar image of given size.
|
URI |
getAvatarRelativeUri(ApplicationUser remoteUser,
Avatar avatar,
Avatar.Size requestedSize)
Return link (relative to application context) to display avatar image of given size.
|
public static final String AVATAR_ID_PARAM
public static final String SIZE_PARAM
public static final String PATH_PREFIX
public static final String AVATAR_TYPE_PARAM
public BasicAvatarsImageResolver(Avatar.Type type, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties)
public URI getAvatarAbsoluteUri(ApplicationUser avatarUser, Avatar avatar, Avatar.Size requestedSize)
AvatarImageResolver
getAvatarAbsoluteUri
in interface AvatarImageResolver
avatarUser
- user that access avatar - null can be used for anonymous access.avatar
- avatar where to look for imagesrequestedSize
- requested size or null if default size should be used.public URI getAvatarRelativeUri(ApplicationUser remoteUser, Avatar avatar, Avatar.Size requestedSize)
AvatarImageResolver
getAvatarRelativeUri
in interface AvatarImageResolver
remoteUser
- user that access avatar - null can be used for anonymous access.avatar
- avatar where to look for imagesrequestedSize
- requested size or null if default size should be used.Copyright © 2002-2015 Atlassian. All Rights Reserved.