public enum ValidatorFactoryHolder extends java.lang.Enum<ValidatorFactoryHolder> implements ValidatorFactory
Repository of validation functions based on OpenAPI Spec
Enum Constant and Description |
---|
INSTANCE
Singleton
|
Modifier and Type | Method and Description |
---|---|
java.util.function.UnaryOperator<io.vertx.core.json.JsonObject> |
getPayloadCleaner(java.lang.String eventBusId)
returns a function to clean request payloads from elements that should not not be in the request incoming in the first place.
|
java.util.function.Predicate<io.vertx.core.json.JsonObject> |
getValidatorJson(java.lang.String eventBusId,
io.reactivex.Observer<?> observerForEmit)
Creates a json validator based on the provided eventBusId
|
java.util.function.Predicate<io.vertx.core.json.JsonObject> |
getValidatorJsonSkipIfNotFound(java.lang.String eventBusId,
io.reactivex.Observer<?> observerForEmit)
Creates a json validator based on the provided eventBusId
|
static ValidatorFactoryHolder |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ValidatorFactoryHolder[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getValidatorBuffer
public static final ValidatorFactoryHolder INSTANCE
public static ValidatorFactoryHolder[] values()
for (ValidatorFactoryHolder c : ValidatorFactoryHolder.values()) System.out.println(c);
public static ValidatorFactoryHolder valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.util.function.UnaryOperator<io.vertx.core.json.JsonObject> getPayloadCleaner(java.lang.String eventBusId)
ValidatorFactory
returns a function to clean request payloads from elements that should not not be in the request incoming in the first place. This partially duplicates what the vertx EventBus API does, with our twists, so other sources like eventbus Redis, Kafka etc. can participate
getPayloadCleaner
in interface ValidatorFactory
public java.util.function.Predicate<io.vertx.core.json.JsonObject> getValidatorJson(java.lang.String eventBusId, io.reactivex.Observer<?> observerForEmit)
ValidatorFactory
Creates a json validator based on the provided eventBusId
getValidatorJson
in interface ValidatorFactory
eventBusId
- eventBusId to validateobserverForEmit
- public java.util.function.Predicate<io.vertx.core.json.JsonObject> getValidatorJsonSkipIfNotFound(java.lang.String eventBusId, io.reactivex.Observer<?> observerForEmit)
ValidatorFactory
Creates a json validator based on the provided eventBusId
getValidatorJsonSkipIfNotFound
in interface ValidatorFactory
eventBusId
- eventBusId to validateobserverForEmit
-