Package org.ametys.plugins.blog
Class BlogCacheManager.FuturePostCache
- java.lang.Object
-
- org.ametys.plugins.blog.BlogCacheManager.FuturePostCache
-
- Enclosing class:
- BlogCacheManager
protected static class BlogCacheManager.FuturePostCache extends Object
Cache of identifier of the future posts.
-
-
Constructor Summary
Constructors Constructor Description FuturePostCache()
Construct a AllPostCache instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPost(Content content)
Add a post to the cache.void
clear()
Clear the cache.BlogCacheManager.Post
getPost(String id)
Test if a post exists, provided its ID.boolean
hasPost(String id)
Test if a post exists, provided its ID.Collection<BlogCacheManager.Post>
removePastPosts()
Remove the post that are not future anymore (given the current date)void
removePost(Content content)
Remove a post from the cache.void
removePost(BlogCacheManager.Post post)
Remove a post from the cache.
-
-
-
Constructor Detail
-
FuturePostCache
public FuturePostCache()
Construct a AllPostCache instance.
-
-
Method Detail
-
removePastPosts
public Collection<BlogCacheManager.Post> removePastPosts()
Remove the post that are not future anymore (given the current date)- Returns:
- The collection of past posts
-
getPost
public BlogCacheManager.Post getPost(String id)
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.
-
addPost
public void addPost(Content content)
Add a post to the cache.- Parameters:
content
- the post content.
-
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(BlogCacheManager.Post post)
Remove a post from the cache.- Parameters:
post
- the post content to remove from the cache.
-
clear
public void clear()
Clear the cache.
-
-