Uses of Class
de.odrotbohm.spring.web.model.MappedPayloads.MappedPayload
Packages that use MappedPayloads.MappedPayload
-
Uses of MappedPayloads.MappedPayload in de.odrotbohm.spring.web.model
Methods in de.odrotbohm.spring.web.model that return MappedPayloads.MappedPayloadModifier and TypeMethodDescription<S> MappedPayloads.MappedPayload<S><S> MappedPayloads.MappedPayload<S>MappedPayloads.MappedPayload.flatMapIfValid(Function<? super T, Optional<S>> mapper) <S> MappedPayloads.MappedPayload<S>MappedPayloads.MappedPayload.map(BiFunction<? super T, org.springframework.validation.Errors, S> mapper) <S> MappedPayloads.MappedPayload<S>Applies the givenFunction, even if errors have been accumulated.<S> MappedPayloads.MappedPayload<S>MappedPayloads.MappedPayload.mapIfValid(BiFunction<? super T, org.springframework.validation.Errors, S> mapper) <S> MappedPayloads.MappedPayload<S>MappedPayloads.MappedPayload.mapIfValid(Function<? super T, S> mapper) Applies the givenFunctionif no errors have been accumulated or we're on a path to aHttpStatus.NOT_FOUNDyet.MappedPayloads.MappedPayload.notFoundIf(boolean guard) Switches theMappedPayloads.MappedPayloadto unconditionally produce anHttpEntitywith status codeHttpStatus.NOT_FOUND.MappedPayloads.MappedPayload.notFoundIf(Predicate<? super T> predicate) Turns theMappedPayloads.MappedPayloadto unconditionally produce anHttpEntitywith status codeHttpStatus.NOT_FOUNDif the given predicate on the payload matches.static <T> MappedPayloads.MappedPayload<T>Creates a newMappedPayloads.MappedPayloadof the given source andErrors.static <T> MappedPayloads.MappedPayload<T>MappedPayloads.of(T payload, org.springframework.validation.Errors errors) Creates a newMappedPayloads.MappedPayloadfor the given source instanceMappedPayloads.MappedPayload.onAbsence(Supplier<org.springframework.http.ResponseEntity<?>> callback) Registers aFunctionto create anResponseEntityin case the pipeline yields the absence of a payload.MappedPayloads.MappedPayload.onAbsenceReject(String field, String errorCode) Registers the given field to be rejected on payload absence.MappedPayloads.MappedPayload.onErrors(Function<org.springframework.validation.Errors, org.springframework.http.ResponseEntity<?>> callback) MappedPayloads.MappedPayload.onErrors(Supplier<org.springframework.http.ResponseEntity<?>> callback) MappedPayloads.MappedPayload.peek(BiConsumer<? super T, org.springframework.validation.Errors> consumer) MappedPayloads.MappedPayload.peekIfValid(BiConsumer<? super T, org.springframework.validation.Errors> consumer) Peeks at the given payload andErrorsif no errors have been accumulated or we're on a path to aHttpStatus.NOT_FOUNDyet.MappedPayloads.MappedPayload.peekIfValid(Consumer<? super T> consumer) Peeks at the payload if present and no errors have been accumulated or we're on a path to aHttpStatus.NOT_FOUNDyet.MappedPayloads.MappedPayload.rejectField(boolean condition, String field, String errorCode) MappedPayloads.MappedPayload.rejectField(boolean condition, String field, String errorCode, Function<org.springframework.validation.Errors, org.springframework.http.ResponseEntity<?>> errorHandler) Rejects the field with the given name with the given error code if the given condition is true.MappedPayloads.MappedPayload.rejectField(String field, String errorCode) MappedPayloads.MappedPayload.rejectField(String field, String errorCode, String defaultMessage) MappedPayloads.MappedPayload.rejectField(Predicate<T> condition, String field, String errorCode) Rejects the field with the given name with the given error code if the given condition predicate returns true.MappedPayloads.MappedPayload.validate(BiConsumer<? super T, org.springframework.validation.Errors> validator) Syntactic sugar to invoke validations in a readable way.<T> MappedPayloads.MappedPayload<T>MappedPayloads.MappedErrors.with(T payload) Creates a newMappedPayloads.MappedPayloadwith the given payload and the currentErrorsinstance.