|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.avatar.CachingAvatarStore
public class CachingAvatarStore
A caching implementation of the AvatarStore.
Constructor Summary | |
---|---|
CachingAvatarStore(AvatarStore delegate,
com.atlassian.event.api.EventPublisher eventPublisher)
|
Method Summary | |
---|---|
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. |
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 |
onClearCache(ClearCacheEvent event)
|
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
void |
update(Avatar avatar)
Updates an avatar's properties to match those in the given avatar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingAvatarStore(AvatarStore delegate, com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail |
---|
public void start() throws Exception
Startable
start
in interface Startable
Exception
- Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public Avatar getById(Long avatarId) throws DataAccessException
AvatarStore
getById
in interface AvatarStore
avatarId
- the avatar's id, must not be null.
DataAccessException
- if there is a back-end storage problem.public boolean delete(Long avatarId) throws DataAccessException
AvatarStore
delete
in interface AvatarStore
avatarId
- the avatar's id, must not be null.
DataAccessException
- if there is a back-end storage problem.public void update(Avatar avatar) throws DataAccessException
AvatarStore
update
in interface AvatarStore
avatar
- the avatar to update, must not be null.
DataAccessException
- if there is a back-end storage problem.public Avatar create(Avatar avatar) throws DataAccessException
AvatarStore
create
in interface AvatarStore
avatar
- the to create, must not be null, must have a null id.
DataAccessException
- if there is a back-end storage problem.public List<Avatar> getAllSystemAvatars(Avatar.Type type) throws DataAccessException
AvatarStore
getAllSystemAvatars
in interface AvatarStore
type
- the types of avatar to retrieve
DataAccessException
- if there is a back-end database problem.public List<Avatar> getCustomAvatarsForOwner(Avatar.Type type, String ownerId) throws DataAccessException
AvatarStore
getCustomAvatarsForOwner
in interface AvatarStore
type
- the desired type of the avatars to retrieve.ownerId
- the id of the owner, matches the type.
DataAccessException
- if there is a back-end database problem.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |