Package com.atlassian.jira.favourites
Class CachingFavouritesStore
java.lang.Object
com.atlassian.jira.favourites.CachingFavouritesStore
- All Implemented Interfaces:
Startable,FavouritesStore,InitializingComponent
public class CachingFavouritesStore
extends Object
implements FavouritesStore, Startable, InitializingComponent
Cache is keyed on userkey:type. This is very broken, but no more broken than any
of the other caches.
- Since:
- v3.13
-
Constructor Summary
ConstructorsConstructorDescriptionCachingFavouritesStore(FavouritesStore delegateStore, com.atlassian.cache.CacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddFavourite(ApplicationUser user, SharedEntity entity) Create Favourites association between User and entityvoidCalled after all the beans are constructed and the ApplicationContext is fully populated.getFavouriteIds(ApplicationUser user, SharedEntity.TypeDescriptor<?> entityType) Get the ids of a user's favourite Entities for a given entity typegetFavouriteIds(String userKey, SharedEntity.TypeDescriptor<?> entityType) Get the ids of a user's favourite Entities for a given entity typebooleanisFavourite(ApplicationUser user, SharedEntity entity) Checks to see if entity is a favourite of the user passed in.voidonClearCache(ClearCacheEvent event) voidbooleanremoveFavourite(ApplicationUser user, SharedEntity entity) Remove Favourites association between User and entityvoidRemove all favourite associations for a given entity.voidremoveFavouritesForUser(ApplicationUser user, SharedEntity.TypeDescriptor<?> entityType) Remove the favourite associations for the given User and the given typevoidstart()This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.voidupdateSequence(ApplicationUser user, List<? extends SharedEntity> favouriteEntities) Called to update the sequence of a list of favouriteshared entities
-
Constructor Details
-
CachingFavouritesStore
public CachingFavouritesStore(FavouritesStore delegateStore, com.atlassian.cache.CacheManager cacheManager)
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponentCalled after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiationin interfaceInitializingComponent- Throws:
Exception
-
onClearCache
-
onFavouriteAssociationsFKChangedEvent
@EventListener public void onFavouriteAssociationsFKChangedEvent(FavouriteAssociationsFKChangedEvent event) -
updateSequence
Description copied from interface:FavouritesStoreCalled to update the sequence of a list of favouriteshared entities- Specified by:
updateSequencein interfaceFavouritesStore- Parameters:
user- the user in playfavouriteEntities- the list specifying the order of theSharedEntitys
-
start
Description copied from interface:StartableThis method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
-