Interface RequestValidator
- All Known Implementing Classes:
PathPayloadKeyValidator
public interface RequestValidator
A validator that can be used to check the request parameters/payload before processing it.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(PersistenceParam param, org.apache.olingo.odata2.api.ep.entry.ODataEntry path, org.apache.olingo.odata2.api.ep.entry.ODataEntry payload) Validates the request and throws some exception, if the request does not satisfy the condition imposed by this validator implementations.
-
Method Details
-
validate
void validate(PersistenceParam param, org.apache.olingo.odata2.api.ep.entry.ODataEntry path, org.apache.olingo.odata2.api.ep.entry.ODataEntry payload) Validates the request and throws some exception, if the request does not satisfy the condition imposed by this validator implementations. Remember, if your implementation throws an exception that is just aRuntimeException, it's necessary to create a correspondingErrorContextPopulatorand to register it inCustomODataExceptionAwareErrorCallbackto convert that exception to a response. However, if the exception thrown by the implementation extendsODataRuntimeApplicationException, then no error context populator is necessary, if the default conversion to a response based on the exception properties is good enough.- Parameters:
param- request parameterspath- OData entry containing only integration key attributes and representing the integration key specified in the request URL.payload- OData entry representing the request payload
-