Class BlogCacheManager.AllPostCache

java.lang.Object
org.ametys.plugins.blog.BlogCacheManager.AllPostCache
Enclosing class:
BlogCacheManager

protected static class BlogCacheManager.AllPostCache extends Object
Cache of all the posts.
  • Constructor Details

    • AllPostCache

      public AllPostCache()
      Construct a AllPostCache instance.
  • Method Details

    • getPostIds

      public Set<String> getPostIds()
      Get a list of all the posts' IDs.
      Returns:
      all the posts' IDs as a Set.
    • getPosts

      Get the exhaustive list of Posts.
      Returns:
      the exhaustive list of Posts.
    • getPost

      Test if a post exists, provided its ID.
      Parameters:
      id - the post content ID.
      Returns:
      true if the post exists.
    • hasPost

      public boolean hasPost(String id)
      Test if a post exists, provided its ID.
      Parameters:
      id - the post content ID.
      Returns:
      true if the post exists.
    • getPostByName

      Test if a post exists, provided its content name.
      Parameters:
      name - the post content name.
      Returns:
      true if the post exists.
    • hasPostByName

      public boolean hasPostByName(String name)
      Test if a post exists, provided its content name.
      Parameters:
      name - the post content name.
      Returns:
      true if the post exists.
    • addPost

      public void addPost(Content content)
      Add a post to the cache.
      Parameters:
      content - the post content.
    • addPost

      public void addPost(BlogCacheManager.Post post)
      Add a post to the cache.
      Parameters:
      post - The post
    • removePost

      public void removePost(Content content)
      Remove a post from the cache.
      Parameters:
      content - the post content to remove from the cache.
    • removePost

      public void removePost(String id, String name)
      Remove a post from the cache.
      Parameters:
      id - The id of post
      name - The name of post
    • clear

      public void clear()
      Clear the cache.