public class CachingTaggingAvatarStore extends Object implements AvatarStore
| Modifier and Type | Field and Description |
|---|---|
static String |
AVATAR_ENTITY |
static String |
AVATAR_TYPE |
static String |
CONTENT_TYPE |
static String |
FILE_NAME |
static String |
ID |
static String |
OWNER |
static String |
SYSTEM_AVATAR |
| Constructor and Description |
|---|
CachingTaggingAvatarStore(OfBizDelegator ofBizDelegator,
AvatarTagger avatarTagger,
com.atlassian.cache.CacheManager cacheManager) |
| Modifier and Type | Method and Description |
|---|---|
Avatar |
create(Avatar avatar)
Creates an avatar with the properties of the given avatar.
|
boolean |
delete(Long avatarId)
Permanently removes the avatar from the system.
|
List<Avatar> |
getAllSystemAvatars(IconType iconType)
Provides a list of all system avatars.
|
Avatar |
getById(Long avatarId)
Retrieves the Avatar by id.
|
Avatar |
getByIdTagged(Long avatarId)
Retrieves the Avatar by id,
ensuring the avatar file is tagged with metadata identifying the image came from JIRA.
|
List<Avatar> |
getCustomAvatarsForOwner(IconType iconType,
String ownerId)
Provides a list of all avatars that are of the given type which have the given owner.
|
List<Avatar> |
getSystemAvatarsForFilename(IconType iconType,
String filename)
Get the system icon with a particular filename.
|
void |
onClearCache(ClearCacheEvent event) |
void |
update(Avatar avatar)
Updates an avatar's properties to match those in the given avatar.
|
public static final String AVATAR_ENTITY
public static final String ID
public static final String FILE_NAME
public static final String CONTENT_TYPE
public static final String AVATAR_TYPE
public static final String OWNER
public static final String SYSTEM_AVATAR
public CachingTaggingAvatarStore(OfBizDelegator ofBizDelegator, AvatarTagger avatarTagger, com.atlassian.cache.CacheManager cacheManager)
public Avatar getById(Long avatarId)
AvatarStoregetById in interface AvatarStoreavatarId - the avatar's id, must not be null.public Avatar getByIdTagged(Long avatarId)
AvatarStoregetByIdTagged in interface AvatarStoreavatarId - the avatar's id, must not be null.public boolean delete(Long avatarId)
AvatarStoredelete in interface AvatarStoreavatarId - the avatar's id, must not be null.public void update(Avatar avatar)
AvatarStoreupdate in interface AvatarStoreavatar - the avatar to update, must not be null.public Avatar create(Avatar avatar)
AvatarStorecreate in interface AvatarStoreavatar - the to create, must not be null, must have a null id.public List<Avatar> getAllSystemAvatars(IconType iconType)
AvatarStoregetAllSystemAvatars in interface AvatarStoreiconType - the types of avatar to retrievepublic List<Avatar> getCustomAvatarsForOwner(IconType iconType, String ownerId)
AvatarStoregetCustomAvatarsForOwner in interface AvatarStoreiconType - the desired type of the avatars to retrieve.ownerId - the id of the owner, matches the type (project id or user key).public List<Avatar> getSystemAvatarsForFilename(IconType iconType, String filename) throws DataAccessException
AvatarStoregetSystemAvatarsForFilename in interface AvatarStoreiconType - The type of icon to return.filename - The filename.DataAccessException - back end DB problem.@EventListener public void onClearCache(ClearCacheEvent event)
Copyright © 2002-2016 Atlassian. All Rights Reserved.