Package io.meeds.appcenter.storage
Class ApplicationCategoryStorage
java.lang.Object
io.meeds.appcenter.storage.ApplicationCategoryStorage
The applications linked to a category or to one of its sub-categories, as
the Shortcuts portlet lists them, cached per category: reading a subtree's
links costs one query per category of the subtree.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears every category's applications: a link, a category creation, move or deletion can change any subtree.getApplicationIds(long categoryId) Reads the ids of the applications linked to a category or to any of its sub-categories, whatever their depth: the category's own links first, then its sub-categories' in the order the category service returns them, each application once.
-
Field Details
-
CACHE_NAME
- See Also:
-
-
Constructor Details
-
ApplicationCategoryStorage
public ApplicationCategoryStorage()
-
-
Method Details
-
getApplicationIds
@Cacheable(cacheNames="app-center.category.apps", key="#p0", sync=true) public List<Long> getApplicationIds(long categoryId) Reads the ids of the applications linked to a category or to any of its sub-categories, whatever their depth: the category's own links first, then its sub-categories' in the order the category service returns them, each application once. Nothing in the value depends on the viewer: access, activation and order are decided by the caller on each read. The links of applications are stored under the application id as is, sinceApplicationCategoryPlugindoes not rewrite the linked object, so the list read of links needs no plugin normalisation.- Parameters:
categoryId- the selected category- Returns:
- the linked application ids, never null, not modifiable
-
clearCache
@CacheEvict(cacheNames="app-center.category.apps", allEntries=true) public void clearCache()Clears every category's applications: a link, a category creation, move or deletion can change any subtree.
-