public abstract static class Http.WrappedContext extends Http.Context
Http.Context.Implicit
args, current
Constructor and Description |
---|
WrappedContext(Http.Context wrapped) |
Modifier and Type | Method and Description |
---|---|
play.api.mvc.RequestHeader |
_requestHeader()
The original Play request Header used to create this context.
|
boolean |
changeLang(Lang lang)
Change durably the lang for the current user.
|
boolean |
changeLang(java.lang.String code)
Change durably the lang for the current user.
|
void |
clearLang()
Clear the lang for the current user.
|
Http.Flash |
flash()
Returns the current flash scope.
|
java.lang.Long |
id()
The context id (unique)
|
Lang |
lang() |
Http.Request |
request()
Returns the current request.
|
Http.Response |
response()
Returns the current response.
|
Http.Session |
session()
Returns the current session.
|
clearTransientLang, current, messages, setTransientLang, setTransientLang, toString, withRequest
public WrappedContext(Http.Context wrapped)
wrapped
- public java.lang.Long id()
Http.Context
id
in class Http.Context
public Http.Request request()
Http.Context
request
in class Http.Context
public Http.Response response()
Http.Context
response
in class Http.Context
public Http.Session session()
Http.Context
session
in class Http.Context
public Http.Flash flash()
Http.Context
flash
in class Http.Context
public play.api.mvc.RequestHeader _requestHeader()
Http.Context
_requestHeader
in class Http.Context
public Lang lang()
lang
in class Http.Context
public boolean changeLang(java.lang.String code)
Http.Context
changeLang
in class Http.Context
code
- New lang code to use (e.g. "fr", "en-US", etc.)public boolean changeLang(Lang lang)
Http.Context
changeLang
in class Http.Context
lang
- New Lang object to usepublic void clearLang()
Http.Context
clearLang
in class Http.Context