@Override @Deprecated public Request request() { return wrapped.request(); }
@Override @Deprecated public Request request() { return wrapped.request(); }
@Override @Deprecated public Request request() { return wrapped.request(); }
/** * 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()); }
/** * Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page. * * @param ctx the current request context * @return a <code>401 Not Authorized</code> result * * @deprecated Deprecated as of 2.7.0. Use {@link #onUnauthorized(Request)} instead. */ @Deprecated public Result onUnauthorized(Context ctx) { return onUnauthorized(ctx.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()); }
/** * @return the messages for the current lang * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public Messages messages() { Request request = lang != null ? request().withTransientLang(lang) : request(); return messagesApi().preferred(request); }
/** * Returns the current request. */ public static Request request() { return Context.current().request(); }
/** * Returns the current HTTP request. */ public static Request request() { return Http.Context.current().request(); }
/** * Executes this action with the given HTTP context and returns the result. * * @param ctx the http context in which to execute this action * @return a promise to the action's result * * @deprecated Since 2.7.0. Use {@link #call(Request)} instead. Please see <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">the migration guide</a> for more details. */ @Deprecated // TODO: When you remove this method make call(Request) below abstract public CompletionStage<Result> call(Context ctx) { return call(ctx.args != null && !ctx.args.isEmpty() ? ctx.request().addAttr(CTX_ARGS, ctx.args) : ctx.request()); }
/** * @return a String representation */ public String toString() { return "Context attached to (" + request() + ")"; }
/** * @return a String representation */ public String toString() { return "Context attached to (" + request() + ")"; }
/** * Executes this action with the given HTTP context and returns the result. * * @param ctx the http context in which to execute this action * @return a promise to the action's result * * @deprecated Since 2.7.0. Use {@link #call(Request)} instead. Please see <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">the migration guide</a> for more details. */ @Deprecated // TODO: When you remove this method make call(Request) below abstract public CompletionStage<Result> call(Context ctx) { return call(ctx.args != null && !ctx.args.isEmpty() ? ctx.request().addAttr(CTX_ARGS, ctx.args) : ctx.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(); }
@Override @Deprecated public play.api.mvc.RequestHeader _requestHeader() { return wrapped.request().asScala(); }
/** * @return a String representation */ public String toString() { return "Context attached to (" + request() + ")"; }
/** * @return the messages for the current lang * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public Messages messages() { Request request = lang != null ? request().withTransientLang(lang) : request(); return messagesApi().preferred(request); }
/** * Generates an alternative result if the user is not authenticated; the default a simple '401 Not Authorized' page. * * @param ctx the current request context * @return a <code>401 Not Authorized</code> result * * @deprecated Deprecated as of 2.7.0. Use {@link #onUnauthorized(Request)} instead. */ @Deprecated public Result onUnauthorized(Context ctx) { return onUnauthorized(ctx.request()); }