Class PatchPersistenceHandler
java.lang.Object
de.hybris.platform.odata2services.odata.processor.handler.persistence.PersistenceHandler
de.hybris.platform.odata2services.odata.processor.handler.persistence.PatchPersistenceHandler
- All Implemented Interfaces:
ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse>
Implementation of
PersistenceHandler that processes OData PATCH requests.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.olingo.odata2.api.processor.ODataResponse.ODataResponseBuilderbuildResponse(PersistenceParam param, PersistenceContext ctx, org.apache.olingo.odata2.api.ep.entry.ODataEntry persistedEntry) Creates anODataResponsefor the requestprotected org.apache.olingo.odata2.api.ep.entry.ODataEntryConverts the request payload to anODataEntryprotected IntegrationKeyToODataEntryGeneratorprotected RequestValidatorvoidsetIntegrationKeyToODataEntryGenerator(IntegrationKeyToODataEntryGenerator integrationKeyToODataEntryGenerator) voidsetRequestValidator(RequestValidator validator) Injects implementation of the entry validator to use.Methods inherited from class de.hybris.platform.odata2services.odata.processor.handler.persistence.PersistenceHandler
getODataResponseBuilder, getPersistenceService, getStorageRequestFactory, handle, persist, setPersistenceService, setStorageRequestFactory
-
Constructor Details
-
PatchPersistenceHandler
public PatchPersistenceHandler()
-
-
Method Details
-
convertToODataEntry
protected org.apache.olingo.odata2.api.ep.entry.ODataEntry convertToODataEntry(PersistenceParam param) throws org.apache.olingo.odata2.api.edm.EdmException Description copied from class:PersistenceHandlerConverts the request payload to anODataEntry- Overrides:
convertToODataEntryin classPersistenceHandler- Parameters:
param- Parameters from the request- Returns:
ODataEntryrepresenting the request payload- Throws:
org.apache.olingo.odata2.api.edm.EdmException- is thrown when there's a failure in the conversion
-
buildResponse
protected org.apache.olingo.odata2.api.processor.ODataResponse.ODataResponseBuilder buildResponse(PersistenceParam param, PersistenceContext ctx, org.apache.olingo.odata2.api.ep.entry.ODataEntry persistedEntry) throws org.apache.olingo.odata2.api.exception.ODataException Description copied from class:PersistenceHandlerCreates anODataResponsefor the request- Overrides:
buildResponsein classPersistenceHandler- Parameters:
param- Parameters from the requestctx- Storage request contains the information on how to create the responsepersistedEntry- The persistedODataEntry- Returns:
- The
ODataResponse - Throws:
org.apache.olingo.odata2.api.exception.ODataException- is thrown if a failure occurs creating the response
-
getIntegrationKeyToODataEntryGenerator
-
setIntegrationKeyToODataEntryGenerator
public void setIntegrationKeyToODataEntryGenerator(IntegrationKeyToODataEntryGenerator integrationKeyToODataEntryGenerator) -
getRequestValidator
-
setRequestValidator
Injects implementation of the entry validator to use.- Parameters:
validator- a validator to use for validating the payload and/or the integration key. Ifnull, no validation will be performed.
-