Package | Description |
---|---|
ninja | |
ninja.bodyparser | |
ninja.diagnostics | |
ninja.i18n | |
ninja.params | |
ninja.session | |
ninja.template | |
ninja.template.directives | |
ninja.utils | |
ninja.validation | |
ninja.websockets |
Modifier and Type | Interface and Description |
---|---|
static interface |
Context.Impl
Impl is used to hide stuff that a user should not see on
code completion.
|
Modifier and Type | Class and Description |
---|---|
class |
WrappedContext
A wrapped context.
|
Modifier and Type | Method and Description |
---|---|
ReverseRouter.Builder |
ReverseRouter.Builder.absolute(Context context)
Make this an absolute route by including the current scheme (e.g.
|
protected Message |
NinjaDefault.buildErrorMessage(Context context,
String errorTextKey,
String errorTextDefault,
Optional<Throwable> exception,
Optional<Result> underlyingResult) |
Result |
Filter.filter(FilterChain filterChain,
Context context)
Filter the request.
|
Result |
SecureFilter.filter(FilterChain chain,
Context context) |
Result |
AuthenticityFilter.filter(FilterChain filterChain,
Context context) |
Result |
BasicAuthFilter.filter(FilterChain chain,
Context context) |
Result |
NinjaDefault.getBadRequestResult(Context context,
BadRequestException exception) |
Result |
Ninja.getBadRequestResult(Context context,
BadRequestException exception)
Should handle cases where the client sent strange date that
led to an error.
|
Result |
NinjaDefault.getForbiddenResult(Context context) |
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 |
NinjaDefault.getForbiddenResult(Context context,
ForbiddenRequestException exception) |
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.getInternalServerErrorResult(Context context,
Exception exception)
Deprecated.
|
Result |
NinjaDefault.getInternalServerErrorResult(Context context,
Exception exception,
Result underlyingResult) |
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.getNotFoundResult(Context context) |
Result |
Ninja.getNotFoundResult(Context context)
Should handle cases where no route can be found for a given request.
|
Result |
NinjaDefault.getNotFoundResult(Context context,
RequestNotFoundException exception) |
Result |
Ninja.getNotFoundResult(Context context,
RequestNotFoundException exception)
Should handle cases where no route can be found for a given request.
|
Result |
NinjaDefault.getRenderingExceptionResult(Context context,
RenderingException exception,
Result underlyingResult) |
Result |
Ninja.getRenderingExceptionResult(Context context,
RenderingException exception,
Result underlyingResult)
Should handle cases where a
RenderingException is thrown
when handling the rendering of a Result. |
Result |
NinjaDefault.getUnauthorizedResult(Context context) |
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 |
FilterChain.next(Context context)
Pass the request to the next filter
|
Result |
NinjaDefault.onException(Context context,
Exception exception) |
Result |
Ninja.onException(Context context,
Exception exception)
This result should be used when an error occurs.
|
Result |
NinjaDefault.onException(Context context,
Exception exception,
Result underlyingResult) |
void |
Renderable.render(Context context,
Result result) |
void |
NinjaDefault.renderErrorResultAndCatchAndLogExceptions(Result result,
Context context) |
void |
Ninja.renderErrorResultAndCatchAndLogExceptions(Result result,
Context context)
Should be used to render an error.
|
Constructor and Description |
---|
WrappedContext(Context wrapped) |
Modifier and Type | Method and Description |
---|---|
<T> T |
BodyParserEngine.invoke(Context context,
Class<T> classOfT)
Invoke the parser and get back a Java object populated
with the content of this request.
|
<T> T |
BodyParserEngineJson.invoke(Context context,
Class<T> classOfT) |
<T> T |
BodyParserEnginePost.invoke(Context context,
Class<T> classOfT) |
<T> T |
BodyParserEngineXml.invoke(Context context,
Class<T> classOfT) |
Modifier and Type | Method and Description |
---|---|
static DiagnosticErrorRenderer |
DiagnosticErrorRenderer.build(Context context,
Result result,
DiagnosticError diagnosticError) |
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) |
Modifier and Type | Method and 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) |
Modifier and Type | Method and Description |
---|---|
Context |
ArgumentExtractors.ContextExtractor.extract(Context context) |
Modifier and Type | Method and Description |
---|---|
Class<Context> |
ArgumentExtractors.ContextExtractor.getExtractedType() |
Modifier and Type | Method and Description |
---|---|
T |
ValidatingArgumentExtractor.extract(Context context) |
X |
ParsingArrayExtractor.extract(Context context) |
T |
ParsingArgumentExtractor.extract(Context context) |
Context |
ArgumentExtractors.ContextExtractor.extract(Context context) |
Validation |
ArgumentExtractors.ValidationExtractor.extract(Context context) |
Session |
ArgumentExtractors.SessionExtractor.extract(Context context) |
FlashScope |
ArgumentExtractors.FlashExtractor.extract(Context context) |
String |
ArgumentExtractors.PathParamExtractor.extract(Context context) |
String |
ArgumentExtractors.ParamExtractor.extract(Context context) |
String[] |
ArgumentExtractors.ParamsExtractor.extract(Context context) |
FileItem |
ArgumentExtractors.FileItemParamExtractor.extract(Context context) |
FileItem[] |
ArgumentExtractors.FileItemParamsExtractor.extract(Context context) |
File |
ArgumentExtractors.FileParamExtractor.extract(Context context) |
File[] |
ArgumentExtractors.FileParamsExtractor.extract(Context context) |
InputStream |
ArgumentExtractors.InputStreamParamExtractor.extract(Context context) |
InputStream[] |
ArgumentExtractors.InputStreamParamsExtractor.extract(Context context) |
String |
ArgumentExtractors.HeaderExtractor.extract(Context context) |
String[] |
ArgumentExtractors.HeadersExtractor.extract(Context context) |
String |
ArgumentExtractors.SessionParamExtractor.extract(Context context) |
Object |
ArgumentExtractors.AttributeExtractor.extract(Context context) |
T |
ArgumentExtractors.BodyAsExtractor.extract(Context context) |
T |
ArgumentExtractor.extract(Context context)
Extract the argument from the context
|
Object |
ControllerMethodInvoker.invoke(Object controller,
Context context) |
Modifier and Type | Method and Description |
---|---|
void |
FlashScopeImpl.init(Context context) |
void |
SessionImpl.init(Context context) |
void |
Session.init(Context context)
Has to be called initially.
|
void |
FlashScope.init(Context context)
Intended for use by implementations only.
|
void |
FlashScopeImpl.save(Context context) |
void |
SessionImpl.save(Context context) |
void |
Session.save(Context context)
To finally send this session to the user this method has to be called.
|
void |
FlashScope.save(Context context)
Intended for use by implementations only.
|
Modifier and Type | Method and Description |
---|---|
void |
TemplateEngineJson.invoke(Context context,
Result result) |
void |
TemplateEngineJsonP.invoke(Context context,
Result result) |
void |
TemplateEngineFreemarker.invoke(Context context,
Result result) |
void |
TemplateEngine.invoke(Context context,
Result result)
Render the given object to the given context
|
void |
TemplateEngineXml.invoke(Context context,
Result result) |
void |
TemplateEngineText.invoke(Context context,
Result result) |
void |
TemplateEngineFreemarker.throwRenderingException(Context context,
Result result,
Exception cause,
String knownTemplateSourcePath) |
Constructor and Description |
---|
TemplateEngineFreemarkerI18nMethod(Messages messages,
Context context,
Result result) |
Constructor and Description |
---|
TemplateEngineFreemarkerAuthenticityFormDirective(Context context) |
TemplateEngineFreemarkerAuthenticityTokenDirective(Context context) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractContext
Abstract Context.Impl that implements features that are not reliant
on the concrete Context implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
HttpCacheToolkitImpl.addEtag(Context context,
Result result,
Long lastModified) |
void |
HttpCacheToolkit.addEtag(Context context,
Result result,
Long lastModified)
Adds etag to result.
|
String |
MimeTypes.getContentType(Context context,
String filename)
return the content-type from a file name.
|
String |
MimeTypes.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. |
void |
ResultHandler.handleResult(Result result,
Context context) |
boolean |
HttpCacheToolkitImpl.isModified(Optional<String> etag,
Optional<Long> lastModified,
Context context) |
boolean |
HttpCacheToolkit.isModified(Optional<String> etag,
Optional<Long> lastModified,
Context context)
Checks if resource has been modified.
|
Modifier and Type | Method and Description |
---|---|
void |
Validators.NumberValidator.validate(Number value,
String field,
Context context)
Validate the given value
|
void |
Validators.JSRValidator.validate(Object value,
String field,
Context context)
Validate the given value.
|
void |
Validators.RequiredValidator.validate(Object value,
String field,
Context context) |
void |
Validators.LengthValidator.validate(String value,
String field,
Context context)
Validate the given value
|
void |
Validators.IntegerValidator.validate(String value,
String field,
Context context)
Validate the given value
|
void |
Validators.FloatValidator.validate(String value,
String field,
Context context)
Validate the given value
|
void |
Validators.DateValidator.validate(String value,
String field,
Context context)
Validate the given value
|
void |
Validators.UUIDValidator.validate(String value,
String field,
Context context)
Validate the given value
|
void |
Validators.MatchesValidator.validate(String value,
String field,
Context context)
Validate the given value
|
void |
Validators.EnumValidator.validate(String value,
String field,
Context context)
Validate the given value
|
void |
Validator.validate(T value,
String field,
Context context)
Validate the given value
|
Modifier and Type | Method and Description |
---|---|
WebSocketHandshake |
WebSocketHandshakeExtractor.extract(Context context) |
Copyright © 2019 ninjaframework. All rights reserved.