/** * Convert this session to a Scala session. * * @return the Scala session. */ public play.api.mvc.Session asScala() { return new play.api.mvc.Session(Scala.asScala(this)); }
/** * Convert this session to a Scala session. * * @return the Scala session. */ public play.api.mvc.Session asScala() { return new play.api.mvc.Session(Scala.asScala(this)); }
/** * Convert this session to a Scala session. * * @return the Scala session. */ public play.api.mvc.Session asScala() { return new play.api.mvc.Session(Scala.asScala(this)); }
/** * Sets all parameters for the session. * @param data a key value mapping of the session data * @return the builder instance */ public RequestBuilder session(Map<String,String> data) { play.api.mvc.Session session = new play.api.mvc.Session(asScala(data)); cookies(JavaConversions.asScalaBuffer(Arrays.asList(play.api.mvc.Session$.MODULE$.encodeAsCookie(session)))); return this; }
/** * Returns a new session with the given keys removed. */ public Session removing(String... keys) { return new play.api.mvc.Session(Scala.asScala(this)).$minus$minus(Scala.toSeq(keys)).asJava(); }
/** * Returns a new session with the given keys removed. */ public Session removing(String... keys) { return new play.api.mvc.Session(Scala.asScala(this)).$minus$minus(Scala.toSeq(keys)).asJava(); }
/** * Returns a new session with the given key-value pair added. */ public Session adding(String key, String value) { return new play.api.mvc.Session(Scala.asScala(this)).$plus(Scala.Tuple(key, value)).asJava(); }
/** * Returns a new session with the given key-value pair added. */ public Session adding(String key, String value) { return new play.api.mvc.Session(Scala.asScala(this)).$plus(Scala.Tuple(key, value)).asJava(); }
/** * Returns a new session with the given key-value pair added. */ public Session adding(String key, String value) { return new play.api.mvc.Session(Scala.asScala(this)).$plus(Scala.Tuple(key, value)).asJava(); }
/** * Returns a new session with the values from the given map added. */ public Session adding(Map<String, String> values) { return new play.api.mvc.Session(Scala.asScala(this)).$plus$plus(Scala.asScala(values)).asJava(); }
/** * Returns a new session with the values from the given map added. */ public Session adding(Map<String, String> values) { return new play.api.mvc.Session(Scala.asScala(this)).$plus$plus(Scala.asScala(values)).asJava(); }
/** * Returns a new session with the given keys removed. */ public Session removing(String... keys) { return new play.api.mvc.Session(Scala.asScala(this)).$minus$minus(Scala.toSeq(keys)).asJava(); }
/** * Returns a new session with the values from the given map added. */ public Session adding(Map<String, String> values) { return new play.api.mvc.Session(Scala.asScala(this)).$plus$plus(Scala.asScala(values)).asJava(); }
/** * Sets all parameters for the session. * @param data a key value mapping of the session data * @return the builder instance */ public RequestBuilder session(Map<String,String> data) { play.api.mvc.Session session = new play.api.mvc.Session(Scala.asScala(data)); attr(new TypedKey<>(RequestAttrKey.Session()), new AssignedCell<>(session)); return this; }
/** * Sets all parameters for the session. * @param data a key value mapping of the session data * @return the builder instance */ public RequestBuilder session(Map<String,String> data) { play.api.mvc.Session session = new play.api.mvc.Session(Scala.asScala(data)); attr(new TypedKey<>(RequestAttrKey.Session()), new AssignedCell<>(session)); return this; }
/** * Sets all parameters for the session. * @param data a key value mapping of the session data * @return the builder instance */ public RequestBuilder session(Map<String,String> data) { play.api.mvc.Session session = new play.api.mvc.Session(Scala.asScala(data)); attr(new TypedKey<>(RequestAttrKey.Session()), new AssignedCell<>(session)); return this; }
/** * Sets a session. * @param key the key for the session * @param value the value associated with the key for the session * @return the builder instance */ public RequestBuilder session(String key, String value) { scala.collection.immutable.Map<String,String> data = req.session().data(); scala.collection.immutable.Map<String,String> newData = data.updated(key, value); play.api.mvc.Session newSession = new play.api.mvc.Session(newData); attr(new TypedKey<>(RequestAttrKey.Session()), new AssignedCell<>(newSession)); return this; }
/** * Sets a session. * @param key the key for the session * @param value the value associated with the key for the session * @return the builder instance */ public RequestBuilder session(String key, String value) { scala.collection.immutable.Map<String,String> data = req.session().data(); scala.collection.immutable.Map<String,String> newData = data.updated(key, value); play.api.mvc.Session newSession = new play.api.mvc.Session(newData); attr(new TypedKey<>(RequestAttrKey.Session()), new AssignedCell<>(newSession)); return this; }
/** * Sets a session. * @param key the key for the session * @param value the value associated with the key for the session * @return the builder instance */ public RequestBuilder session(String key, String value) { scala.collection.immutable.Map<String,String> data = req.session().data(); scala.collection.immutable.Map<String,String> newData = data.updated(key, value); play.api.mvc.Session newSession = new play.api.mvc.Session(newData); attr(new TypedKey<>(RequestAttrKey.Session()), new AssignedCell<>(newSession)); return this; }