Class OData2Processor
- java.lang.Object
-
- org.apache.olingo.odata2.api.processor.ODataSingleProcessor
-
- de.hybris.platform.odata2services.odata.processor.OData2Processor
-
- All Implemented Interfaces:
org.apache.olingo.odata2.api.processor.feature.CustomContentType,org.apache.olingo.odata2.api.processor.feature.ODataProcessorFeature,org.apache.olingo.odata2.api.processor.ODataProcessor,org.apache.olingo.odata2.api.processor.part.BatchProcessor,org.apache.olingo.odata2.api.processor.part.EntityComplexPropertyProcessor,org.apache.olingo.odata2.api.processor.part.EntityLinkProcessor,org.apache.olingo.odata2.api.processor.part.EntityLinksProcessor,org.apache.olingo.odata2.api.processor.part.EntityMediaProcessor,org.apache.olingo.odata2.api.processor.part.EntityProcessor,org.apache.olingo.odata2.api.processor.part.EntitySetProcessor,org.apache.olingo.odata2.api.processor.part.EntitySimplePropertyProcessor,org.apache.olingo.odata2.api.processor.part.EntitySimplePropertyValueProcessor,org.apache.olingo.odata2.api.processor.part.FunctionImportProcessor,org.apache.olingo.odata2.api.processor.part.FunctionImportValueProcessor,org.apache.olingo.odata2.api.processor.part.MetadataProcessor,org.apache.olingo.odata2.api.processor.part.ServiceDocumentProcessor
public class OData2Processor extends org.apache.olingo.odata2.api.processor.ODataSingleProcessorThe OData2Processor implements some of the operations defined in theODataSingleProcessor. It usesODataProcessorHandlerto handle a particular operation.
-
-
Constructor Summary
Constructors Constructor Description OData2Processor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.olingo.odata2.api.processor.ODataResponsecountEntitySet(org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo uriInfo, java.lang.String contentType)org.apache.olingo.odata2.api.processor.ODataResponsecreateEntity(org.apache.olingo.odata2.api.uri.info.PostUriInfo uriInfo, java.io.InputStream content, java.lang.String requestContentType, java.lang.String responseContentType)org.apache.olingo.odata2.api.processor.ODataResponsedeleteEntity(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo, java.lang.String contentType)org.apache.olingo.odata2.api.processor.ODataResponseexecuteBatch(org.apache.olingo.odata2.api.batch.BatchHandler handler, java.lang.String contentType, java.io.InputStream content)org.apache.olingo.odata2.api.batch.BatchResponsePartexecuteChangeSet(org.apache.olingo.odata2.api.batch.BatchHandler batchHandler, java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)protected BatchParamgetBatchParam(org.apache.olingo.odata2.api.batch.BatchHandler batchHandler, java.lang.String responseContentType, java.io.InputStream content)Gets aBatchParamfrom the given parametersprotected ODataProcessorHandler<BatchParam,org.apache.olingo.odata2.api.processor.ODataResponse>getBatchPersistenceHandler()protected ChangeSetParamgetChangeSetParam(org.apache.olingo.odata2.api.batch.BatchHandler batchHandler, java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)Gets aChangeSetParamfrom the given parametersprotected ODataProcessorHandler<ChangeSetParam,org.apache.olingo.odata2.api.batch.BatchResponsePart>getChangeSetPersistenceHandler()protected ODataProcessorHandler<DeleteParam,org.apache.olingo.odata2.api.processor.ODataResponse>getDeleteHandler()protected DeleteParamgetDeleteParam(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo)Gets aDeleteParamfrom the given parametersprotected ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse>getPatchPersistenceHandler()protected ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse>getPersistenceHandler()protected PersistenceParamgetPersistenceParam(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, java.io.InputStream content, java.lang.String requestContentType, java.lang.String responseContentType)Gets aPersistenceParamfrom the given parametersprotected ODataProcessorHandler<ReadParam,org.apache.olingo.odata2.api.processor.ODataResponse>getReadHandler()protected ReadParamgetReadParam(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, java.lang.String responseContentType)Gets aReadParamfrom the given parametersprotected org.apache.olingo.odata2.api.processor.ODataResponseread(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, java.lang.String contentType)Reads the data specified by the given parametersorg.apache.olingo.odata2.api.processor.ODataResponsereadEntity(org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo uriInfo, java.lang.String contentType)org.apache.olingo.odata2.api.processor.ODataResponsereadEntitySet(org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo uriInfo, java.lang.String contentType)voidsetAccessRightsService(AccessRightsService accessRightsService)voidsetBatchPersistenceHandler(ODataProcessorHandler<BatchParam,org.apache.olingo.odata2.api.processor.ODataResponse> batchPersistenceHandler)voidsetChangeSetPersistenceHandler(ODataProcessorHandler<ChangeSetParam,org.apache.olingo.odata2.api.batch.BatchResponsePart> changeSetPersistenceHandler)voidsetDeleteHandler(ODataProcessorHandler<DeleteParam,org.apache.olingo.odata2.api.processor.ODataResponse> deleteHandler)voidsetItemTypeDescriptorService(ItemTypeDescriptorService itemTypeDescriptorService)voidsetPatchPersistenceHandler(ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse> patchPersistenceHandler)voidsetPersistenceHandler(ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse> persistenceHandler)voidsetReadHandler(ODataProcessorHandler<ReadParam,org.apache.olingo.odata2.api.processor.ODataResponse> readHandler)voidsetServiceNameExtractor(ServiceNameExtractor serviceNameExtractor)org.apache.olingo.odata2.api.processor.ODataResponseupdateEntity(org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo uriInfo, java.io.InputStream content, java.lang.String requestContentType, boolean merge, java.lang.String contentType)-
Methods inherited from class org.apache.olingo.odata2.api.processor.ODataSingleProcessor
countEntityLinks, createEntityLink, deleteEntityLink, deleteEntityMedia, deleteEntitySimplePropertyValue, executeFunctionImport, executeFunctionImportValue, existsEntity, existsEntityLink, getContext, getCustomContentTypes, readEntityComplexProperty, readEntityLink, readEntityLinks, readEntityMedia, readEntitySimpleProperty, readEntitySimplePropertyValue, readMetadata, readServiceDocument, setContext, updateEntityComplexProperty, updateEntityLink, updateEntityMedia, updateEntitySimpleProperty, updateEntitySimplePropertyValue
-
-
-
-
Method Detail
-
createEntity
public org.apache.olingo.odata2.api.processor.ODataResponse createEntity(org.apache.olingo.odata2.api.uri.info.PostUriInfo uriInfo, java.io.InputStream content, java.lang.String requestContentType, java.lang.String responseContentType) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
createEntityin interfaceorg.apache.olingo.odata2.api.processor.part.EntitySetProcessor- Overrides:
createEntityin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
updateEntity
public org.apache.olingo.odata2.api.processor.ODataResponse updateEntity(org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo uriInfo, java.io.InputStream content, java.lang.String requestContentType, boolean merge, java.lang.String contentType) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
updateEntityin interfaceorg.apache.olingo.odata2.api.processor.part.EntityProcessor- Overrides:
updateEntityin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
executeBatch
public org.apache.olingo.odata2.api.processor.ODataResponse executeBatch(org.apache.olingo.odata2.api.batch.BatchHandler handler, java.lang.String contentType, java.io.InputStream content) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
executeBatchin interfaceorg.apache.olingo.odata2.api.processor.part.BatchProcessor- Overrides:
executeBatchin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
executeChangeSet
public org.apache.olingo.odata2.api.batch.BatchResponsePart executeChangeSet(org.apache.olingo.odata2.api.batch.BatchHandler batchHandler, java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
executeChangeSetin interfaceorg.apache.olingo.odata2.api.processor.part.BatchProcessor- Overrides:
executeChangeSetin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
deleteEntity
public org.apache.olingo.odata2.api.processor.ODataResponse deleteEntity(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo, java.lang.String contentType) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
deleteEntityin interfaceorg.apache.olingo.odata2.api.processor.part.EntityProcessor- Overrides:
deleteEntityin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
countEntitySet
public org.apache.olingo.odata2.api.processor.ODataResponse countEntitySet(org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo uriInfo, java.lang.String contentType) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
countEntitySetin interfaceorg.apache.olingo.odata2.api.processor.part.EntitySetProcessor- Overrides:
countEntitySetin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
readEntity
public org.apache.olingo.odata2.api.processor.ODataResponse readEntity(org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo uriInfo, java.lang.String contentType) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
readEntityin interfaceorg.apache.olingo.odata2.api.processor.part.EntityProcessor- Overrides:
readEntityin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
readEntitySet
public org.apache.olingo.odata2.api.processor.ODataResponse readEntitySet(org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo uriInfo, java.lang.String contentType) throws org.apache.olingo.odata2.api.exception.ODataException- Specified by:
readEntitySetin interfaceorg.apache.olingo.odata2.api.processor.part.EntitySetProcessor- Overrides:
readEntitySetin classorg.apache.olingo.odata2.api.processor.ODataSingleProcessor- Throws:
org.apache.olingo.odata2.api.exception.ODataException
-
read
protected org.apache.olingo.odata2.api.processor.ODataResponse read(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, java.lang.String contentType) throws org.apache.olingo.odata2.api.exception.ODataExceptionReads the data specified by the given parameters- Parameters:
uriInfo- The URI Info containing the specification of the read (e.g. filter, expand, URL)contentType- Response content type- Returns:
ODataResponsecontaining data that was read- Throws:
org.apache.olingo.odata2.api.exception.ODataException- is thrown when there's a failure in the read
-
getPersistenceParam
protected PersistenceParam getPersistenceParam(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, java.io.InputStream content, java.lang.String requestContentType, java.lang.String responseContentType)
Gets aPersistenceParamfrom the given parameters- Parameters:
uriInfo- URI info containing the information that's needed for the persistencecontent- The request payloadrequestContentType- Request payload content typeresponseContentType- Response payload content type- Returns:
- An instance of the parameter object
-
getBatchParam
protected BatchParam getBatchParam(org.apache.olingo.odata2.api.batch.BatchHandler batchHandler, java.lang.String responseContentType, java.io.InputStream content)
Gets aBatchParamfrom the given parameters- Parameters:
batchHandler- TheBatchHandlerthat handles the batch datacontent- The request payloadresponseContentType- Response payload content type- Returns:
- An instance of the parameter object
-
getChangeSetParam
protected ChangeSetParam getChangeSetParam(org.apache.olingo.odata2.api.batch.BatchHandler batchHandler, java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)
Gets aChangeSetParamfrom the given parameters- Parameters:
batchHandler- TheBatchHandlerthat handles the batch changeset datarequests- The list of changesets asODataRequests- Returns:
- An instance of the parameter object
-
getDeleteParam
protected DeleteParam getDeleteParam(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo)
Gets aDeleteParamfrom the given parameters- Parameters:
uriInfo- URI info containing the information that delete uses, such as the item's integration key- Returns:
- An instance of the parameter object
-
getReadParam
protected ReadParam getReadParam(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, java.lang.String responseContentType)
Gets aReadParamfrom the given parameters- Parameters:
uriInfo- URI info containing the information that read usesresponseContentType- Response content type- Returns:
- An instance of the parameter object
-
getPersistenceHandler
protected ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse> getPersistenceHandler()
-
setPersistenceHandler
public void setPersistenceHandler(ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse> persistenceHandler)
-
getBatchPersistenceHandler
protected ODataProcessorHandler<BatchParam,org.apache.olingo.odata2.api.processor.ODataResponse> getBatchPersistenceHandler()
-
setBatchPersistenceHandler
public void setBatchPersistenceHandler(ODataProcessorHandler<BatchParam,org.apache.olingo.odata2.api.processor.ODataResponse> batchPersistenceHandler)
-
getChangeSetPersistenceHandler
protected ODataProcessorHandler<ChangeSetParam,org.apache.olingo.odata2.api.batch.BatchResponsePart> getChangeSetPersistenceHandler()
-
setChangeSetPersistenceHandler
public void setChangeSetPersistenceHandler(ODataProcessorHandler<ChangeSetParam,org.apache.olingo.odata2.api.batch.BatchResponsePart> changeSetPersistenceHandler)
-
getPatchPersistenceHandler
protected ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse> getPatchPersistenceHandler()
-
setPatchPersistenceHandler
public void setPatchPersistenceHandler(ODataProcessorHandler<PersistenceParam,org.apache.olingo.odata2.api.processor.ODataResponse> patchPersistenceHandler)
-
getDeleteHandler
protected ODataProcessorHandler<DeleteParam,org.apache.olingo.odata2.api.processor.ODataResponse> getDeleteHandler()
-
setDeleteHandler
public void setDeleteHandler(ODataProcessorHandler<DeleteParam,org.apache.olingo.odata2.api.processor.ODataResponse> deleteHandler)
-
getReadHandler
protected ODataProcessorHandler<ReadParam,org.apache.olingo.odata2.api.processor.ODataResponse> getReadHandler()
-
setReadHandler
public void setReadHandler(ODataProcessorHandler<ReadParam,org.apache.olingo.odata2.api.processor.ODataResponse> readHandler)
-
setAccessRightsService
public void setAccessRightsService(AccessRightsService accessRightsService)
-
setServiceNameExtractor
public void setServiceNameExtractor(ServiceNameExtractor serviceNameExtractor)
-
setItemTypeDescriptorService
public void setItemTypeDescriptorService(ItemTypeDescriptorService itemTypeDescriptorService)
-
-