Class ApplicationCategoryStorage

java.lang.Object
io.meeds.appcenter.storage.ApplicationCategoryStorage

@Component public class ApplicationCategoryStorage extends Object
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
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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, since ApplicationCategoryPlugin does 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.