Package play.mvc
Class Results
- Object
-
- play.mvc.Results
-
- Direct Known Subclasses:
Action,Controller,CSRFErrorHandler.DefaultCSRFErrorHandler,Security.Authenticator
public class Results extends Object
Common results.
-
-
Constructor Summary
Constructors Constructor Description Results()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StatusHeaderbadRequest()Generates 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.static Map<String,String>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 Resultcreated(File content)Generates a 201 Created result.static Resultcreated(File content, boolean inline)Generates a 201 Created result.static Resultcreated(File content, boolean inline, Optional<String> filename)Generates 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 Resultcreated(File content, String filename)Deprecated.Deprecated as of 2.8.0.static Resultcreated(File content, String filename, FileMimeTypes fileMimeTypes)Deprecated.Deprecated as of 2.8.0.static Resultcreated(File content, Optional<String> filename)Generates 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 Resultcreated(String content)Generates a 201 Created result.static Resultcreated(String content, String charset)Generates a 201 Created result.static Resultcreated(Path content)Generates a 201 Created result.static Resultcreated(Path content, boolean inline)Generates a 201 Created result.static Resultcreated(Path content, boolean inline, Optional<String> filename)Generates 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 Resultcreated(Path content, Optional<String> filename)Generates 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 Resultcreated(play.twirl.api.Content content, String charset)Generates a 201 Created result.static StatusHeaderforbidden()Generates 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 Resultforbidden(File content)Generates a 403 Forbidden result.static Resultforbidden(File content, boolean inline)Generates a 403 Forbidden result.static Resultforbidden(File content, boolean inline, Optional<String> filename)Generates 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 Resultforbidden(File content, String filename)Deprecated.Deprecated as of 2.8.0.static Resultforbidden(File content, String filename, FileMimeTypes fileMimeTypes)Deprecated.Deprecated as of 2.8.0.static Resultforbidden(File content, Optional<String> filename)Generates 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 Resultforbidden(String content)Generates a 403 Forbidden result.static Resultforbidden(String content, String charset)Generates a 403 Forbidden result.static Resultforbidden(Path content)Generates a 403 Forbidden result.static Resultforbidden(Path content, boolean inline)Generates a 403 Forbidden result.static Resultforbidden(Path content, boolean inline, Optional<String> filename)Generates 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 Resultforbidden(Path content, Optional<String> filename)Generates 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 Resultforbidden(play.twirl.api.Content content, String charset)Generates a 403 Forbidden result.static Resultfound(String url)Generates a 302 Found result.static Resultfound(Call call)Generates a 302 Found result.static StatusHeaderinternalServerError()Generates 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 StatusHeadernetworkAuthenticationRequired()Generates 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 StatusHeadernoContent()Generates a 204 No Content result.static StatusHeadernotAcceptable()Generates 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 ResultnotFound(File content)Generates a 404 Not Found result.static ResultnotFound(File content, boolean inline)Generates a 404 Not Found result.static ResultnotFound(File content, boolean inline, Optional<String> filename)Generates 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 ResultnotFound(File content, String filename)Deprecated.Deprecated as of 2.8.0.static ResultnotFound(File content, String filename, FileMimeTypes fileMimeTypes)Deprecated.Deprecated as of 2.8.0.static ResultnotFound(File content, Optional<String> filename)Generates 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 ResultnotFound(String content)Generates a 404 Not Found result.static ResultnotFound(String content, String charset)Generates a 404 Not Found result.static ResultnotFound(Path content)Generates a 404 Not Found result.static ResultnotFound(Path content, boolean inline)Generates a 404 Not Found result.static ResultnotFound(Path content, boolean inline, Optional<String> filename)Generates 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 ResultnotFound(Path content, Optional<String> filename)Generates 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 ResultnotFound(play.twirl.api.Content content, String charset)Generates 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 Resultok(File content)Generates a 200 OK result.static Resultok(File content, boolean inline)Generates a 200 OK result.static Resultok(File content, boolean inline, Optional<String> filename)Generates 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 Resultok(File content, String filename)Deprecated.Deprecated as of 2.8.0.static Resultok(File content, String filename, FileMimeTypes fileMimeTypes)Deprecated.Deprecated as of 2.8.0.static Resultok(File content, Optional<String> filename)Generates 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 Resultok(String content)Generates a 200 OK result.static Resultok(String content, String charset)Generates a 200 OK result.static Resultok(Path content)Generates a 200 OK result.static Resultok(Path content, boolean inline)Generates a 200 OK result.static Resultok(Path content, boolean inline, Optional<String> filename)Generates 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 Resultok(Path content, Optional<String> filename)Generates 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 Resultok(play.twirl.api.Content content, String charset)Generates a 200 OK result.static StatusHeaderpaymentRequired()Generates 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 StatusHeaderpreconditionRequired()Generates 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 Resultredirect(String url)Generates a 303 See Other result.static Resultredirect(String url, Map<String,List<String>> queryStringParams)Generates a 303 See Other result.static Resultredirect(Call call)Generates a 303 See Other result.static StatusHeaderrequestHeaderFieldsTooLarge()Generates 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 ResultseeOther(String url)Generates a 303 See Other result.static ResultseeOther(Call call)Generates 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, ByteString content)Generates a simple result.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 Resultstatus(int status, File content)Generates a result with file contents.static Resultstatus(int status, File content, boolean inline)Generates a result with file content.static Resultstatus(int status, File content, boolean inline, Optional<String> fileName)Generates 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 Resultstatus(int status, File content, String fileName)Deprecated.Deprecated as of 2.8.0.static Resultstatus(int status, File content, String fileName, FileMimeTypes fileMimeTypes)Deprecated.Deprecated as of 2.8.0.static Resultstatus(int status, File content, Optional<String> fileName)Generates 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 Resultstatus(int status, String content)Generates a simple result.static Resultstatus(int status, String content, String charset)Generates a simple result.static Resultstatus(int status, Path content)Generates a result with path contents.static Resultstatus(int status, Path content, boolean inline)Generates a result with path content.static Resultstatus(int status, Path content, boolean inline, Optional<String> fileName)Generates 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 Resultstatus(int status, Path content, Optional<String> fileName)Generates 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, play.twirl.api.Content content)Generates a simple result.static Resultstatus(int status, play.twirl.api.Content content, String charset)Generates a simple result.static ResulttemporaryRedirect(String url)Generates a 307 Temporary Redirect result.static ResulttemporaryRedirect(Call call)Generates a 307 Temporary Redirect result.static StatusHeadertooManyRequests()Generates 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 StatusHeaderunauthorized()Generates 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 StatusHeaderunsupportedMediaType()Generates 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.
-
-
-
Method Detail
-
contentDispositionHeader
public static Map<String,String> 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". 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:
- RFC 6266, Section 4.2
-
status
public static StatusHeader status(int 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
public static Result status(int status, play.twirl.api.Content content)
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
public static Result status(int status, play.twirl.api.Content content, String charset)
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
public static Result status(int status, String content)
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
public static Result status(int status, String content, String charset)
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
public static Result status(int status, com.fasterxml.jackson.databind.JsonNode content)
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
public static Result status(int status, byte[] content)
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
public static Result status(int status, ByteString content)
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
public static Result status(int status, InputStream content)
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
public static Result status(int status, InputStream content, long contentLength)
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
public static Result status(int status, File content)
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
public static Result status(int status, File content, FileMimeTypes fileMimeTypes)
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
public static Result status(int status, File content, boolean inline)
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
public static Result status(int status, File content, boolean inline, FileMimeTypes fileMimeTypes)
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 public static Result status(int status, File content, String fileName)
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
public static Result status(int status, File content, Optional<String> fileName)
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
public static Result status(int status, File content, boolean inline, Optional<String> fileName)
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
public static Result status(int status, Path content)
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
public static Result status(int status, Path content, FileMimeTypes fileMimeTypes)
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
public static Result status(int status, Path content, boolean inline)
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
public static Result status(int status, Path content, boolean inline, FileMimeTypes fileMimeTypes)
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
public static Result status(int status, Path content, Optional<String> fileName)
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
public static Result status(int status, Path content, boolean inline, Optional<String> fileName)
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
public static StatusHeader noContent()
Generates a 204 No Content result.- Returns:
- the result
-
ok
public static StatusHeader ok()
Generates a 200 OK result.- Returns:
- the result
-
ok
public static Result ok(play.twirl.api.Content content)
Generates a 200 OK result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
ok
public static Result ok(play.twirl.api.Content content, String charset)
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
public static Result ok(String content)
Generates a 200 OK result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
ok
public static Result ok(String content, String charset)
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
public static Result ok(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result ok(byte[] content)
Generates a 200 OK result.- Parameters:
content- the result's body content- Returns:
- the result
-
ok
public static Result ok(InputStream content)
Generates a 200 OK result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
ok
public static Result ok(InputStream content, long contentLength)
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
public static Result ok(File content)
Generates a 200 OK result.- Parameters:
content- The file to send.- Returns:
- the result
-
ok
public static Result ok(File content, FileMimeTypes fileMimeTypes)
Generates a 200 OK result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
public static Result ok(File content, boolean inline)
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
public static Result ok(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
@Deprecated public static Result ok(File content, String filename)
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
public static Result ok(File content, Optional<String> filename)
Generates a 200 OK result.- Parameters:
content- The file to send.filename- The name to send the file as.- Returns:
- the result
-
ok
@Deprecated public static Result ok(File content, String filename, FileMimeTypes fileMimeTypes)
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
public static Result ok(File content, Optional<String> filename, FileMimeTypes 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
public static Result ok(File content, boolean inline, Optional<String> filename)
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
public static Result ok(Path content)
Generates a 200 OK result.- Parameters:
content- The path to send.- Returns:
- the result
-
ok
public static Result ok(Path content, FileMimeTypes fileMimeTypes)
Generates a 200 OK result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
public static Result ok(Path content, boolean inline)
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
public static Result ok(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
ok
public static Result ok(Path content, Optional<String> filename)
Generates a 200 OK result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
ok
public static Result ok(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes)
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
public static Result ok(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader created()
Generates a 201 Created result.- Returns:
- the result
-
created
public static Result created(play.twirl.api.Content content)
Generates a 201 Created result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
created
public static Result created(play.twirl.api.Content content, String charset)
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
public static Result created(String content)
Generates a 201 Created result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
created
public static Result created(String content, String charset)
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
public static Result created(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result created(byte[] content)
Generates a 201 Created result.- Parameters:
content- the result's body content- Returns:
- the result
-
created
public static Result created(InputStream content)
Generates a 201 Created result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
created
public static Result created(InputStream content, long contentLength)
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
public static Result created(File content)
Generates a 201 Created result.- Parameters:
content- The file to send.- Returns:
- the result
-
created
public static Result created(File content, FileMimeTypes fileMimeTypes)
Generates a 201 Created result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
public static Result created(File content, boolean inline)
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
public static Result created(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
@Deprecated public static Result created(File content, String filename)
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
public static Result created(File content, Optional<String> filename)
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
public static Result created(File content, Optional<String> filename, FileMimeTypes 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
public static Result created(File content, boolean inline, Optional<String> filename)
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
public static Result created(Path content)
Generates a 201 Created result.- Parameters:
content- The path to send.- Returns:
- the result
-
created
public static Result created(Path content, FileMimeTypes fileMimeTypes)
Generates a 201 Created result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
public static Result created(Path content, boolean inline)
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
public static Result created(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
created
public static Result created(Path content, Optional<String> filename)
Generates a 201 Created result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
created
public static Result created(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes)
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
public static Result created(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader badRequest()
Generates a 400 Bad Request result.- Returns:
- the result
-
badRequest
public static Result badRequest(play.twirl.api.Content content)
Generates a 400 Bad Request result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
badRequest
public static Result badRequest(play.twirl.api.Content content, String charset)
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
public static Result badRequest(String content)
Generates a 400 Bad Request result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
badRequest
public static Result badRequest(String content, String charset)
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
public static Result badRequest(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result badRequest(byte[] content)
Generates a 400 Bad Request result.- Parameters:
content- the result's body content- Returns:
- the result
-
badRequest
public static Result badRequest(InputStream content)
Generates a 400 Bad Request result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
badRequest
public static Result badRequest(InputStream content, long contentLength)
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
public static Result badRequest(File content)
Generates a 400 Bad Request result.- Parameters:
content- The file to send.- Returns:
- the result
-
badRequest
public static Result badRequest(File content, FileMimeTypes fileMimeTypes)
Generates a 400 Bad Request result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
public static Result badRequest(File content, boolean inline)
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
public static Result badRequest(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
@Deprecated public static Result badRequest(File content, String filename)
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
public static Result badRequest(File content, Optional<String> filename)
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
public static Result badRequest(File content, boolean inline, Optional<String> filename)
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
public static Result badRequest(Path content)
Generates a 400 Bad Request result.- Parameters:
content- The path to send.- Returns:
- the result
-
badRequest
public static Result badRequest(Path content, FileMimeTypes fileMimeTypes)
Generates a 400 Bad Request result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
public static Result badRequest(Path content, boolean inline)
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
public static Result badRequest(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
badRequest
public static Result badRequest(Path content, Optional<String> filename)
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
public static Result badRequest(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader unauthorized()
Generates a 401 Unauthorized result.- Returns:
- the result
-
unauthorized
public static Result unauthorized(play.twirl.api.Content content)
Generates a 401 Unauthorized result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
unauthorized
public static Result unauthorized(play.twirl.api.Content content, String charset)
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
public static Result unauthorized(String content)
Generates a 401 Unauthorized result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
unauthorized
public static Result unauthorized(String content, String charset)
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
public static Result unauthorized(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result unauthorized(byte[] content)
Generates a 401 Unauthorized result.- Parameters:
content- the result's body content- Returns:
- the result
-
unauthorized
public static Result unauthorized(InputStream content)
Generates a 401 Unauthorized result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
unauthorized
public static Result unauthorized(InputStream content, long contentLength)
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
public static Result unauthorized(File content)
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.- Returns:
- the result
-
unauthorized
public static Result unauthorized(File content, FileMimeTypes fileMimeTypes)
Generates a 401 Unauthorized result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
public static Result unauthorized(File content, boolean inline)
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
public static Result unauthorized(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
@Deprecated public static Result unauthorized(File content, String filename)
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
public static Result unauthorized(File content, Optional<String> filename)
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
public static Result unauthorized(File content, boolean inline, Optional<String> filename)
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
public static Result unauthorized(Path content)
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.- Returns:
- the result
-
unauthorized
public static Result unauthorized(Path content, FileMimeTypes fileMimeTypes)
Generates a 401 Unauthorized result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
public static Result unauthorized(Path content, boolean inline)
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
public static Result unauthorized(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unauthorized
public static Result unauthorized(Path content, Optional<String> filename)
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
public static Result unauthorized(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader paymentRequired()
Generates a 402 Payment Required result.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(play.twirl.api.Content content)
Generates a 402 Payment Required result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(play.twirl.api.Content content, String charset)
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
public static Result paymentRequired(String content)
Generates a 402 Payment Required result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(String content, String charset)
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
public static Result paymentRequired(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result paymentRequired(byte[] content)
Generates a 402 Payment Required result.- Parameters:
content- the result's body content- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(InputStream content)
Generates a 402 Payment Required result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(InputStream content, long contentLength)
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
public static Result paymentRequired(File content)
Generates a 402 Payment Required result.- Parameters:
content- The file to send.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(File content, FileMimeTypes fileMimeTypes)
Generates a 402 Payment Required result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(File content, boolean inline)
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
public static Result paymentRequired(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
@Deprecated public static Result paymentRequired(File content, String filename)
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
public static Result paymentRequired(File content, Optional<String> filename)
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
public static Result paymentRequired(File content, boolean inline, Optional<String> filename)
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
public static Result paymentRequired(Path content)
Generates a 402 Payment Required result.- Parameters:
content- The path to send.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(Path content, FileMimeTypes fileMimeTypes)
Generates a 402 Payment Required result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(Path content, boolean inline)
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
public static Result paymentRequired(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
paymentRequired
public static Result paymentRequired(Path content, Optional<String> filename)
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
public static Result paymentRequired(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader forbidden()
Generates a 403 Forbidden result.- Returns:
- the result
-
forbidden
public static Result forbidden(play.twirl.api.Content content)
Generates a 403 Forbidden result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
forbidden
public static Result forbidden(play.twirl.api.Content content, String charset)
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
public static Result forbidden(String content)
Generates a 403 Forbidden result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
forbidden
public static Result forbidden(String content, String charset)
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
public static Result forbidden(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result forbidden(byte[] content)
Generates a 403 Forbidden result.- Parameters:
content- the result's body content- Returns:
- the result
-
forbidden
public static Result forbidden(InputStream content)
Generates a 403 Forbidden result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
forbidden
public static Result forbidden(InputStream content, long contentLength)
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
public static Result forbidden(File content)
Generates a 403 Forbidden result.- Parameters:
content- The file to send.- Returns:
- the result
-
forbidden
public static Result forbidden(File content, FileMimeTypes fileMimeTypes)
Generates a 403 Forbidden result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
public static Result forbidden(File content, boolean inline)
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
public static Result forbidden(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
@Deprecated public static Result forbidden(File content, String filename)
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
public static Result forbidden(File content, Optional<String> filename)
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
public static Result forbidden(File content, boolean inline, Optional<String> filename)
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
public static Result forbidden(Path content)
Generates a 403 Forbidden result.- Parameters:
content- The path to send.- Returns:
- the result
-
forbidden
public static Result forbidden(Path content, FileMimeTypes fileMimeTypes)
Generates a 403 Forbidden result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
public static Result forbidden(Path content, boolean inline)
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
public static Result forbidden(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
forbidden
public static Result forbidden(Path content, Optional<String> filename)
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
public static Result forbidden(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader notFound()
Generates a 404 Not Found result.- Returns:
- the result
-
notFound
public static Result notFound(play.twirl.api.Content content)
Generates a 404 Not Found result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
notFound
public static Result notFound(play.twirl.api.Content content, String charset)
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
public static Result notFound(String content)
Generates a 404 Not Found result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
notFound
public static Result notFound(String content, String charset)
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
public static Result notFound(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result notFound(byte[] content)
Generates a 404 Not Found result.- Parameters:
content- the result's body content- Returns:
- the result
-
notFound
public static Result notFound(InputStream content)
Generates a 404 Not Found result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
notFound
public static Result notFound(InputStream content, long contentLength)
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
public static Result notFound(File content)
Generates a 404 Not Found result.- Parameters:
content- The file to send.- Returns:
- the result
-
notFound
public static Result notFound(File content, FileMimeTypes fileMimeTypes)
Generates a 404 Not Found result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
public static Result notFound(File content, boolean inline)
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
public static Result notFound(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
@Deprecated public static Result notFound(File content, String filename)
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
public static Result notFound(File content, Optional<String> filename)
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
public static Result notFound(File content, Optional<String> filename, FileMimeTypes 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
public static Result notFound(File content, boolean inline, Optional<String> filename)
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
public static Result notFound(Path content)
Generates a 404 Not Found result.- Parameters:
content- The path to send.- Returns:
- the result
-
notFound
public static Result notFound(Path content, FileMimeTypes fileMimeTypes)
Generates a 404 Not Found result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
public static Result notFound(Path content, boolean inline)
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
public static Result notFound(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notFound
public static Result notFound(Path content, Optional<String> filename)
Generates a 404 Not Found result.- Parameters:
content- The path to send.filename- The name to send the file as.- Returns:
- the result
-
notFound
public static Result notFound(Path content, Optional<String> filename, FileMimeTypes fileMimeTypes)
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
public static Result notFound(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader notAcceptable()
Generates a 406 Not Acceptable result.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(play.twirl.api.Content content)
Generates a 406 Not Acceptable result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(play.twirl.api.Content content, String charset)
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
public static Result notAcceptable(String content)
Generates a 406 Not Acceptable result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(String content, String charset)
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
public static Result notAcceptable(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result notAcceptable(byte[] content)
Generates a 406 Not Acceptable result.- Parameters:
content- the result's body content- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(InputStream content)
Generates a 406 Not Acceptable result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(InputStream content, long contentLength)
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
public static Result notAcceptable(File content)
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(File content, FileMimeTypes fileMimeTypes)
Generates a 406 Not Acceptable result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(File content, boolean inline)
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
public static Result notAcceptable(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
@Deprecated public static Result notAcceptable(File content, String filename)
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
public static Result notAcceptable(File content, Optional<String> filename)
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
public static Result notAcceptable(File content, boolean inline, Optional<String> filename)
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
public static Result notAcceptable(Path content)
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(Path content, FileMimeTypes fileMimeTypes)
Generates a 406 Not Acceptable result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(Path content, boolean inline)
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
public static Result notAcceptable(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
notAcceptable
public static Result notAcceptable(Path content, Optional<String> filename)
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
public static Result notAcceptable(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader unsupportedMediaType()
Generates a 415 Unsupported Media Type result.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(play.twirl.api.Content content)
Generates a 415 Unsupported Media Type result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(play.twirl.api.Content content, String charset)
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
public static Result unsupportedMediaType(String content)
Generates a 415 Unsupported Media Type result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(String content, String charset)
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
public static Result unsupportedMediaType(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result unsupportedMediaType(byte[] content)
Generates a 415 Unsupported Media Type result.- Parameters:
content- the result's body content- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(InputStream content)
Generates a 415 Unsupported Media Type result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(InputStream content, long contentLength)
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
public static Result unsupportedMediaType(File content)
Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(File content, FileMimeTypes fileMimeTypes)
Generates a 415 Unsupported Media Type result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(File content, boolean inline)
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 public static Result unsupportedMediaType(File content, String filename)
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
public static Result unsupportedMediaType(File content, Optional<String> filename)
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
public static Result unsupportedMediaType(File content, boolean inline, Optional<String> filename)
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
public static Result unsupportedMediaType(Path content)
Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(Path content, FileMimeTypes fileMimeTypes)
Generates a 415 Unsupported Media Type result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
unsupportedMediaType
public static Result unsupportedMediaType(Path content, boolean inline)
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
public static Result unsupportedMediaType(Path content, Optional<String> filename)
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
public static Result unsupportedMediaType(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader preconditionRequired()
Generates a 428 Precondition Required result.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(play.twirl.api.Content content)
Generates a 428 Precondition Required result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(play.twirl.api.Content content, String charset)
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
public static Result preconditionRequired(String content)
Generates a 428 Precondition Required result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(String content, String charset)
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
public static Result preconditionRequired(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result preconditionRequired(byte[] content)
Generates a 428 Precondition Required result.- Parameters:
content- the result's body content- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(InputStream content)
Generates a 428 Precondition Required result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(InputStream content, long contentLength)
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
public static Result preconditionRequired(File content)
Generates a 428 Precondition Required result.- Parameters:
content- The file to send.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(File content, FileMimeTypes fileMimeTypes)
Generates a 428 Precondition Required result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(File content, boolean inline)
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 public static Result preconditionRequired(File content, String filename)
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
public static Result preconditionRequired(File content, Optional<String> filename)
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
public static Result preconditionRequired(File content, boolean inline, Optional<String> filename)
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
public static Result preconditionRequired(Path content)
Generates a 428 Precondition Required result.- Parameters:
content- The path to send.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(Path content, FileMimeTypes fileMimeTypes)
Generates a 428 Precondition Required result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
preconditionRequired
public static Result preconditionRequired(Path content, boolean inline)
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
public static Result preconditionRequired(Path content, Optional<String> filename)
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
public static Result preconditionRequired(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader tooManyRequests()
Generates a 429 Too Many Requests result.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(play.twirl.api.Content content)
Generates a 429 Too Many Requests result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(play.twirl.api.Content content, String charset)
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
public static Result tooManyRequests(String content)
Generates a 429 Too Many Requests result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(String content, String charset)
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
public static Result tooManyRequests(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result tooManyRequests(byte[] content)
Generates a 429 Too Many Requests result.- Parameters:
content- the result's body content- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(InputStream content)
Generates a 429 Too Many Requests result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(InputStream content, long contentLength)
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
public static Result tooManyRequests(File content)
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(File content, FileMimeTypes fileMimeTypes)
Generates a 429 Too Many Requests result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(File content, boolean inline)
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
public static Result tooManyRequests(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
@Deprecated public static Result tooManyRequests(File content, String filename)
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
public static Result tooManyRequests(File content, Optional<String> filename)
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
public static Result tooManyRequests(File content, boolean inline, Optional<String> filename)
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
public static Result tooManyRequests(Path content)
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(Path content, FileMimeTypes fileMimeTypes)
Generates a 429 Too Many Requests result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(Path content, boolean inline)
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
public static Result tooManyRequests(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
tooManyRequests
public static Result tooManyRequests(Path content, Optional<String> filename)
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
public static Result tooManyRequests(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader requestHeaderFieldsTooLarge()
Generates a 431 Request Header Fields Too Large result.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(play.twirl.api.Content content)
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(play.twirl.api.Content content, String charset)
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
public static Result requestHeaderFieldsTooLarge(String content)
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(String content, String charset)
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
public static Result requestHeaderFieldsTooLarge(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result requestHeaderFieldsTooLarge(byte[] content)
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the result's body content- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(InputStream content)
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(InputStream content, long contentLength)
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
public static Result requestHeaderFieldsTooLarge(File content)
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The file to send.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(File content, FileMimeTypes fileMimeTypes)
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
public static Result requestHeaderFieldsTooLarge(File content, boolean inline)
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 public static Result requestHeaderFieldsTooLarge(File content, String filename)
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
public static Result requestHeaderFieldsTooLarge(File content, Optional<String> filename)
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
public static Result requestHeaderFieldsTooLarge(Path content)
Generates a 431 Request Header Fields Too Large result.- Parameters:
content- The path to send.- Returns:
- the result
-
requestHeaderFieldsTooLarge
public static Result requestHeaderFieldsTooLarge(Path content, FileMimeTypes fileMimeTypes)
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
public static Result requestHeaderFieldsTooLarge(Path content, boolean inline)
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
public static Result requestHeaderFieldsTooLarge(Path content, Optional<String> filename)
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
public static StatusHeader internalServerError()
Generates a 500 Internal Server Error result.- Returns:
- the result
-
internalServerError
public static Result internalServerError(play.twirl.api.Content content)
Generates a 500 Internal Server Error result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
internalServerError
public static Result internalServerError(play.twirl.api.Content content, String charset)
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
public static Result internalServerError(String content)
Generates a 500 Internal Server Error result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
internalServerError
public static Result internalServerError(String content, String charset)
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
public static Result internalServerError(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result internalServerError(byte[] content)
Generates a 500 Internal Server Error result.- Parameters:
content- the result's body content- Returns:
- the result
-
internalServerError
public static Result internalServerError(InputStream content)
Generates a 500 Internal Server Error result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
internalServerError
public static Result internalServerError(InputStream content, long contentLength)
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
public static Result internalServerError(File content)
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.- Returns:
- the result
-
internalServerError
public static Result internalServerError(File content, FileMimeTypes fileMimeTypes)
Generates a 500 Internal Server Error result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
public static Result internalServerError(File content, boolean inline)
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
public static Result internalServerError(File content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
@Deprecated public static Result internalServerError(File content, String filename)
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
public static Result internalServerError(File content, Optional<String> filename)
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
public static Result internalServerError(File content, boolean inline, Optional<String> filename)
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
public static Result internalServerError(Path content)
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.- Returns:
- the result
-
internalServerError
public static Result internalServerError(Path content, FileMimeTypes fileMimeTypes)
Generates a 500 Internal Server Error result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
public static Result internalServerError(Path content, boolean inline)
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
public static Result internalServerError(Path content, boolean inline, 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.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
internalServerError
public static Result internalServerError(Path content, Optional<String> filename)
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
public static Result internalServerError(Path content, boolean inline, Optional<String> filename)
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
public static StatusHeader networkAuthenticationRequired()
Generates a 511 Network Authentication Required result.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(play.twirl.api.Content content)
Generates a 511 Network Authentication Required result.- Parameters:
content- the HTTP response body- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(play.twirl.api.Content content, String charset)
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
public static Result networkAuthenticationRequired(String content)
Generates a 511 Network Authentication Required result.- Parameters:
content- HTTP response body, encoded as a UTF-8 string- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(String content, String charset)
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
public static Result networkAuthenticationRequired(com.fasterxml.jackson.databind.JsonNode content)
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
public static Result networkAuthenticationRequired(byte[] content)
Generates a 511 Network Authentication Required result.- Parameters:
content- the result's body content- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(InputStream content)
Generates a 511 Network Authentication Required result.- Parameters:
content- the input stream containing data to chunk over- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(InputStream content, long contentLength)
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
public static Result networkAuthenticationRequired(File content)
Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(File content, FileMimeTypes fileMimeTypes)
Generates a 511 Network Authentication Required result.- Parameters:
content- The file to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(File content, boolean inline)
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 public static Result networkAuthenticationRequired(File content, String filename)
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
public static Result networkAuthenticationRequired(File content, Optional<String> filename)
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
public static Result networkAuthenticationRequired(Path content)
Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(Path content, FileMimeTypes fileMimeTypes)
Generates a 511 Network Authentication Required result.- Parameters:
content- The path to send.fileMimeTypes- Used for file type mapping.- Returns:
- the result
-
networkAuthenticationRequired
public static Result networkAuthenticationRequired(Path content, boolean inline)
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
public static Result networkAuthenticationRequired(Path content, Optional<String> filename)
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
public static Result movedPermanently(String url)
Generates a 301 Moved Permanently result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
movedPermanently
public static Result movedPermanently(Call call)
Generates a 301 Moved Permanently result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
found
public static Result found(String url)
Generates a 302 Found result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
found
public static Result found(Call call)
Generates a 302 Found result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
seeOther
public static Result seeOther(String url)
Generates a 303 See Other result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
seeOther
public static Result seeOther(Call call)
Generates a 303 See Other result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
redirect
public static Result redirect(String url)
Generates a 303 See Other result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
redirect
public static Result redirect(String url, Map<String,List<String>> queryStringParams)
Generates a 303 See Other result.- Parameters:
url- The url to redirectqueryStringParams- queryString parameters to add to the queryString- Returns:
- the result
-
redirect
public static Result redirect(Call call)
Generates a 303 See Other result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
temporaryRedirect
public static Result temporaryRedirect(String url)
Generates a 307 Temporary Redirect result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
temporaryRedirect
public static Result temporaryRedirect(Call call)
Generates a 307 Temporary Redirect result.- Parameters:
call- Call defining the url to redirect (typically comes from reverse router).- Returns:
- the result
-
permanentRedirect
public static Result permanentRedirect(String url)
Generates a 308 Permanent Redirect result.- Parameters:
url- The url to redirect.- Returns:
- the result
-
-