Class PathPayloadKeyValidator
java.lang.Object
de.hybris.platform.odata2services.odata.processor.handler.persistence.PathPayloadKeyValidator
- All Implemented Interfaces:
RequestValidator
Validates request payload to ensure that the key attributes provided in the payload body matches the integration key value in
the request URI. Payload body may not contain key attributes and this case the request is valid.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemTypeDescriptorServiceprotected IntegrationKeyValueGenerator<TypeDescriptor,org.apache.olingo.odata2.api.ep.entry.ODataEntry> protected ServiceNameExtractorvoidsetItemTypeDescriptorService(ItemTypeDescriptorService itemTypeDescriptorService) voidsetKeyValueGenerator(IntegrationKeyValueGenerator<TypeDescriptor, org.apache.olingo.odata2.api.ep.entry.ODataEntry> keyValueGenerator) voidsetServiceNameExtractor(ServiceNameExtractor serviceNameExtractor) voidvalidate(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.
-
Constructor Details
-
PathPayloadKeyValidator
public PathPayloadKeyValidator()
-
-
Method Details
-
validate
public void validate(PersistenceParam param, org.apache.olingo.odata2.api.ep.entry.ODataEntry path, org.apache.olingo.odata2.api.ep.entry.ODataEntry payload) Description copied from interface:RequestValidatorValidates 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.- Specified by:
validatein interfaceRequestValidator- 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
-
getServiceNameExtractor
-
setServiceNameExtractor
-
getItemTypeDescriptorService
-
setItemTypeDescriptorService
-
getKeyValueGenerator
protected IntegrationKeyValueGenerator<TypeDescriptor,org.apache.olingo.odata2.api.ep.entry.ODataEntry> getKeyValueGenerator() -
setKeyValueGenerator
public void setKeyValueGenerator(IntegrationKeyValueGenerator<TypeDescriptor, org.apache.olingo.odata2.api.ep.entry.ODataEntry> keyValueGenerator)
-