Index
All Classes and Interfaces|All Packages|Serialized Form
A
- accept(T, Errors) - Method in class de.odrotbohm.spring.web.validation.YaviValidator
- addDetails(String, Object) - Method in class de.odrotbohm.spring.web.model.ErrorsWithDetails
-
Registers the given details object to be used for the given key, i.e.
C
- canRead(MediaType) - Method in class de.odrotbohm.spring.web.mvc.MessageSourceResolvableHttpMessageConverter
- concludeIfValid(BiFunction<? super T, Errors, ? extends ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Concludes the processing of the current payload with the given finalizer, but automatically produces an error response via the callbacks registered for
MappedPayloads.MappedPayload.onErrors(java.util.function.Function<org.springframework.validation.Errors, org.springframework.http.ResponseEntity<?>>)andMappedPayloads.MappedPayload.onAbsence. - concludeIfValid(Function<? super T, R>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Concludes the processing of the current payload with the given finalizer, but automatically produces an error response via the callbacks registered for
MappedPayloads.MappedPayload.onErrors(java.util.function.Function<org.springframework.validation.Errors, org.springframework.http.ResponseEntity<?>>)andMappedPayloads.MappedPayload.onAbsence. - concludeSelfIfValid(BiFunction<? super T, MappedPayloads.MappedErrors, ? extends ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Concludes the processing of the current payload with the given finalizer, but automatically produces an error response via the callbacks registered for
MappedPayloads.MappedPayload.onErrors(java.util.function.Function<org.springframework.validation.Errors, org.springframework.http.ResponseEntity<?>>)andMappedPayloads.MappedPayload.onAbsence. - concludeWithoutContent() - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Terminal operation that produces an empty response with
HttpStatus.NO_CONTENT.
D
- de.odrotbohm.spring.web.autoconfigure - package de.odrotbohm.spring.web.autoconfigure
- de.odrotbohm.spring.web.jackson - package de.odrotbohm.spring.web.jackson
- de.odrotbohm.spring.web.model - package de.odrotbohm.spring.web.model
- de.odrotbohm.spring.web.mvc - package de.odrotbohm.spring.web.mvc
- de.odrotbohm.spring.web.validation - package de.odrotbohm.spring.web.validation
E
- ErrorsModule - Class in de.odrotbohm.spring.web.jackson
- ErrorsModule(MessageSource) - Constructor for class de.odrotbohm.spring.web.jackson.ErrorsModule
- errorsOrNone() - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
- errorsOrNone() - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- ErrorsSerializer - Class in de.odrotbohm.spring.web.jackson
-
A Jackson serializer that translates an
Errorsinstance into aMapkeyed by field and theFieldErrors as values. - ErrorsWithDetails - Class in de.odrotbohm.spring.web.model
-
A model object to allow replacing the error messages rendered for field errors with custom details.
- ErrorsWithDetails() - Constructor for class de.odrotbohm.spring.web.model.ErrorsWithDetails
F
- flatMap(Function<? super T, Optional<S>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- flatMapIfValid(Function<? super T, Optional<S>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
I
- I18nedMessage - Class in de.odrotbohm.spring.web.model
-
Simple implementation of
MessageSourceResolvableto trigger translation of the given code(s). - I18nedMessage() - Constructor for class de.odrotbohm.spring.web.model.I18nedMessage
M
- map(BiFunction<? super T, Errors, S>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- map(Function<? super T, S>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Applies the given
Function, even if errors have been accumulated. - mapIfValid(BiFunction<? super T, Errors, S>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- mapIfValid(Function<? super T, S>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Applies the given
Functionif no errors have been accumulated or we're on a path to aHttpStatus.NOT_FOUNDyet. - MappedErrors() - Constructor for class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
- MappedPayloadHandlerMethodArgumentResolver - Class in de.odrotbohm.spring.web.mvc
-
HandlerMethodArgumentResolverforMappedPayloads.MappedPayloadparameters in Spring MVC controllers. - MappedPayloadHandlerMethodArgumentResolver() - Constructor for class de.odrotbohm.spring.web.mvc.MappedPayloadHandlerMethodArgumentResolver
- MappedPayloadProperties - Class in de.odrotbohm.spring.web.mvc
-
Configuration properties for the handling of
MappedPayloads.MappedPayloadbinding. - MappedPayloadProperties() - Constructor for class de.odrotbohm.spring.web.mvc.MappedPayloadProperties
- MappedPayloads - Interface in de.odrotbohm.spring.web.model
-
A monadic type to implement Spring MVC handler methods in a functional way.
- MappedPayloads.MappedErrors - Class in de.odrotbohm.spring.web.model
- MappedPayloads.MappedPayload<T> - Class in de.odrotbohm.spring.web.model
-
A monadic type to work with a mapped payload alongside
Errorsto build up pipelines to eventually result in anHttpEntitybased on the processing steps. - MessageSourceResolvableHttpMessageConverter - Class in de.odrotbohm.spring.web.mvc
-
An
HttpMessageConverterthat immediately rendersMessageSourceResolvableinstances returned from a Spring MVC controller as plain text ifMediaType.TEXT_PLAINis requested.
N
- notFoundIf(boolean) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Switches the
MappedPayloads.MappedPayloadto unconditionally produce anHttpEntitywith status codeHttpStatus.NOT_FOUND. - notFoundIf(Predicate<? super T>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Turns the
MappedPayloads.MappedPayloadto unconditionally produce anHttpEntitywith status codeHttpStatus.NOT_FOUNDif the given predicate on the payload matches.
O
- of(String, String...) - Static method in class de.odrotbohm.spring.web.model.I18nedMessage
-
Creates a new
I18nedMessagefor the given codes. - of(Optional<T>, Errors) - Static method in interface de.odrotbohm.spring.web.model.MappedPayloads
-
Creates a new
MappedPayloads.MappedPayloadof the given source andErrors. - of(Errors) - Static method in interface de.odrotbohm.spring.web.model.MappedPayloads
-
Creates a new
MappedPayloads.MappedErrorsfrom the givenErrorsinstance. - of(T, Errors) - Static method in interface de.odrotbohm.spring.web.model.MappedPayloads
-
Creates a new
MappedPayloads.MappedPayloadfor the given source instance - onAbsence(Supplier<ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Registers a
Functionto create anResponseEntityin case the pipeline yields the absence of a payload. - onAbsenceReject(String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Registers the given field to be rejected on payload absence.
- onErrors - Variable in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
- onErrors(Function<Errors, ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
- onErrors(Function<Errors, ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- onErrors(Supplier<ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
- onErrors(Supplier<ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- onValidGet(Supplier<ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Creates an
HttpEntityif theMappedPayloads.MappedPayloadis valid, i.e.
P
- peek(BiConsumer<? super T, Errors>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- peek(Consumer<? super T>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- peekErrors(Consumer<Errors>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Allows to peek at the current
Errorsinstance. - peekIfValid(BiConsumer<? super T, Errors>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Peeks at the given payload and
Errorsif no errors have been accumulated or we're on a path to aHttpStatus.NOT_FOUNDyet. - peekIfValid(Consumer<? super T>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Peeks at the payload if present and no errors have been accumulated or we're on a path to a
HttpStatus.NOT_FOUNDyet.
R
- readInternal(Class<? extends MessageSourceResolvable>, HttpInputMessage) - Method in class de.odrotbohm.spring.web.mvc.MessageSourceResolvableHttpMessageConverter
- rejectField(boolean, String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Rejects the field with the given name with the given error code if the given condition is true.
- rejectField(boolean, String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- rejectField(boolean, String, String, Function<Errors, ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Rejects the field with the given name with the given error code if the given condition is true.
- rejectField(boolean, String, String, Function<Errors, ResponseEntity<?>>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Rejects the field with the given name with the given error code if the given condition is true.
- rejectField(boolean, Function<? super T, ?>, String) - Method in interface de.odrotbohm.spring.web.model.TypeSafeRejector
-
Rejects the field referred to by the given
Function(ideally a method reference). - rejectField(String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Rejects the field of the given name with the given error code.
- rejectField(String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- rejectField(String, String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Rejects the field with the given name with the given error code and default message.
- rejectField(String, String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
- rejectField(Function<? super T, ?>, String) - Method in interface de.odrotbohm.spring.web.model.TypeSafeRejector
-
Rejects the field referred to by the given
Function(ideally a method reference). - rejectField(Predicate<T>, String, String) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Rejects the field with the given name with the given error code if the given condition predicate returns true.
- rejectField(Predicate<T>, Function<? super T, ?>, String) - Method in interface de.odrotbohm.spring.web.model.TypeSafeRejector
- resolveArgument(MethodParameter, ModelAndViewContainer, NativeWebRequest, WebDataBinderFactory) - Method in class de.odrotbohm.spring.web.mvc.MappedPayloadHandlerMethodArgumentResolver
S
- serialize(Errors, JsonGenerator, SerializerProvider) - Method in class de.odrotbohm.spring.web.jackson.ErrorsSerializer
- supports(Class<?>) - Method in class de.odrotbohm.spring.web.mvc.MessageSourceResolvableHttpMessageConverter
- supportsParameter(MethodParameter) - Method in class de.odrotbohm.spring.web.mvc.MappedPayloadHandlerMethodArgumentResolver
T
- toBadRequest() - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Unconditionally creates a
HttpStatus.BAD_REQUESTwith the currentErrorsas payload. - toBadRequest(Errors) - Static method in interface de.odrotbohm.spring.web.model.MappedPayloads
-
Syntactic sugar to easily create a
HttpStatus.BAD_REQUESTresponse from anErrorsinstance in aStreammapping step or the like. - toMap() - Method in class de.odrotbohm.spring.web.model.ErrorsWithDetails
- TypeSafeRejector<T extends TypeSafeRejector<T,
S>, S> - Interface in de.odrotbohm.spring.web.model
V
- validate(BiConsumer<? super T, Errors>) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
-
Syntactic sugar to invoke validations in a readable way.
W
- with(T) - Method in class de.odrotbohm.spring.web.model.MappedPayloads.MappedErrors
-
Creates a new
MappedPayloads.MappedPayloadwith the given payload and the currentErrorsinstance. - withArguments(Object...) - Method in class de.odrotbohm.spring.web.model.I18nedMessage
- writeInternal(MessageSourceResolvable, HttpOutputMessage) - Method in class de.odrotbohm.spring.web.mvc.MessageSourceResolvableHttpMessageConverter
Y
- YaviValidator<T> - Class in de.odrotbohm.spring.web.validation
-
A delegate for a YAVI
Validatorthat can also be handed intoMappedPayloads.MappedPayload.validate(BiConsumer)right away to trigger validation - YaviValidator() - Constructor for class de.odrotbohm.spring.web.validation.YaviValidator
All Classes and Interfaces|All Packages|Serialized Form