Class Flash

java.lang.Object
io.mangoo.routing.bindings.Flash

public class Flash extends Object
Author:
svenkubiak
  • Constructor Details

    • Flash

      public Flash()
  • Method Details

    • create

      public static Flash create()
    • withContent

      public Flash withContent(Map<String,String> values)
    • setError

      public void setError(String value)
      Sets a specific error message available with the key 'error'
      Parameters:
      value - The message
    • setWarning

      public void setWarning(String value)
      Sets a specific warning message available with the key 'warning'
      Parameters:
      value - The message
    • setSuccess

      public void setSuccess(String value)
      Sets a specific success message available with the key 'success'
      Parameters:
      value - The message
    • put

      public void put(String key, String value)
      Adds a value with a specific key to the flash overwriting an existing value
      Parameters:
      key - The key
      value - The value
    • invalidate

      public void invalidate()
      Invalidates the flash by sending expiring the client cookie
    • get

      public String get(String key)
      Retrieves a specific value from the flash
      Parameters:
      key - The key
      Returns:
      The value or null if not found
    • getValues

      public Map<String,String> getValues()
    • isDiscard

      public boolean isDiscard()
    • isInvalid

      public boolean isInvalid()
    • setDiscard

      public Flash setDiscard(boolean discard)
    • hasContent

      public boolean hasContent()