java.lang.Object
de.hybris.platform.odata2services.odata.processor.handler.persistence.PathPayloadKeyValidator
All Implemented Interfaces:
RequestValidator

public class PathPayloadKeyValidator extends Object implements 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 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: RequestValidator
      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 a RuntimeException, it's necessary to create a corresponding ErrorContextPopulator and to register it in CustomODataExceptionAwareErrorCallback to convert that exception to a response. However, if the exception thrown by the implementation extends ODataRuntimeApplicationException, then no error context populator is necessary, if the default conversion to a response based on the exception properties is good enough.
      Specified by:
      validate in interface RequestValidator
      Parameters:
      param - request parameters
      path - 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

      protected ServiceNameExtractor getServiceNameExtractor()
    • setServiceNameExtractor

      public void setServiceNameExtractor(ServiceNameExtractor serviceNameExtractor)
    • getItemTypeDescriptorService

      protected ItemTypeDescriptorService getItemTypeDescriptorService()
    • setItemTypeDescriptorService

      public void setItemTypeDescriptorService(ItemTypeDescriptorService itemTypeDescriptorService)
    • 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)