/** * Returns a new flash with the given keys removed. */ public Flash removing(String... keys) { return new play.api.mvc.Flash(Scala.asScala(this)).$minus$minus(Scala.toSeq(keys)).asJava(); }
public Flash(play.api.mvc.Flash underlying) { this(Scala.asJava(underlying.data())); }
/** * Returns a new flash with the given key-value pair added. */ public Flash adding(String key, String value) { return new play.api.mvc.Flash(Scala.asScala(this)).$plus(Scala.Tuple(key, value)).asJava(); }
/** * Returns a new flash with the values from the given map added. */ public Flash adding(Map<String, String> values) { return new play.api.mvc.Flash(Scala.asScala(this)).$plus$plus(Scala.asScala(values)).asJava(); }
/** * Sets a cookie in the request. * @param key the key for the cookie * @param value the value for the cookie * @return the builder instance */ public RequestBuilder flash(String key, String value) { scala.collection.immutable.Map<String,String> data = req.flash().data(); scala.collection.immutable.Map<String,String> newData = data.updated(key, value); play.api.mvc.Flash newFlash = new play.api.mvc.Flash(newData); attr(new TypedKey<>(RequestAttrKey.Flash()), new AssignedCell<>(newFlash)); return this; }
/** * Convert this flash to a Scala flash. * * @return the Scala flash. */ public play.api.mvc.Flash asScala() { return new play.api.mvc.Flash(Scala.asScala(this)); }
/** * Parses the Flash cookie and returns the Flash data. The request's flash cookie is stored in an attribute indexed by * {@link RequestAttrKey#Flash()}}. The attribute uses a {@link Cell} to store the flash, to allow it to be evaluated on-demand. */ default Flash flash() { return attrs().get(RequestAttrKey.Flash().asJava()).value().asJava(); }
/** * Convert this result to a Scala result. * * @return the Scala result. */ public play.api.mvc.Result asScala() { return new play.api.mvc.Result( header.asScala(), body.asScala(), session == null ? Scala.None() : Scala.Option(play.api.mvc.Session.fromJavaSession(session)), flash == null ? Scala.None() : Scala.Option(play.api.mvc.Flash.fromJavaFlash(flash)), JavaHelpers$.MODULE$.cookiesToScalaCookies(cookies) ); } }
/** * Returns a new flash with the values from the given map added. */ public Flash adding(Map<String, String> values) { return new play.api.mvc.Flash(Scala.asScala(this)).$plus$plus(Scala.asScala(values)).asJava(); }
/** * Sets a cookie in the request. * @param key the key for the cookie * @param value the value for the cookie * @return the builder instance */ public RequestBuilder flash(String key, String value) { scala.collection.immutable.Map<String,String> data = req.flash().data(); scala.collection.immutable.Map<String,String> newData = data.updated(key, value); play.api.mvc.Flash newFlash = new play.api.mvc.Flash(newData); attr(new TypedKey<>(RequestAttrKey.Flash()), new AssignedCell<>(newFlash)); return this; }
/** * Convert this flash to a Scala flash. * * @return the Scala flash. */ public play.api.mvc.Flash asScala() { return new play.api.mvc.Flash(Scala.asScala(this)); }
/** * Parses the Flash cookie and returns the Flash data. The request's flash cookie is stored in an attribute indexed by * {@link RequestAttrKey#Flash()}}. The attribute uses a {@link Cell} to store the flash, to allow it to be evaluated on-demand. */ default Flash flash() { return attrs().get(RequestAttrKey.Flash().asJava()).value().asJava(); }
/** * Convert this result to a Scala result. * * @return the Scala result. */ public play.api.mvc.Result asScala() { return new play.api.mvc.Result( header.asScala(), body.asScala(), session == null ? Scala.None() : Scala.Option(play.api.mvc.Session.fromJavaSession(session)), flash == null ? Scala.None() : Scala.Option(play.api.mvc.Flash.fromJavaFlash(flash)), JavaHelpers$.MODULE$.cookiesToScalaCookies(cookies) ); } }
/** * Returns a new flash with the given keys removed. */ public Flash removing(String... keys) { return new play.api.mvc.Flash(Scala.asScala(this)).$minus$minus(Scala.toSeq(keys)).asJava(); }
/** * Returns a new flash with the given key-value pair added. */ public Flash adding(String key, String value) { return new play.api.mvc.Flash(Scala.asScala(this)).$plus(Scala.Tuple(key, value)).asJava(); }
/** * Returns a new flash with the values from the given map added. */ public Flash adding(Map<String, String> values) { return new play.api.mvc.Flash(Scala.asScala(this)).$plus$plus(Scala.asScala(values)).asJava(); }
/** * Sets a cookie in the request. * @param key the key for the cookie * @param value the value for the cookie * @return the builder instance */ public RequestBuilder flash(String key, String value) { scala.collection.immutable.Map<String,String> data = req.flash().data(); scala.collection.immutable.Map<String,String> newData = data.updated(key, value); play.api.mvc.Flash newFlash = new play.api.mvc.Flash(newData); attr(new TypedKey<>(RequestAttrKey.Flash()), new AssignedCell<>(newFlash)); return this; }
public Flash(play.api.mvc.Flash underlying) { this(Scala.asJava(underlying.data())); }
/** * Convert this flash to a Scala flash. * * @return the Scala flash. */ public play.api.mvc.Flash asScala() { return new play.api.mvc.Flash(Scala.asScala(this)); }
/** * Parses the Flash cookie and returns the Flash data. The request's flash cookie is stored in an attribute indexed by * {@link RequestAttrKey#Flash()}}. The attribute uses a {@link Cell} to store the flash, to allow it to be evaluated on-demand. */ default Flash flash() { return attrs().get(RequestAttrKey.Flash().asJava()).value().asJava(); }