Class ValidationUtil
- java.lang.Object
-
- org.swisspush.gateleen.validation.ValidationUtil
-
public final class ValidationUtil extends Object
Utility class providing functions for working withValidationResourceandSchemaLocation- Author:
- https://github.com/mcweba [Marc-Andre Weber]
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<SchemaLocation>matchingSchemaLocation(ValidationResource validationResource, io.vertx.core.http.HttpServerRequest request, org.slf4j.Logger log)Get aSchemaLocation(when present) of the matchingValidationResourcefor providedHttpServerRequeststatic Map<String,String>matchingValidationResourceEntry(ValidationResource validationResource, io.vertx.core.http.HttpServerRequest request, org.slf4j.Logger log)Get values of matchingValidationResourcefor providedHttpServerRequest
-
-
-
Method Detail
-
matchingValidationResourceEntry
public static Map<String,String> matchingValidationResourceEntry(ValidationResource validationResource, io.vertx.core.http.HttpServerRequest request, org.slf4j.Logger log)
Get values of matchingValidationResourcefor providedHttpServerRequest- Parameters:
validationResource- theValidationResourceholding the configuration valuesrequest- theHttpServerRequestto lookuplog- theLogger- Returns:
- a
Mapholding the corresponding configuration values ornull
-
matchingSchemaLocation
public static Optional<SchemaLocation> matchingSchemaLocation(ValidationResource validationResource, io.vertx.core.http.HttpServerRequest request, org.slf4j.Logger log)
Get aSchemaLocation(when present) of the matchingValidationResourcefor providedHttpServerRequest- Parameters:
validationResource- theValidationResourceholding the configuration valuesrequest- theHttpServerRequestto lookuplog- theLogger- Returns:
- the
SchemaLocationif present in the configuration values. Otherwise returnsOptional.empty()
-
-