Package play.mvc
Class Results
java.lang.Object
play.mvc.Results
- Direct Known Subclasses:
Action,Controller,CSRFErrorHandler.DefaultCSRFErrorHandler,Security.Authenticator
Common results.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StatusHeaderGenerates a 400 Bad Request result.static ResultbadRequest(byte[] content) Generates a 400 Bad Request result.static ResultbadRequest(com.fasterxml.jackson.databind.JsonNode content) Generates a 400 Bad Request result.static ResultbadRequest(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 400 Bad Request result.static ResultbadRequest(File content) Generates a 400 Bad Request result.static ResultbadRequest(File content, boolean inline) Generates a 400 Bad Request result.static ResultbadRequest(File content, boolean inline, Optional<String> filename) Generates a 400 Bad Request result.static ResultbadRequest(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultbadRequest(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultbadRequest(File content, Optional<String> filename) Generates a 400 Bad Request result.static ResultbadRequest(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(File content, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(InputStream content) Generates a 400 Bad Request result.static ResultbadRequest(InputStream content, long contentLength) Generates a 400 Bad Request result.static ResultbadRequest(String content) Generates a 400 Bad Request result.static ResultbadRequest(String content, String charset) Generates a 400 Bad Request result.static ResultbadRequest(Path content) Generates a 400 Bad Request result.static ResultbadRequest(Path content, boolean inline) Generates a 400 Bad Request result.static ResultbadRequest(Path content, boolean inline, Optional<String> filename) Generates a 400 Bad Request result.static ResultbadRequest(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(Path content, Optional<String> filename) Generates a 400 Bad Request result.static ResultbadRequest(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(Path content, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.static ResultbadRequest(play.twirl.api.Content content) Generates a 400 Bad Request result.static ResultbadRequest(play.twirl.api.Content content, String charset) Generates a 400 Bad Request result.contentDispositionHeader(boolean inline, Optional<String> name) Creates aContent-Dispositionheader.
According to RFC 6266 (Section 4.2) there is no need to send the header"Content-Disposition: inline".static StatusHeadercreated()Generates a 201 Created result.static Resultcreated(byte[] content) Generates a 201 Created result.static Resultcreated(com.fasterxml.jackson.databind.JsonNode content) Generates a 201 Created result.static Resultcreated(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 201 Created result.static ResultGenerates a 201 Created result.static ResultGenerates a 201 Created result.static ResultGenerates a 201 Created result.static Resultcreated(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static Resultcreated(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static ResultDeprecated.Deprecated as of 2.8.0.static Resultcreated(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultGenerates a 201 Created result.static Resultcreated(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static Resultcreated(File content, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static Resultcreated(InputStream content) Generates a 201 Created result.static Resultcreated(InputStream content, long contentLength) Generates a 201 Created result.static ResultGenerates a 201 Created result.static ResultGenerates a 201 Created result.static ResultGenerates a 201 Created result.static ResultGenerates a 201 Created result.static ResultGenerates a 201 Created result.static Resultcreated(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static Resultcreated(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static ResultGenerates a 201 Created result.static Resultcreated(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static Resultcreated(Path content, FileMimeTypes fileMimeTypes) Generates a 201 Created result.static Resultcreated(play.twirl.api.Content content) Generates a 201 Created result.static ResultGenerates a 201 Created result.static StatusHeaderGenerates a 403 Forbidden result.static Resultforbidden(byte[] content) Generates a 403 Forbidden result.static Resultforbidden(com.fasterxml.jackson.databind.JsonNode content) Generates a 403 Forbidden result.static Resultforbidden(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static Resultforbidden(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static Resultforbidden(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static ResultDeprecated.Deprecated as of 2.8.0.static Resultforbidden(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultGenerates a 403 Forbidden result.static Resultforbidden(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static Resultforbidden(File content, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static Resultforbidden(InputStream content) Generates a 403 Forbidden result.static Resultforbidden(InputStream content, long contentLength) Generates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static Resultforbidden(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static Resultforbidden(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static Resultforbidden(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static Resultforbidden(Path content, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.static Resultforbidden(play.twirl.api.Content content) Generates a 403 Forbidden result.static ResultGenerates a 403 Forbidden result.static ResultGenerates a 302 Found result.static ResultGenerates a 302 Found result.static StatusHeaderGenerates a 500 Internal Server Error result.static ResultinternalServerError(byte[] content) Generates a 500 Internal Server Error result.static ResultinternalServerError(com.fasterxml.jackson.databind.JsonNode content) Generates a 500 Internal Server Error result.static ResultinternalServerError(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content, boolean inline) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content, boolean inline, Optional<String> filename) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultinternalServerError(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultinternalServerError(File content, Optional<String> filename) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(File content, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(InputStream content) Generates a 500 Internal Server Error result.static ResultinternalServerError(InputStream content, long contentLength) Generates a 500 Internal Server Error result.static ResultinternalServerError(String content) Generates a 500 Internal Server Error result.static ResultinternalServerError(String content, String charset) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content, boolean inline) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content, boolean inline, Optional<String> filename) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content, Optional<String> filename) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(Path content, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.static ResultinternalServerError(play.twirl.api.Content content) Generates a 500 Internal Server Error result.static ResultinternalServerError(play.twirl.api.Content content, String charset) Generates a 500 Internal Server Error result.static ResultmovedPermanently(String url) Generates a 301 Moved Permanently result.static ResultmovedPermanently(Call call) Generates a 301 Moved Permanently result.static StatusHeaderGenerates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(byte[] content) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(com.fasterxml.jackson.databind.JsonNode content) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content, boolean inline) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content, boolean inline, Optional<String> filename) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultnetworkAuthenticationRequired(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultnetworkAuthenticationRequired(File content, Optional<String> filename) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(File content, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(InputStream content) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(InputStream content, long contentLength) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(String content) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(String content, String charset) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content, boolean inline) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content, boolean inline, Optional<String> filename) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content, Optional<String> filename) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(Path content, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(play.twirl.api.Content content) Generates a 511 Network Authentication Required result.static ResultnetworkAuthenticationRequired(play.twirl.api.Content content, String charset) Generates a 511 Network Authentication Required result.static StatusHeaderGenerates a 204 No Content result.static StatusHeaderGenerates a 406 Not Acceptable result.static ResultnotAcceptable(byte[] content) Generates a 406 Not Acceptable result.static ResultnotAcceptable(com.fasterxml.jackson.databind.JsonNode content) Generates a 406 Not Acceptable result.static ResultnotAcceptable(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content, boolean inline) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content, boolean inline, Optional<String> filename) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultnotAcceptable(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultnotAcceptable(File content, Optional<String> filename) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(File content, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(InputStream content) Generates a 406 Not Acceptable result.static ResultnotAcceptable(InputStream content, long contentLength) Generates a 406 Not Acceptable result.static ResultnotAcceptable(String content) Generates a 406 Not Acceptable result.static ResultnotAcceptable(String content, String charset) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content, boolean inline) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content, boolean inline, Optional<String> filename) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content, Optional<String> filename) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(Path content, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.static ResultnotAcceptable(play.twirl.api.Content content) Generates a 406 Not Acceptable result.static ResultnotAcceptable(play.twirl.api.Content content, String charset) Generates a 406 Not Acceptable result.static StatusHeadernotFound()Generates a 404 Not Found result.static ResultnotFound(byte[] content) Generates a 404 Not Found result.static ResultnotFound(com.fasterxml.jackson.databind.JsonNode content) Generates a 404 Not Found result.static ResultnotFound(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultnotFound(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultnotFound(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultDeprecated.Deprecated as of 2.8.0.static ResultnotFound(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultGenerates a 404 Not Found result.static ResultnotFound(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultnotFound(File content, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultnotFound(InputStream content) Generates a 404 Not Found result.static ResultnotFound(InputStream content, long contentLength) Generates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultnotFound(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultnotFound(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static ResultnotFound(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultnotFound(Path content, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.static ResultnotFound(play.twirl.api.Content content) Generates a 404 Not Found result.static ResultGenerates a 404 Not Found result.static StatusHeaderok()Generates a 200 OK result.static Resultok(byte[] content) Generates a 200 OK result.static Resultok(com.fasterxml.jackson.databind.JsonNode content) Generates a 200 OK result.static Resultok(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 200 OK result.static ResultGenerates a 200 OK result.static ResultGenerates a 200 OK result.static ResultGenerates a 200 OK result.static Resultok(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static Resultok(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static ResultDeprecated.Deprecated as of 2.8.0.static Resultok(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultGenerates a 200 OK result.static Resultok(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static Resultok(File content, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static Resultok(InputStream content) Generates a 200 OK result.static Resultok(InputStream content, long contentLength) Generates a 200 OK result.static ResultGenerates a 200 OK result.static ResultGenerates a 200 OK result.static ResultGenerates a 200 OK result.static ResultGenerates a 200 OK result.static ResultGenerates a 200 OK result.static Resultok(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static Resultok(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static ResultGenerates a 200 OK result.static Resultok(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static Resultok(Path content, FileMimeTypes fileMimeTypes) Generates a 200 OK result.static Resultok(play.twirl.api.Content content) Generates a 200 OK result.static ResultGenerates a 200 OK result.static StatusHeaderGenerates a 402 Payment Required result.static ResultpaymentRequired(byte[] content) Generates a 402 Payment Required result.static ResultpaymentRequired(com.fasterxml.jackson.databind.JsonNode content) Generates a 402 Payment Required result.static ResultpaymentRequired(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 402 Payment Required result.static ResultpaymentRequired(File content) Generates a 402 Payment Required result.static ResultpaymentRequired(File content, boolean inline) Generates a 402 Payment Required result.static ResultpaymentRequired(File content, boolean inline, Optional<String> filename) Generates a 402 Payment Required result.static ResultpaymentRequired(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultpaymentRequired(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultpaymentRequired(File content, Optional<String> filename) Generates a 402 Payment Required result.static ResultpaymentRequired(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(File content, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(InputStream content) Generates a 402 Payment Required result.static ResultpaymentRequired(InputStream content, long contentLength) Generates a 402 Payment Required result.static ResultpaymentRequired(String content) Generates a 402 Payment Required result.static ResultpaymentRequired(String content, String charset) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content, boolean inline) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content, boolean inline, Optional<String> filename) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content, Optional<String> filename) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(Path content, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.static ResultpaymentRequired(play.twirl.api.Content content) Generates a 402 Payment Required result.static ResultpaymentRequired(play.twirl.api.Content content, String charset) Generates a 402 Payment Required result.static ResultpermanentRedirect(String url) Generates a 308 Permanent Redirect result.static ResultpermanentRedirect(Call call) Generates a 308 Permanent Redirect result.static StatusHeaderGenerates a 428 Precondition Required result.static ResultpreconditionRequired(byte[] content) Generates a 428 Precondition Required result.static ResultpreconditionRequired(com.fasterxml.jackson.databind.JsonNode content) Generates a 428 Precondition Required result.static ResultpreconditionRequired(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content, boolean inline) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content, boolean inline, Optional<String> filename) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultpreconditionRequired(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultpreconditionRequired(File content, Optional<String> filename) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(File content, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(InputStream content) Generates a 428 Precondition Required result.static ResultpreconditionRequired(InputStream content, long contentLength) Generates a 428 Precondition Required result.static ResultpreconditionRequired(String content) Generates a 428 Precondition Required result.static ResultpreconditionRequired(String content, String charset) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content, boolean inline) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content, boolean inline, Optional<String> filename) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content, Optional<String> filename) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(Path content, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.static ResultpreconditionRequired(play.twirl.api.Content content) Generates a 428 Precondition Required result.static ResultpreconditionRequired(play.twirl.api.Content content, String charset) Generates a 428 Precondition Required result.static ResultGenerates a 303 See Other result.static ResultGenerates a 303 See Other result.static ResultGenerates a 303 See Other result.static StatusHeaderGenerates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(byte[] content) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(com.fasterxml.jackson.databind.JsonNode content) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content, boolean inline) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content, boolean inline, Optional<String> filename) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultrequestHeaderFieldsTooLarge(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultrequestHeaderFieldsTooLarge(File content, Optional<String> filename) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(File content, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(InputStream content) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(InputStream content, long contentLength) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(String content) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(String content, String charset) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content, boolean inline) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content, boolean inline, Optional<String> filename) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content, Optional<String> filename) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(Path content, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(play.twirl.api.Content content) Generates a 431 Request Header Fields Too Large result.static ResultrequestHeaderFieldsTooLarge(play.twirl.api.Content content, String charset) Generates a 431 Request Header Fields Too Large result.static ResultGenerates a 303 See Other result.static ResultGenerates a 303 See Other result.static StatusHeaderstatus(int status) Generates a simple result.static Resultstatus(int status, byte[] content) Generates a simple result with byte-array content.static Resultstatus(int status, com.fasterxml.jackson.databind.JsonNode content) Generates a simple result with json content and UTF8 encoding.static Resultstatus(int status, com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a simple result with json content.static ResultGenerates a result with file contents.static ResultGenerates a result with file content.static ResultGenerates a result.static Resultstatus(int status, File content, boolean inline, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.static Resultstatus(int status, File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a result with file content.static ResultDeprecated.Deprecated as of 2.8.0.static Resultstatus(int status, File content, String fileName, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultGenerates a result.static Resultstatus(int status, File content, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.static Resultstatus(int status, File content, FileMimeTypes fileMimeTypes) Generates a result with file contents.static Resultstatus(int status, InputStream content) Generates a chunked result.static Resultstatus(int status, InputStream content, long contentLength) Generates a chunked result.static ResultGenerates a simple result.static ResultGenerates a simple result.static ResultGenerates a result with path contents.static ResultGenerates a result with path content.static ResultGenerates a result.static Resultstatus(int status, Path content, boolean inline, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.static Resultstatus(int status, Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a result with path content.static ResultGenerates a result.static Resultstatus(int status, Path content, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.static Resultstatus(int status, Path content, FileMimeTypes fileMimeTypes) Generates a result with path contents.static Resultstatus(int status, ByteString content) Generates a simple result.static Resultstatus(int status, play.twirl.api.Content content) Generates a simple result.static ResultGenerates a simple result.static ResulttemporaryRedirect(String url) Generates a 307 Temporary Redirect result.static ResulttemporaryRedirect(Call call) Generates a 307 Temporary Redirect result.static StatusHeaderGenerates a 429 Too Many Requests result.static ResulttooManyRequests(byte[] content) Generates a 429 Too Many Requests result.static ResulttooManyRequests(com.fasterxml.jackson.databind.JsonNode content) Generates a 429 Too Many Requests result.static ResulttooManyRequests(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content, boolean inline) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content, boolean inline, Optional<String> filename) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResulttooManyRequests(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResulttooManyRequests(File content, Optional<String> filename) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(File content, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(InputStream content) Generates a 429 Too Many Requests result.static ResulttooManyRequests(InputStream content, long contentLength) Generates a 429 Too Many Requests result.static ResulttooManyRequests(String content) Generates a 429 Too Many Requests result.static ResulttooManyRequests(String content, String charset) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content, boolean inline) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content, boolean inline, Optional<String> filename) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content, Optional<String> filename) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(Path content, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.static ResulttooManyRequests(play.twirl.api.Content content) Generates a 429 Too Many Requests result.static ResulttooManyRequests(play.twirl.api.Content content, String charset) Generates a 429 Too Many Requests result.static StatusHeaderGenerates a 401 Unauthorized result.static Resultunauthorized(byte[] content) Generates a 401 Unauthorized result.static Resultunauthorized(com.fasterxml.jackson.databind.JsonNode content) Generates a 401 Unauthorized result.static Resultunauthorized(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 401 Unauthorized result.static Resultunauthorized(File content) Generates a 401 Unauthorized result.static Resultunauthorized(File content, boolean inline) Generates a 401 Unauthorized result.static Resultunauthorized(File content, boolean inline, Optional<String> filename) Generates a 401 Unauthorized result.static Resultunauthorized(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(File content, String filename) Deprecated.Deprecated as of 2.8.0.static Resultunauthorized(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static Resultunauthorized(File content, Optional<String> filename) Generates a 401 Unauthorized result.static Resultunauthorized(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(File content, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(InputStream content) Generates a 401 Unauthorized result.static Resultunauthorized(InputStream content, long contentLength) Generates a 401 Unauthorized result.static Resultunauthorized(String content) Generates a 401 Unauthorized result.static Resultunauthorized(String content, String charset) Generates a 401 Unauthorized result.static Resultunauthorized(Path content) Generates a 401 Unauthorized result.static Resultunauthorized(Path content, boolean inline) Generates a 401 Unauthorized result.static Resultunauthorized(Path content, boolean inline, Optional<String> filename) Generates a 401 Unauthorized result.static Resultunauthorized(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(Path content, Optional<String> filename) Generates a 401 Unauthorized result.static Resultunauthorized(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(Path content, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.static Resultunauthorized(play.twirl.api.Content content) Generates a 401 Unauthorized result.static Resultunauthorized(play.twirl.api.Content content, String charset) Generates a 401 Unauthorized result.static StatusHeaderGenerates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(byte[] content) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(com.fasterxml.jackson.databind.JsonNode content) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content, boolean inline) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content, boolean inline, Optional<String> filename) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content, String filename) Deprecated.Deprecated as of 2.8.0.static ResultunsupportedMediaType(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0.static ResultunsupportedMediaType(File content, Optional<String> filename) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(File content, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(InputStream content) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(InputStream content, long contentLength) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(String content) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(String content, String charset) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content, boolean inline) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content, boolean inline, Optional<String> filename) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content, Optional<String> filename) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(Path content, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(play.twirl.api.Content content) Generates a 415 Unsupported Media Type result.static ResultunsupportedMediaType(play.twirl.api.Content content, String charset) Generates a 415 Unsupported Media Type result.
-
Constructor Details
-
Results
public Results()
-
-
Method Details
-
contentDispositionHeader
Creates aContent-Dispositionheader.
According to RFC 6266 (Section 4.2) there is no need to send the header"Content-Disposition: inline". Therefore if the header generated by this method ends up being exactly that header (when passinginline = trueandOptional.empty()asname), an empty Map ist returned.- Parameters:
inline- If the content should be rendered inline or as attachment.name- The name of the resource, usually displayed in a file download dialog.- Returns:
- a map with a
Content-Dispositionheader entry or an empty map if explained conditions apply. - See Also:
-
status
Generates a simple result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)- Returns:
- the header-only result
-
status
Generates a simple result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body content- Returns:
- the result
-
status
Generates a simple result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body contentcharset- the charset to encode the content with (e.g. "UTF-8")- Returns:
- the result
-
status
Generates a simple result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body content. It will be encoded as a UTF-8 string.- Returns:
- the result
-
status
Generates a simple result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body content.charset- the charset in which to encode the content (e.g. "UTF-8")- Returns:
- the result
-
status
Generates a simple result with json content and UTF8 encoding.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body content as a play-json object- Returns:
- the result
-
status
public static Result status(int status, com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a simple result with json content.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body content, as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
status
Generates a simple result with byte-array content.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body content, as a byte array- Returns:
- the result
-
status
Generates a simple result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the result's body content- Returns:
- the result
-
status
Generates a chunked result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the input stream containing data to chunk over- Returns:
- the result
-
status
Generates a chunked result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
status
Generates a result with file contents.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to send- Returns:
- the result
-
status
Generates a result with file contents.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendfileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
Generates a result with file content.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendinline-trueto have it sent with inline Content-Disposition.- Returns:
- the result
-
status
Generates a result with file content.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendinline-trueto have it sent with inline Content-Disposition.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
Deprecated.Deprecated as of 2.8.0. Use tostatus(int, File, Optional).Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendfileName- the name that the client should receive this file as- Returns:
- the result
-
status
Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendfileName- the name that the client should receive this file as- Returns:
- the result
-
status
@Deprecated public static Result status(int status, File content, String fileName, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tostatus(int, File, Optional, FileMimeTypes).Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendfileName- the name that the client should receive this file asfileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
public static Result status(int status, File content, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendfileName- the name that the client should receive this file asfileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendinline-trueto have it sent with inline Content-Disposition.fileName- the name that the client should receive this file as- Returns:
- the result
-
status
public static Result status(int status, File content, boolean inline, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the file to sendinline-trueto have it sent with inline Content-Disposition.fileName- the name that the client should receive this file asfileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
Generates a result with path contents.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to send- Returns:
- the result
-
status
Generates a result with path contents.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to sendfileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
Generates a result with path content.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to sendinline-trueto have it sent with inline Content-Disposition.- Returns:
- the result
-
status
Generates a result with path content.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to sendinline-trueto have it sent with inline Content-Disposition.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to sendfileName- the name that the client should receive this path as- Returns:
- the result
-
status
public static Result status(int status, Path content, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to sendfileName- the name that the client should receive this path asfileMimeTypes- Used for file type mapping.- Returns:
- the result
-
status
Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to sendinline-trueto have it sent with inline Content-Disposition.fileName- the name that the client should receive this path as- Returns:
- the result
-
status
public static Result status(int status, Path content, boolean inline, Optional<String> fileName, FileMimeTypes fileMimeTypes) Generates a result.- Parameters:
status- the HTTP status for this result e.g. 200 (OK), 404 (NOT_FOUND)content- the path to sendinline-trueto have it sent with inline Content-Disposition.fileName- the name that the client should receive this path asfileMimeTypes- Used for file type mapping.- Returns:
- the result
-
noContent
Generates a 204 No Content result.- Returns:
- the result
-
ok
Generates a 200 OK result.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
ok
public static Result ok(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 200 OK result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- the result's body content- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The file to send.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Deprecated.Deprecated as of 2.8.0. Use took(File, Optional).Generates a 200 OK result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
ok
Deprecated.Deprecated as of 2.8.0. Use took(File, Optional, FileMimeTypes).Generates a 200 OK result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
ok
public static Result ok(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 200 OK result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The path to send.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
Generates a 200 OK result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
ok
public static Result ok(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 200 OK result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
created
public static Result created(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 201 Created result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- the result's body content- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The file to send.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Deprecated.Deprecated as of 2.8.0. Use tocreated(File, Optional).Generates a 201 Created result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
created
@Deprecated public static Result created(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tocreated(File, Optional, FileMimeTypes).Generates a 201 Created result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
created
public static Result created(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 201 Created result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The path to send.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
Generates a 201 Created result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
created
public static Result created(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 201 Created result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
badRequest
public static Result badRequest(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 400 Bad Request result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- the result's body content- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The file to send.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Deprecated.Deprecated as of 2.8.0. Use tobadRequest(File, Optional).Generates a 400 Bad Request result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
badRequest
@Deprecated public static Result badRequest(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tobadRequest(File, Optional, FileMimeTypes).Generates a 400 Bad Request result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
public static Result badRequest(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
badRequest
public static Result badRequest(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The path to send.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
badRequest
public static Result badRequest(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
Generates a 400 Bad Request result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
badRequest
public static Result badRequest(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 400 Bad Request result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
unauthorized
public static Result unauthorized(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 401 Unauthorized result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- the result's body content- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Deprecated.Deprecated as of 2.8.0. Use tounauthorized(File, Optional).Generates a 401 Unauthorized result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
unauthorized
@Deprecated public static Result unauthorized(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tounauthorized(File, Optional, FileMimeTypes).Generates a 401 Unauthorized result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
public static Result unauthorized(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
unauthorized
public static Result unauthorized(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
unauthorized
public static Result unauthorized(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
unauthorized
public static Result unauthorized(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 401 Unauthorized result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 402 Payment Required result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- the result's body content- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The file to send.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Deprecated.Deprecated as of 2.8.0. Use topaymentRequired(File, Optional).Generates a 402 Payment Required result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
paymentRequired
@Deprecated public static Result paymentRequired(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use topaymentRequired(File, Optional, FileMimeTypes).Generates a 402 Payment Required result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The path to send.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
Generates a 402 Payment Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 402 Payment Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
forbidden
public static Result forbidden(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 403 Forbidden result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- the result's body content- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The file to send.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Deprecated.Deprecated as of 2.8.0. Use toforbidden(File, Optional).Generates a 403 Forbidden result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
forbidden
@Deprecated public static Result forbidden(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use toforbidden(File, Optional, FileMimeTypes).Generates a 403 Forbidden result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
public static Result forbidden(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
forbidden
public static Result forbidden(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The path to send.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
forbidden
public static Result forbidden(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
Generates a 403 Forbidden result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
forbidden
public static Result forbidden(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 403 Forbidden result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
notFound
public static Result notFound(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 404 Not Found result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- the result's body content- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The file to send.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Deprecated.Deprecated as of 2.8.0. Use tonotFound(File, Optional).Generates a 404 Not Found result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
notFound
@Deprecated public static Result notFound(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tonotFound(File, Optional, FileMimeTypes).Generates a 404 Not Found result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
notFound
public static Result notFound(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The path to send.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
Generates a 404 Not Found result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
notFound
public static Result notFound(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 404 Not Found result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 406 Not Acceptable result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- the result's body content- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Deprecated.Deprecated as of 2.8.0. Use tonotAcceptable(File, Optional).Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
notAcceptable
@Deprecated public static Result notAcceptable(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tonotAcceptable(File, Optional, FileMimeTypes).Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 415 Unsupported Media Type result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- the result's body content- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Deprecated.Deprecated as of 2.8.0. Use tounsupportedMediaType(File, Optional).Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
unsupportedMediaType
@Deprecated public static Result unsupportedMediaType(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tounsupportedMediaType(File, Optional, FileMimeTypes).Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 428 Precondition Required result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- the result's body content- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The file to send.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Deprecated.Deprecated as of 2.8.0. Use topreconditionRequired(File, Optional).Generates a 428 Precondition Required result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
preconditionRequired
@Deprecated public static Result preconditionRequired(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use topreconditionRequired(File, Optional, FileMimeTypes).Generates a 428 Precondition Required result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The path to send.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
Generates a 428 Precondition Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 428 Precondition Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 429 Too Many Requests result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- the result's body content- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Deprecated.Deprecated as of 2.8.0. Use totooManyRequests(File, Optional).Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
tooManyRequests
@Deprecated public static Result tooManyRequests(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use totooManyRequests(File, Optional, FileMimeTypes).Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the result's body content- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Deprecated.Deprecated as of 2.8.0. Use torequestHeaderFieldsTooLarge(File, Optional).Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
requestHeaderFieldsTooLarge
@Deprecated public static Result requestHeaderFieldsTooLarge(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use torequestHeaderFieldsTooLarge(File, Optional, FileMimeTypes).Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(File content, boolean inline, Optional<String> filename) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(Path content, boolean inline, Optional<String> filename) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
internalServerError
public static Result internalServerError(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 500 Internal Server Error result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- the result's body content- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Deprecated.Deprecated as of 2.8.0. Use tointernalServerError(File, Optional).Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
internalServerError
@Deprecated public static Result internalServerError(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tointernalServerError(File, Optional, FileMimeTypes).Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
public static Result internalServerError(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
internalServerError
public static Result internalServerError(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
internalServerError
public static Result internalServerError(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
internalServerError
public static Result internalServerError(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- the HTTP response bodycharset- the charset into which the content should be encoded (e.g. "UTF-8")- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- the result's body content as a play-json object. It will be encoded as a UTF-8 string.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(com.fasterxml.jackson.databind.JsonNode content, com.fasterxml.jackson.core.JsonEncoding encoding) Generates a 511 Network Authentication Required result.- Parameters:
content- the result's body content as a play-json objectencoding- the encoding into which the json should be encoded- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- the result's body content- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- the input stream containing data to chunk overcontentLength- the length of the provided content in bytes.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(File content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
Deprecated.Deprecated as of 2.8.0. Use tonetworkAuthenticationRequired(File, Optional).Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
networkAuthenticationRequired
@Deprecated public static Result networkAuthenticationRequired(File content, String filename, FileMimeTypes fileMimeTypes) Deprecated.Deprecated as of 2.8.0. Use tonetworkAuthenticationRequired(File, Optional, FileMimeTypes).Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(File content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(File content, boolean inline, Optional<String> filename) Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(File content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(Path content, boolean inline, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(Path content, boolean inline, Optional<String> filename) Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(Path content, boolean inline, Optional<String> filename, FileMimeTypes fileMimeTypes) Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.inline- Whether the file should be sent inline, or as an attachment.filename- The name to send the file as.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
movedPermanently
Generates a 301 Moved Permanently result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
movedPermanently
Generates a 301 Moved Permanently result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
found
Generates a 302 Found result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
found
Generates a 302 Found result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
seeOther
Generates a 303 See Other result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
seeOther
Generates a 303 See Other result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
redirect
Generates a 303 See Other result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
redirect
Generates a 303 See Other result.- Parameters:
url- The url to redirectqueryStringParams- queryString parameters to add to the queryString- Returns:
- the result
-
redirect
Generates a 303 See Other result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
temporaryRedirect
Generates a 307 Temporary Redirect result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
temporaryRedirect
Generates a 307 Temporary Redirect result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
permanentRedirect
Generates a 308 Permanent Redirect result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
permanentRedirect
Generates a 308 Permanent Redirect result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-