Package io.mangoo.routing.bindings
Class Flash
java.lang.Object
io.mangoo.routing.bindings.Flash
- Author:
- svenkubiak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Flashcreate()Retrieves a specific value from the flashbooleanvoidInvalidates the flash by sending expiring the client cookiebooleanbooleanvoidAdds a value with a specific key to the flash overwriting an existing valuesetDiscard(boolean discard) voidSets a specific error message available with the key 'error'voidsetSuccess(String value) Sets a specific success message available with the key 'success'voidsetWarning(String value) Sets a specific warning message available with the key 'warning'withContent(Map<String, String> values)
-
Constructor Details
-
Flash
public Flash()
-
-
Method Details
-
create
-
withContent
-
setError
Sets a specific error message available with the key 'error'- Parameters:
value- The message
-
setWarning
Sets a specific warning message available with the key 'warning'- Parameters:
value- The message
-
setSuccess
Sets a specific success message available with the key 'success'- Parameters:
value- The message
-
put
Adds a value with a specific key to the flash overwriting an existing value- Parameters:
key- The keyvalue- The value
-
invalidate
public void invalidate()Invalidates the flash by sending expiring the client cookie -
get
Retrieves a specific value from the flash- Parameters:
key- The key- Returns:
- The value or null if not found
-
getValues
-
isDiscard
public boolean isDiscard() -
isInvalid
public boolean isInvalid() -
setDiscard
-
hasContent
public boolean hasContent()
-