Package org.spincast.core.flash
Class FlashMessagesHolderDefault
java.lang.Object
org.spincast.core.flash.FlashMessagesHolderDefault
- All Implemented Interfaces:
FlashMessagesHolder
TODO Use a Session?
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.common.cache.Cache<String,
FlashMessage> getCache()
protected int
getFlashMessage
(String uuid, boolean removeIt) Gets a Flash Message from its id.protected int
saveFlashMessage
(FlashMessage flashMessage) Saves a Flash Message.
-
Constructor Details
-
FlashMessagesHolderDefault
public FlashMessagesHolderDefault()
-
-
Method Details
-
getCache
-
getMaxCacheItems
protected int getMaxCacheItems() -
getCacheExpirationInSeconds
protected int getCacheExpirationInSeconds() -
saveFlashMessage
Description copied from interface:FlashMessagesHolder
Saves a Flash Message.- Specified by:
saveFlashMessage
in interfaceFlashMessagesHolder
- Returns:
- a generated and unique ID for the Flash Message.
-
getFlashMessage
Description copied from interface:FlashMessagesHolder
Gets a Flash Message from its id.- Specified by:
getFlashMessage
in interfaceFlashMessagesHolder
removeIt
- iftrue
, the Flash Message is removed from the holder.
-