Package play.mvc

Class Http.Flash

java.lang.Object
play.mvc.Http.Flash
Enclosing class:
Http

public static class Http.Flash extends Object
HTTP Flash.

Flash data are encoded into an HTTP cookie, and can only contain simple String values.

  • Constructor Details

    • Flash

      public Flash()
    • Flash

      public Flash(Map<String,String> data)
    • Flash

      public Flash(play.api.mvc.Flash underlying)
  • Method Details

    • data

      public Map<String,String> data()
    • get

      public Optional<String> get(String key)
      Optionally returns the flash scope value associated with a key.
    • getOptional

      @Deprecated public Optional<String> getOptional(String key)
      Deprecated.
      Deprecated as of 2.8.0. Renamed to get(String).
      Optionally returns the flash scope value associated with a key.
    • apply

      @Deprecated public Optional<String> apply(String key)
      Deprecated.
      Deprecated as of 2.8.0. Use get(String) instead.
      Optionally returns the flash value associated with a key.
    • removing

      public Http.Flash removing(String... keys)
      Returns a new flash with the given keys removed.
    • adding

      public Http.Flash adding(String key, String value)
      Returns a new flash with the given key-value pair added.
    • adding

      public Http.Flash adding(Map<String,String> values)
      Returns a new flash with the values from the given map added.
    • asScala

      public play.api.mvc.Flash asScala()
      Convert this flash to a Scala flash.
      Returns:
      the Scala flash.