Class Flash


  • public class Flash
    extends Object
    Author:
    svenkubiak
    • Constructor Detail

      • Flash

        public Flash()
    • Method Detail

      • create

        public static Flash create()
      • 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
      • isDiscard

        public boolean isDiscard()
      • isInvalid

        public boolean isInvalid()
      • setDiscard

        public Flash setDiscard​(boolean discard)
      • hasContent

        public boolean hasContent()