com.atlassian.jira.avatar.types
Class BasicAvatarsImageResolver

java.lang.Object
  extended by com.atlassian.jira.avatar.types.BasicAvatarsImageResolver
All Implemented Interfaces:
AvatarImageResolver
Direct Known Subclasses:
IssueTypeAvatarImageResolver, ProjectAvatarImageResolver

public class BasicAvatarsImageResolver
extends Object
implements AvatarImageResolver


Field Summary
static String AVATAR_ID_PARAM
           
static String AVATAR_TYPE_PARAM
           
static String PATH_PREFIX
           
static String SIZE_PARAM
           
 
Constructor Summary
BasicAvatarsImageResolver(Avatar.Type type, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AVATAR_ID_PARAM

public static final String AVATAR_ID_PARAM
See Also:
Constant Field Values

SIZE_PARAM

public static final String SIZE_PARAM
See Also:
Constant Field Values

PATH_PREFIX

public static final String PATH_PREFIX
See Also:
Constant Field Values

AVATAR_TYPE_PARAM

public static final String AVATAR_TYPE_PARAM
See Also:
Constant Field Values
Constructor Detail

BasicAvatarsImageResolver

public BasicAvatarsImageResolver(Avatar.Type type,
                                 VelocityRequestContextFactory velocityRequestContextFactory,
                                 ApplicationProperties applicationProperties)
Method Detail

getAvatarAbsoluteUri

public URI getAvatarAbsoluteUri(ApplicationUser avatarUser,
                                Avatar avatar,
                                Avatar.Size requestedSize)
Description copied from interface: AvatarImageResolver
Return absolute link to display avatar image of given size.

Specified by:
getAvatarAbsoluteUri in interface AvatarImageResolver
Parameters:
avatarUser - user that access avatar - null can be used for anonymous access.
avatar - avatar where to look for images
requestedSize - requested size or null if default size shoul be used.
Returns:
abslute url

getAvatarRelativeUri

public URI getAvatarRelativeUri(ApplicationUser remoteUser,
                                Avatar avatar,
                                Avatar.Size requestedSize)
Description copied from interface: AvatarImageResolver
Return link (relative to application context) to display avatar image of given size.

Specified by:
getAvatarRelativeUri in interface AvatarImageResolver
Parameters:
remoteUser - user that access avatar - null can be used for anonymous access.
avatar - avatar where to look for images
requestedSize - requested size or null if default size shoul be used.
Returns:
uri path, querty, hash part thats leads to avatar with given size, relative to servletContext


Copyright © 2002-2014 Atlassian. All Rights Reserved.