Package org.ametys.plugins.blog
Class BlogCacheManager.FuturePostCache
java.lang.Object
org.ametys.plugins.blog.BlogCacheManager.FuturePostCache
- Enclosing class:
- BlogCacheManager
Cache of identifier of the future posts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a post to the cache.void
clear()
Clear the cache.Test if a post exists, provided its ID.boolean
Test if a post exists, provided its ID.Remove the post that are not future anymore (given the current date)void
removePost
(Content content) Remove a post from the cache.void
Remove a post from the cache.
-
Constructor Details
-
FuturePostCache
public FuturePostCache()Construct a AllPostCache instance.
-
-
Method Details
-
removePastPosts
Remove the post that are not future anymore (given the current date)- Returns:
- The collection of past posts
-
getPost
Test if a post exists, provided its ID.- Parameters:
id
- the post content ID.- Returns:
- true if the post exists.
-
hasPost
Test if a post exists, provided its ID.- Parameters:
id
- the post content ID.- Returns:
- true if the post exists.
-
addPost
Add a post to the cache.- Parameters:
content
- the post content.
-
removePost
Remove a post from the cache.- Parameters:
content
- the post content to remove from the cache.
-
removePost
Remove a post from the cache.- Parameters:
post
- the post content to remove from the cache.
-
clear
Clear the cache.
-