public Session(play.api.mvc.Session underlying) { this(Scala.asJava(underlying.data())); }
public Session(play.api.mvc.Session underlying) { this(Scala.asJava(underlying.data())); }
public Session(play.api.mvc.Session underlying) { this(Scala.asJava(underlying.data())); }
/** * @return the sessions in the request */ public Map<String,String> session() { return Scala.asJava(req.session().data()); }
/** * @return the sessions in the request */ public Map<String,String> session() { return Scala.asJava(req.session().data()); }
/** * @return the sessions in the request */ public Map<String,String> session() { return Scala.asJava(req.session().data()); }
/** * 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; }
/** * Creates a new HTTP context. * * @param request the HTTP request */ public Context(Request request) { this.request = request; this.header = request._underlyingHeader(); this.id = header.id(); this.response = new Response(); this.session = new Session(JavaConversions.mapAsJavaMap(header.session().data())); this.flash = new Flash(JavaConversions.mapAsJavaMap(header.flash().data())); this.args = new HashMap<String,Object>(); this.args.putAll(JavaConversions.mapAsJavaMap(header.tags())); }