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)
AvatarStore
getById
in interface AvatarStore
avatarId
- the avatar's id, must not be null.public Avatar getByIdTagged(Long avatarId)
AvatarStore
getByIdTagged
in interface AvatarStore
avatarId
- the avatar's id, must not be null.public boolean delete(Long avatarId)
AvatarStore
delete
in interface AvatarStore
avatarId
- the avatar's id, must not be null.public void update(Avatar avatar)
AvatarStore
update
in interface AvatarStore
avatar
- the avatar to update, must not be null.public Avatar create(Avatar avatar)
AvatarStore
create
in interface AvatarStore
avatar
- the to create, must not be null, must have a null id.public List<Avatar> getAllSystemAvatars(IconType iconType)
AvatarStore
getAllSystemAvatars
in interface AvatarStore
iconType
- the types of avatar to retrievepublic List<Avatar> getCustomAvatarsForOwner(IconType iconType, String ownerId)
AvatarStore
getCustomAvatarsForOwner
in interface AvatarStore
iconType
- 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
AvatarStore
getSystemAvatarsForFilename
in interface AvatarStore
iconType
- The type of icon to return.filename
- The filename.DataAccessException
- back end DB problem.@EventListener public void onClearCache(ClearCacheEvent event)
Copyright © 2002-2019 Atlassian. All Rights Reserved.