Class JsonSchemaAfterWriteChecker
- java.lang.Object
-
- org.restheart.mongodb.interceptors.JsonSchemaBeforeWriteChecker
-
- org.restheart.mongodb.interceptors.JsonSchemaAfterWriteChecker
-
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,MongoResponse>,Interceptor<MongoRequest,MongoResponse>,MongoInterceptor,Plugin
public class JsonSchemaAfterWriteChecker extends JsonSchemaBeforeWriteChecker
Checks documents according to the specified JSON schema This intercetor is able to check PATCH requests (excluding bulk PATCH). Other requests are checked by jsonSchemaBeforeWrite It checks the request content against the JSON schema specified by the 'jsonSchema' collection metadata:
{ "jsonSchema": { "schemaId": <schemaId> "schemaStoreDb": <schemaStoreDb> } }
schemaStoreDb is optional, default value is same db- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Field Summary
-
Fields inherited from class org.restheart.mongodb.interceptors.JsonSchemaBeforeWriteChecker
SCHEMA_ID_PROPERTY, SCHEMA_STORE_DB_PROPERTY, SKIP_NOT_SUPPORTED_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description JsonSchemaAfterWriteChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(MongoRequest request, MongoResponse response)booleanresolve(MongoRequest request, MongoResponse response)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
-
-
-
Method Detail
-
handle
public void handle(MongoRequest request, MongoResponse response) throws Exception
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse>- Overrides:
handlein classJsonSchemaBeforeWriteChecker- Throws:
Exception
-
resolve
public boolean resolve(MongoRequest request, MongoResponse response)
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse>- Overrides:
resolvein classJsonSchemaBeforeWriteChecker
-
-