Class RequestResourceValidator
java.lang.Object
de.captaingoldfish.scim.sdk.server.schemas.validation.AbstractResourceValidator
de.captaingoldfish.scim.sdk.server.schemas.validation.RequestResourceValidator
validates a request document against the schema of the current
ResourceType- Since:
- 24.02.2021
- Author:
- Pascal Knueppel
-
Nested Class Summary
Nested classes/interfaces inherited from class de.captaingoldfish.scim.sdk.server.schemas.validation.AbstractResourceValidator
AbstractResourceValidator.ValidatedExtension -
Constructor Summary
ConstructorsConstructorDescriptionRequestResourceValidator(ServiceProvider serviceProvider, ResourceType resourceType, HttpMethod httpMethod) -
Method Summary
Modifier and TypeMethodDescriptionprotected intthe http status code to use in theDocumentValidationExceptionif the validation fails.validateDocument(com.fasterxml.jackson.databind.JsonNode resource) assures that the meta-attribute that is sent by the client is added into the validated document.Methods inherited from class de.captaingoldfish.scim.sdk.server.schemas.validation.AbstractResourceValidator
checkForMissingRequiredExtensions, getResourceType, getSchemaValidator, validateExtensions
-
Constructor Details
-
RequestResourceValidator
public RequestResourceValidator(ServiceProvider serviceProvider, ResourceType resourceType, HttpMethod httpMethod)
-
-
Method Details
-
getValidationContext
- Returns:
- the validation context on the current schema validation
-
validateDocument
assures that the meta-attribute that is sent by the client is added into the validated document. This meta information might be important to theResourceHandlerimplementation- Overrides:
validateDocumentin classAbstractResourceValidator- Parameters:
resource- the document that should be validated- Returns:
- the validated document with the original meta 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 classAbstractResourceValidator
-