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(Avatar.Type type)
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(Avatar.Type type,
String ownerId)
Provides a list of all avatars that are of the given type which have the given owner.
|
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(Avatar.Type type)
AvatarStoregetAllSystemAvatars in interface AvatarStoretype - the types of avatar to retrievepublic List<Avatar> getCustomAvatarsForOwner(Avatar.Type type, String ownerId)
AvatarStoregetCustomAvatarsForOwner in interface AvatarStoretype - the desired type of the avatars to retrieve.ownerId - the id of the owner, matches the type (project id or user key).Copyright © 2002-2015 Atlassian. All Rights Reserved.