Class RequestSchemaValidator
java.lang.Object
de.captaingoldfish.scim.sdk.server.schemas.validation.AbstractSchemaValidator
de.captaingoldfish.scim.sdk.server.schemas.validation.RequestSchemaValidator
- Since:
- 24.04.2021
- Author:
- Pascal Knueppel
-
Field Summary
Fields inherited from class de.captaingoldfish.scim.sdk.server.schemas.validation.AbstractSchemaValidator
resourceNodeType -
Constructor Summary
ConstructorsConstructorDescriptionRequestSchemaValidator(ServiceProvider serviceProvider, Class resourceNodeType, HttpMethod httpMethod) RequestSchemaValidator(ServiceProvider serviceProvider, Class resourceNodeType, HttpMethod httpMethod, ValidationContext validationContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected intthe http status code to use in theDocumentValidationExceptionif the validation fails.protected ValidationContextthe current validation context for the request.protected Optional<com.fasterxml.jackson.databind.JsonNode>validateAttribute(SchemaAttribute schemaAttribute, com.fasterxml.jackson.databind.JsonNode attribute) validates the attribute in a request contextMethods inherited from class de.captaingoldfish.scim.sdk.server.schemas.validation.AbstractSchemaValidator
checkDocumentAndMetaSchemaRelationship, getAttributeExtractor, getServiceProvider, validateDocument, validateDocument
-
Constructor Details
-
RequestSchemaValidator
public RequestSchemaValidator(ServiceProvider serviceProvider, Class resourceNodeType, HttpMethod httpMethod) -
RequestSchemaValidator
public RequestSchemaValidator(ServiceProvider serviceProvider, Class resourceNodeType, HttpMethod httpMethod, ValidationContext validationContext)
-
-
Method Details
-
validateAttribute
protected Optional<com.fasterxml.jackson.databind.JsonNode> validateAttribute(SchemaAttribute schemaAttribute, com.fasterxml.jackson.databind.JsonNode attribute) validates the attribute in a request context- Specified by:
validateAttributein classAbstractSchemaValidator- Parameters:
schemaAttribute- the definition of the attribute that must be validatedattribute- the attribute to validate- Returns:
- the validated attribute
-
getHttpStatusCode
protected int getHttpStatusCode()the http status code to use in theDocumentValidationExceptionif the validation fails. Should be 400 (bad request) for requests and 500 (internal server error) for responses- Specified by:
getHttpStatusCodein classAbstractSchemaValidator
-
getValidationContext
the current validation context for the request. If any error occurs the execution must be aborted before theResourceHandlerimplementation is called
-