Uses of Interface
ninja.Context
-
Packages that use Context Package Description ninja ninja.bodyparser ninja.diagnostics ninja.i18n ninja.params ninja.session ninja.template ninja.template.directives ninja.utils ninja.validation ninja.websockets -
-
Uses of Context in ninja
Subinterfaces of Context in ninja Modifier and Type Interface Description static interfaceContext.ImplImpl is used to hide stuff that a user should not see on code completion.Classes in ninja that implement Context Modifier and Type Class Description classWrappedContextA wrapped context.Methods in ninja with parameters of type Context Modifier and Type Method Description ReverseRouter.BuilderReverseRouter.Builder. absolute(Context context)Make this an absolute route by including the current scheme (e.g.protected MessageNinjaDefault. buildErrorMessage(Context context, String errorTextKey, String errorTextDefault, Optional<Throwable> exception, Optional<Result> underlyingResult)ResultAuthenticityFilter. filter(FilterChain filterChain, Context context)ResultBasicAuthFilter. filter(FilterChain chain, Context context)ResultFilter. filter(FilterChain filterChain, Context context)Filter the request.ResultSecureFilter. filter(FilterChain chain, Context context)ResultNinja. getBadRequestResult(Context context, BadRequestException exception)Should handle cases where the client sent strange date that led to an error.ResultNinjaDefault. getBadRequestResult(Context context, BadRequestException exception)ResultNinja. 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).ResultNinja. 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).ResultNinjaDefault. getForbiddenResult(Context context)ResultNinjaDefault. getForbiddenResult(Context context, ForbiddenRequestException exception)ResultNinja. 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.ResultNinjaDefault. getInternalServerErrorResult(Context context, Exception exception)Deprecated.ResultNinjaDefault. getInternalServerErrorResult(Context context, Exception exception, Result underlyingResult)ResultNinja. getNotFoundResult(Context context)Should handle cases where no route can be found for a given request.ResultNinja. getNotFoundResult(Context context, RequestNotFoundException exception)Should handle cases where no route can be found for a given request.ResultNinjaDefault. getNotFoundResult(Context context)ResultNinjaDefault. getNotFoundResult(Context context, RequestNotFoundException exception)ResultNinja. getRenderingExceptionResult(Context context, RenderingException exception, Result underlyingResult)Should handle cases where aRenderingExceptionis thrown when handling the rendering of a Result.ResultNinjaDefault. getRenderingExceptionResult(Context context, RenderingException exception, Result underlyingResult)ResultNinja. 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).ResultNinjaDefault. getUnauthorizedResult(Context context)ResultFilterChain. next(Context context)Pass the request to the next filterResultNinja. onException(Context context, Exception exception)This result should be used when an error occurs.ResultNinjaDefault. onException(Context context, Exception exception)ResultNinjaDefault. onException(Context context, Exception exception, Result underlyingResult)voidRenderable. render(Context context, Result result)voidNinja. renderErrorResultAndCatchAndLogExceptions(Result result, Context context)Should be used to render an error.voidNinjaDefault. renderErrorResultAndCatchAndLogExceptions(Result result, Context context)Constructors in ninja with parameters of type Context Constructor Description WrappedContext(Context wrapped) -
Uses of Context in ninja.bodyparser
Methods in ninja.bodyparser with parameters of type Context Modifier and Type Method Description <T> TBodyParserEngine. invoke(Context context, Class<T> classOfT)Invoke the parser and get back a Java object populated with the content of this request.<T> TBodyParserEngineJson. invoke(Context context, Class<T> classOfT)<T> TBodyParserEnginePost. invoke(Context context, Class<T> classOfT)<T> TBodyParserEngineXml. invoke(Context context, Class<T> classOfT) -
Uses of Context in ninja.diagnostics
Methods in ninja.diagnostics with parameters of type Context Modifier and Type Method Description static DiagnosticErrorRendererDiagnosticErrorRenderer. build(Context context, Result result, DiagnosticError diagnosticError)voidDiagnosticError. render(Context context, Result result)voidDiagnosticErrorRenderer. renderResult(Context context, Result result)static voidDiagnosticErrorRenderer. tryToRender(Context context, Result result, DiagnosticError diagnosticError, boolean throwInternalServerExceptionOnError) -
Uses of Context in ninja.i18n
Methods in ninja.i18n with parameters of type Context 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)StringMessages. getWithDefault(String key, String defaultMessage, Context context, Optional<Result> result, Object... params)Gets a message for a message key.StringMessagesImpl. getWithDefault(String key, String defaultMessage, Context context, Optional<Result> result, Object... params) -
Uses of Context in ninja.params
Methods in ninja.params that return Context Modifier and Type Method Description ContextArgumentExtractors.ContextExtractor. extract(Context context)Methods in ninja.params that return types with arguments of type Context Modifier and Type Method Description Class<Context>ArgumentExtractors.ContextExtractor. getExtractedType()Methods in ninja.params with parameters of type Context Modifier and Type Method Description TArgumentExtractor. extract(Context context)Extract the argument from the contextObjectArgumentExtractors.AttributeExtractor. extract(Context context)TArgumentExtractors.BodyAsExtractor. extract(Context context)ContextArgumentExtractors.ContextExtractor. extract(Context context)FileItemArgumentExtractors.FileItemParamExtractor. extract(Context context)FileItem[]ArgumentExtractors.FileItemParamsExtractor. extract(Context context)FileArgumentExtractors.FileParamExtractor. extract(Context context)File[]ArgumentExtractors.FileParamsExtractor. extract(Context context)FlashScopeArgumentExtractors.FlashExtractor. extract(Context context)StringArgumentExtractors.HeaderExtractor. extract(Context context)String[]ArgumentExtractors.HeadersExtractor. extract(Context context)InputStreamArgumentExtractors.InputStreamParamExtractor. extract(Context context)InputStream[]ArgumentExtractors.InputStreamParamsExtractor. extract(Context context)StringArgumentExtractors.ParamExtractor. extract(Context context)String[]ArgumentExtractors.ParamsExtractor. extract(Context context)StringArgumentExtractors.PathParamExtractor. extract(Context context)SessionArgumentExtractors.SessionExtractor. extract(Context context)StringArgumentExtractors.SessionParamExtractor. extract(Context context)ValidationArgumentExtractors.ValidationExtractor. extract(Context context)TParsingArgumentExtractor. extract(Context context)XParsingArrayExtractor. extract(Context context)TValidatingArgumentExtractor. extract(Context context)ObjectControllerMethodInvoker. invoke(Object controller, Context context) -
Uses of Context in ninja.session
Methods in ninja.session with parameters of type Context Modifier and Type Method Description voidFlashScope. init(Context context)Intended for use by implementations only.voidFlashScopeImpl. init(Context context)voidSession. init(Context context)Has to be called initially.voidSessionImpl. init(Context context)voidFlashScope. save(Context context)Intended for use by implementations only.voidFlashScopeImpl. save(Context context)voidSession. save(Context context)To finally send this session to the user this method has to be called.voidSessionImpl. save(Context context) -
Uses of Context in ninja.template
Methods in ninja.template with parameters of type Context Modifier and Type Method Description voidTemplateEngine. invoke(Context context, Result result)Render the given object to the given contextvoidTemplateEngineFreemarker. invoke(Context context, Result result)voidTemplateEngineJson. invoke(Context context, Result result)voidTemplateEngineJsonP. invoke(Context context, Result result)voidTemplateEngineText. invoke(Context context, Result result)voidTemplateEngineXml. invoke(Context context, Result result)voidTemplateEngineFreemarker. throwRenderingException(Context context, Result result, Exception cause, String knownTemplateSourcePath)Constructors in ninja.template with parameters of type Context Constructor Description TemplateEngineFreemarkerI18nMethod(Messages messages, Context context, Result result) -
Uses of Context in ninja.template.directives
Constructors in ninja.template.directives with parameters of type Context Constructor Description TemplateEngineFreemarkerAuthenticityFormDirective(Context context)TemplateEngineFreemarkerAuthenticityTokenDirective(Context context) -
Uses of Context in ninja.utils
Classes in ninja.utils that implement Context Modifier and Type Class Description classAbstractContextAbstract Context.Impl that implements features that are not reliant on the concrete Context implementation.Methods in ninja.utils with parameters of type Context Modifier and Type Method Description voidHttpCacheToolkit. addEtag(Context context, Result result, Long lastModified)Adds etag to result.voidHttpCacheToolkitImpl. addEtag(Context context, Result result, Long lastModified)StringMimeTypes. getContentType(Context context, String filename)return the content-type from a file name.StringMimeTypes. getContentType(Context context, String filename, String defaultContentType)return the content-type from a file name.
For a text-based content-type, also return the encoding suffix eg.voidResultHandler. handleResult(Result result, Context context)booleanHttpCacheToolkit. isModified(Optional<String> etag, Optional<Long> lastModified, Context context)Checks if resource has been modified.booleanHttpCacheToolkitImpl. isModified(Optional<String> etag, Optional<Long> lastModified, Context context) -
Uses of Context in ninja.validation
Methods in ninja.validation with parameters of type Context Modifier and Type Method Description voidValidator. validate(T value, String field, Context context)Validate the given valuevoidValidators.DateValidator. validate(String value, String field, Context context)Validate the given valuevoidValidators.EnumValidator. validate(String value, String field, Context context)Validate the given valuevoidValidators.FloatValidator. validate(String value, String field, Context context)Validate the given valuevoidValidators.IntegerValidator. validate(String value, String field, Context context)Validate the given valuevoidValidators.JSRValidator. validate(Object value, String field, Context context)Validate the given value.voidValidators.LengthValidator. validate(String value, String field, Context context)Validate the given valuevoidValidators.MatchesValidator. validate(String value, String field, Context context)Validate the given valuevoidValidators.NumberValidator. validate(Number value, String field, Context context)Validate the given valuevoidValidators.RequiredValidator. validate(Object value, String field, Context context)voidValidators.UUIDValidator. validate(String value, String field, Context context)Validate the given value -
Uses of Context in ninja.websockets
Methods in ninja.websockets with parameters of type Context Modifier and Type Method Description WebSocketHandshakeWebSocketHandshakeExtractor. extract(Context context)
-