public.javadoc.org.spincast.core.flash.FlashMessagesHolderDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
FlashMessagesHolderDefault (org.spincast:spincast-framework 1.0.0 API)
org.spincast.core.flash
Class FlashMessagesHolderDefault
- java.lang.Object
-
- org.spincast.core.flash.FlashMessagesHolderDefault
-
- All Implemented Interfaces:
- FlashMessagesHolder
public class FlashMessagesHolderDefault
extends Object
implements FlashMessagesHolder
TODO Use a Session?
-
-
Constructor Summary
Constructors
Constructor and Description
FlashMessagesHolderDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
protected com.google.common.cache.Cache<String,FlashMessage>
getCache()
protected int
getCacheExpirationInSeconds()
FlashMessage
getFlashMessage(String uuid,
boolean removeIt)
Gets a Flash Message from its id.
protected int
getMaxCacheItems()
String
saveFlashMessage(FlashMessage flashMessage)
Saves a Flash Message.
-
-
Method Detail
-
getCache
protected com.google.common.cache.Cache<String,FlashMessage> getCache()
-
getMaxCacheItems
protected int getMaxCacheItems()
-
getCacheExpirationInSeconds
protected int getCacheExpirationInSeconds()
-
saveFlashMessage
public String saveFlashMessage(FlashMessage flashMessage)
Description copied from interface: FlashMessagesHolder
Saves a Flash Message.
- Specified by:
saveFlashMessage
in interface FlashMessagesHolder
- Returns:
- a generated and unique ID for the Flash Message.
-
getFlashMessage
public FlashMessage getFlashMessage(String uuid,
boolean removeIt)
Description copied from interface: FlashMessagesHolder
Gets a Flash Message from its id.
- Specified by:
getFlashMessage
in interface FlashMessagesHolder
removeIt
- if true
, the Flash Message is
removed from the holder.
Copyright © 2019. All rights reserved.