/** * Returns the current HTTP context. * * @return the context * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public static Context ctx() { return Http.Context.current(); }
/** * Returns the current context. * * @return the current context. * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static Context ctx() { return Context.current(); }
/** * Returns the current lang. * * @return the current lang. * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static Lang lang() { return Context.current().lang(); }
/** * Returns the current request. * * @return the current request. * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static Request request() { return Context.current().request(); }
/** * Returns the current HTTP request. * * @return the request * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public static Request request() { return Http.Context.current().request(); }
/** * Generates a 501 NOT_IMPLEMENTED simple result. * * @deprecated Deprecated as of 2.7.0. Use {@link #TODO(Request)} instead. */ @Deprecated public static Result TODO() { return TODO(Http.Context.current().request()); }
/** * Returns the current HTTP flash scope. */ public static Flash flash() { return Http.Context.current().flash(); }
/** * Returns the current HTTP response. */ public static Response response() { return Http.Context.current().response(); }
/** * Returns the current HTTP context. */ public static Context ctx() { return Http.Context.current(); }
/** * Change durably the lang for the current user * * @param lang New Lang object to use * @return true if the requested lang was supported by the application, otherwise false. * * @deprecated Deprecated as of 2.7.0. Use {@link MessagesApi#setLang(Result, Lang)} or {@link Result#withLang(Lang, MessagesApi)}. */ @Deprecated public static boolean changeLang(Lang lang) { return Http.Context.current().changeLang(lang); }
/** * @return the messages for the current lang */ public static Messages messages() { return Context.current().messages(); }
/** * Returns the current lang. */ public static Lang lang() { return Context.current().lang(); }
/** * Returns the current session. */ public static Session session() { return Context.current().session(); }
/** * Returns the current flash scope. */ public static Flash flash() { return Context.current().flash(); }
/** * Returns the current response. */ public static Response response() { return Context.current().response(); }
/** * Returns the current HTTP session. * * @return the session * * @deprecated Deprecated as of 2.7.0. Use {@link Request#session()} and {@link Result} instead. */ @Deprecated public static Session session() { return Http.Context.current().session(); }
/** * Returns the current lang. * * @return the language * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public static Lang lang() { return Http.Context.current().lang(); }
/** * Change durably the lang for the current user * * @param lang New Lang object to use * @return true if the requested lang was supported by the application, otherwise false. * * @deprecated Deprecated as of 2.7.0. Use {@link MessagesApi#setLang(Result, Lang)} or {@link Result#withLang(Lang, MessagesApi)}. */ @Deprecated public static boolean changeLang(Lang lang) { return Http.Context.current().changeLang(lang); }
/** * Returns the current HTTP request. * * @return the request * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public static Request request() { return Http.Context.current().request(); }
/** * Returns the current response. * * @return the current response. * * @deprecated Deprecated as of 2.7.0. Use {@link Result} instead. */ @Deprecated public static Response response() { return Context.current().response(); }