Uses of Class
ninja.Result
-
Packages that use Result Package Description ninja ninja.diagnostics ninja.exceptions ninja.i18n ninja.template ninja.utils -
-
Uses of Result in ninja
Subclasses of Result in ninja Modifier and Type Class Description class
AsyncResult
An async resultMethods in ninja that return Result Modifier and Type Method Description Result
Result. addCookie(Cookie cookie)
Result
Result. addHeader(String headerName, String headerContent)
Result
ControllerMethods.ControllerMethod0. apply()
Result
ControllerMethods.ControllerMethod1. apply(A a)
Result
ControllerMethods.ControllerMethod10. apply(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j)
Result
ControllerMethods.ControllerMethod11. apply(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k)
Result
ControllerMethods.ControllerMethod12. apply(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l)
Result
ControllerMethods.ControllerMethod13. apply(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m)
Result
ControllerMethods.ControllerMethod14. apply(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n)
Result
ControllerMethods.ControllerMethod15. apply(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k, L l, M m, N n, O o)
Result
ControllerMethods.ControllerMethod2. apply(A a, B b)
Result
ControllerMethods.ControllerMethod3. apply(A a, B b, C c)
Result
ControllerMethods.ControllerMethod4. apply(A a, B b, C c, D d)
Result
ControllerMethods.ControllerMethod5. apply(A a, B b, C c, D d, E e)
Result
ControllerMethods.ControllerMethod6. apply(A a, B b, C c, D d, E e, F f)
Result
ControllerMethods.ControllerMethod7. apply(A a, B b, C c, D d, E e, F f, G g)
Result
ControllerMethods.ControllerMethod8. apply(A a, B b, C c, D d, E e, F f, G g, H h)
Result
ControllerMethods.ControllerMethod9. apply(A a, B b, C c, D d, E e, F f, G g, H h, I i)
static Result
Results. badRequest()
Result
Result. charset(String charset)
Result
Result. contentType(String contentType)
Sets the content type.static Result
Results. contentType(String contentType)
Result
Context. controllerReturned()
Result
WrappedContext. controllerReturned()
static Result
Results. created(Optional<String> url)
Result
Result. doNotCacheContent()
This function sets Cache-Control: no-cache, no-store Date: (current date) Expires: 1970 => it therefore effectively forces the browser and every proxy in between not to cache content.Result
Result. fallbackContentType(String fallbackContentType)
Result
AuthenticityFilter. filter(FilterChain filterChain, Context context)
Result
BasicAuthFilter. filter(FilterChain chain, Context context)
Result
Filter. filter(FilterChain filterChain, Context context)
Filter the request.Result
SecureFilter. filter(FilterChain chain, Context context)
static Result
Results. forbidden()
Result
Ninja. getBadRequestResult(Context context, BadRequestException exception)
Should handle cases where the client sent strange date that led to an error.Result
NinjaDefault. getBadRequestResult(Context context, BadRequestException exception)
Result
Ninja. getForbiddenResult(Context context)
Should handle cases where access is forbidden Should lead to a html error 403 - forbidden (and be used with the same mindset).Result
Ninja. getForbiddenResult(Context context, ForbiddenRequestException exception)
Should handle cases where access is forbidden Should lead to a html error 403 - forbidden (and be used with the same mindset).Result
NinjaDefault. getForbiddenResult(Context context)
Result
NinjaDefault. getForbiddenResult(Context context, ForbiddenRequestException exception)
Result
Ninja. getInternalServerErrorResult(Context context, Exception exception, Result underlyingResult)
Should handle cases where an exception is thrown when handling a route that let to an internal server error.Result
NinjaDefault. getInternalServerErrorResult(Context context, Exception exception)
Deprecated.Result
NinjaDefault. getInternalServerErrorResult(Context context, Exception exception, Result underlyingResult)
Result
Ninja. getNotFoundResult(Context context)
Should handle cases where no route can be found for a given request.Result
Ninja. getNotFoundResult(Context context, RequestNotFoundException exception)
Should handle cases where no route can be found for a given request.Result
NinjaDefault. getNotFoundResult(Context context)
Result
NinjaDefault. getNotFoundResult(Context context, RequestNotFoundException exception)
Result
Ninja. getRenderingExceptionResult(Context context, RenderingException exception, Result underlyingResult)
Should handle cases where aRenderingException
is thrown when handling the rendering of a Result.Result
NinjaDefault. getRenderingExceptionResult(Context context, RenderingException exception, Result underlyingResult)
Result
Ninja. getUnauthorizedResult(Context context)
Should handle cases where access is unauthorized Should lead to a html error 401 - unauthorized (and be used with the same mindset).Result
NinjaDefault. getUnauthorizedResult(Context context)
Result
Result. html()
Set the content type of this result toTEXT_HTML
.static Result
Results. html()
static Result
Results. internalServerError()
Result
Result. json()
Set the content type of this result toAPPLICATION_JSON
.static Result
Results. json()
Result
Result. jsonp()
Set the content type of this result toAPPLICATION_JSONP
.static Result
Results. jsonp()
Result
Result. jsonView(Class<?> jsonView)
Set the Jackson JSON View.Result
FilterChain. next(Context context)
Pass the request to the next filterstatic Result
Results. noContent()
static Result
Results. notFound()
static Result
Results. ok()
Result
Ninja. onException(Context context, Exception exception)
This result should be used when an error occurs.Result
NinjaDefault. onException(Context context, Exception exception)
Result
NinjaDefault. onException(Context context, Exception exception, Result underlyingResult)
Result
Result. redirect(String url)
A redirect that uses 303 see other.static Result
Results. redirect(String url)
A redirect that uses 303 see other.Result
ReverseRouter.Builder. redirect()
Builds the result as aninja.Result
redirect.Result
Result. redirectTemporary(String url)
A redirect that uses 307 see other.static Result
Results. redirectTemporary(String url)
A redirect that uses 307 see other.Result
Result. render(InputStream input, boolean close)
Renders all bytes from the input stream to the output stream.Result
Result. render(Object object)
This method handles two principal cases: 1) If the this.renderable of this result is null, the object passed is simply set as renderable for this Result 2) If the this.renderable of this result is not null an new map is generated as object to render and both the former renderable and the new object added to the map.Result
Result. render(String key, Object value)
Implicitly generates a hashmap as object being rendered and adds this key, value pair.Result
Result. render(Map.Entry<String,Object> entry)
Handles following cases: 1) If this.renderable is null: a new HashMap is generated and this entry being added to the map.Result
Result. render(Map<String,Object> mapToRender)
Replaces the object being passed by this result to the rendering engine with this map.Result
Result. render(Renderable renderable)
Sets this renderable as object to render.Result
Result. renderRaw(byte[] bytes)
This method directly renders the byte array to the output.Result
Result. renderRaw(String string)
Deprecated.=> use text().render(string), html().render(string), json().render(string), xml().render(string), or contentType(type).render(string).Result
AssetsController. serveStatic()
Serves resources from the assets directory of your application.Result
AssetsController. serveWebJars()
Serves resources from the assets directory of your application.Result
Result. setContentType(String contentType)
Deprecated.Result
Result. status(int statusCode)
Set the status of this result.static Result
Results. status(int statusCode)
Result
Result. supportedContentType(String contentTypeSupportedByThisResult)
Will add a content type to the list of supported content types.Result
Result. supportedContentTypes(String... contentTypesSupportedByThisResult)
Will add the content types to the list of supported content types.Result
Result. template(String template)
Set the template to render.Result
Result. text()
Set the content type of this result toTEXT_PLAIN
.static Result
Results. text()
static Result
Results. TODO()
static Result
Results. unauthorized()
Result
Result. unsetCookie(String name)
static Result
Results. webSocketContinue()
Instructs ninja (and the http container) that it is okay to continue with the websocket handshake.Result
Result. xml()
Set the content type of this result toResult#APPLICATON_XML
.static Result
Results. xml()
Methods in ninja with parameters of type Result Modifier and Type Method Description ResponseStreams
Context. finalizeHeaders(Result result)
Finalizing the headers copies all stuff into the headers.ResponseStreams
WrappedContext. finalizeHeaders(Result result)
ResponseStreams
Context. finalizeHeadersWithoutFlashAndSessionCookie(Result result)
Finalizing the headers copies all stuff into the headers.ResponseStreams
WrappedContext. finalizeHeadersWithoutFlashAndSessionCookie(Result result)
Result
Ninja. getInternalServerErrorResult(Context context, Exception exception, Result underlyingResult)
Should handle cases where an exception is thrown when handling a route that let to an internal server error.Result
NinjaDefault. getInternalServerErrorResult(Context context, Exception exception, Result underlyingResult)
Result
Ninja. getRenderingExceptionResult(Context context, RenderingException exception, Result underlyingResult)
Should handle cases where aRenderingException
is thrown when handling the rendering of a Result.Result
NinjaDefault. getRenderingExceptionResult(Context context, RenderingException exception, Result underlyingResult)
Result
NinjaDefault. onException(Context context, Exception exception, Result underlyingResult)
void
Renderable. render(Context context, Result result)
void
Ninja. renderErrorResultAndCatchAndLogExceptions(Result result, Context context)
Should be used to render an error.void
NinjaDefault. renderErrorResultAndCatchAndLogExceptions(Result result, Context context)
void
Context. returnResultAsync(Result result)
Indicate that request processing of an async request is complete.void
WrappedContext. returnResultAsync(Result result)
void
RouteBuilder. with(Result result)
Deprecated.Use the functional interface methods to supply a new result for each route request.void
RouteBuilderImpl. with(Result result)
Deprecated. -
Uses of Result in ninja.diagnostics
Methods in ninja.diagnostics that return Result Modifier and Type Method Description Result
DiagnosticError. getUnderlyingResult()
Methods in ninja.diagnostics with parameters of type Result Modifier and Type Method Description static DiagnosticErrorRenderer
DiagnosticErrorRenderer. build(Context context, Result result, DiagnosticError diagnosticError)
static DiagnosticError
DiagnosticErrorBuilder. build500InternalServerErrorDiagnosticError(Throwable cause, boolean tryToReadLinesFromSourceCode, Result underlyingResult)
static DiagnosticError
DiagnosticErrorBuilder. buildDiagnosticError(String title, Throwable throwable, boolean tryToReadLinesFromSourceCode, Result underlyingResult)
static DiagnosticError
DiagnosticErrorBuilder. buildDiagnosticError(String title, Throwable throwable, String relativeSourcePath, int lineNumberOfError, Result underlyingResult)
static DiagnosticError
DiagnosticErrorBuilder. buildDiagnosticError(String title, Throwable throwable, String packageName, String fileName, int lineNumberOfError, Result underlyingResult)
static DiagnosticError
DiagnosticErrorBuilder. buildDiagnosticError(String title, Throwable throwable, SourceSnippet snippet, int lineNumberOfError, Result underlyingResult)
void
DiagnosticError. render(Context context, Result result)
void
DiagnosticErrorRenderer. renderResult(Context context, Result result)
static void
DiagnosticErrorRenderer. tryToRender(Context context, Result result, DiagnosticError diagnosticError, boolean throwInternalServerExceptionOnError)
Constructors in ninja.diagnostics with parameters of type Result Constructor Description DiagnosticError(String title, Throwable throwable, URI sourceLocation, List<String> sourceLines, int lineNumberOfSourceLines, int lineNumberOfError, Result underlyingResult)
DiagnosticError(String title, Throwable throwable, Result underlyingResult)
-
Uses of Result in ninja.exceptions
Methods in ninja.exceptions that return Result Modifier and Type Method Description Result
RenderingException. getResult()
Constructors in ninja.exceptions with parameters of type Result Constructor Description RenderingException(String message, Throwable cause, Result result, String sourcePath, int lineNumber)
RenderingException(String message, Throwable cause, Result result, String title, String sourcePath, int lineNumber)
-
Uses of Result in ninja.i18n
Methods in ninja.i18n that return Result Modifier and Type Method Description Result
Lang. setLanguage(String locale, Result result)
Force a language in Ninja framwork.Result
LangImpl. setLanguage(String locale, Result result)
Methods in ninja.i18n with parameters of type Result Modifier and Type Method Description void
Lang. clearLanguage(Result result)
Clears the current language.void
LangImpl. clearLanguage(Result result)
Result
Lang. setLanguage(String locale, Result result)
Force a language in Ninja framwork.Result
LangImpl. setLanguage(String locale, Result result)
Method parameters in ninja.i18n with type arguments of type Result Modifier and Type Method Description Optional<String>
Messages. get(String key, Context context, Optional<Result> result, Object... parameter)
Get a translated string.Optional<String>
MessagesImpl. get(String key, Context context, Optional<Result> result, Object... parameter)
Map<Object,Object>
Messages. getAll(Context context, Optional<Result> result)
Returns all messages for the default language in that context / result.Map<Object,Object>
MessagesImpl. getAll(Context context, Optional<Result> result)
Optional<String>
Lang. getLanguage(Context context, Optional<Result> result)
Retrieve the current language or null if not set.Optional<String>
LangImpl. getLanguage(Context context, Optional<Result> result)
String
Messages. getWithDefault(String key, String defaultMessage, Context context, Optional<Result> result, Object... params)
Gets a message for a message key.String
MessagesImpl. getWithDefault(String key, String defaultMessage, Context context, Optional<Result> result, Object... params)
-
Uses of Result in ninja.template
Methods in ninja.template with parameters of type Result Modifier and Type Method Description String
TemplateEngineHelper. getTemplateForResult(Route route, Result result, String suffix)
void
TemplateEngine. invoke(Context context, Result result)
Render the given object to the given contextvoid
TemplateEngineFreemarker. invoke(Context context, Result result)
void
TemplateEngineJson. invoke(Context context, Result result)
void
TemplateEngineJsonP. invoke(Context context, Result result)
void
TemplateEngineText. invoke(Context context, Result result)
void
TemplateEngineXml. invoke(Context context, Result result)
void
TemplateEngineFreemarker. throwRenderingException(Context context, Result result, Exception cause, String knownTemplateSourcePath)
Constructors in ninja.template with parameters of type Result Constructor Description TemplateEngineFreemarkerI18nMethod(Messages messages, Context context, Result result)
-
Uses of Result in ninja.utils
Methods in ninja.utils with parameters of type Result Modifier and Type Method Description void
HttpCacheToolkit. addEtag(Context context, Result result, Long lastModified)
Adds etag to result.void
HttpCacheToolkitImpl. addEtag(Context context, Result result, Long lastModified)
ResponseStreams
AbstractContext. finalizeHeaders(Result result)
protected ResponseStreams
AbstractContext. finalizeHeaders(Result result, Boolean handleFlashAndSessionCookie)
ResponseStreams
AbstractContext. finalizeHeadersWithoutFlashAndSessionCookie(Result result)
void
ResultHandler. handleResult(Result result, Context context)
-