Class DefaultODataProcessor

  • 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 DefaultODataProcessor
    extends org.apache.olingo.odata2.api.processor.ODataSingleProcessor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void beginTransaction()  
      protected void commitTransaction()  
      org.apache.olingo.odata2.api.processor.ODataResponse countEntitySet​(org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo uriInfo, java.lang.String contentType)  
      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)  
      protected java.lang.String createLogStatements​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry, int level)  
      org.apache.olingo.odata2.api.processor.ODataResponse deleteEntity​(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo, java.lang.String contentType)  
      org.apache.olingo.odata2.api.processor.ODataResponse executeBatch​(org.apache.olingo.odata2.api.batch.BatchHandler handler, java.lang.String contentType, java.io.InputStream content)  
      org.apache.olingo.odata2.api.batch.BatchResponsePart executeChangeSet​(org.apache.olingo.odata2.api.batch.BatchHandler handler, java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)  
      protected java.util.List<org.apache.olingo.odata2.api.processor.ODataResponse> executeChangeSetInTransaction​(org.apache.olingo.odata2.api.batch.BatchHandler handler, java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)  
      protected java.lang.Object executeInTransaction​(org.apache.olingo.odata2.api.batch.BatchHandler handler, java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)  
      protected EntityReaderRegistry getEntityReaderRegistry()  
      protected ItemLookupRequestFactory getItemLookupRequestFactory()  
      protected ModelService getModelService()  
      protected org.apache.olingo.odata2.api.processor.ODataResponse.ODataResponseBuilder getoDataResponseBuilder​(org.apache.olingo.odata2.api.processor.ODataResponse readerResponse)  
      protected ODataServicesConfiguration getoDataServicesConfiguration()  
      protected PersistenceService getPersistenceService()  
      StorageRequestFactory getStorageRequestFactory()  
      protected void logRequestEntity​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)  
      protected java.util.List<org.apache.olingo.odata2.api.batch.BatchRequestPart> parseBatchRequest​(java.lang.String contentType, java.io.InputStream content, org.apache.olingo.odata2.api.ep.EntityProviderBatchProperties batchProperties)  
      protected org.apache.olingo.odata2.api.batch.BatchResponsePart partFromResponses​(java.util.List<org.apache.olingo.odata2.api.processor.ODataResponse> responses)  
      org.apache.olingo.odata2.api.processor.ODataResponse readEntity​(org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo uriInfo, java.lang.String contentType)  
      org.apache.olingo.odata2.api.processor.ODataResponse readEntitySet​(org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo uriInfo, java.lang.String contentType)  
      protected org.apache.olingo.odata2.api.ep.entry.ODataEntry readEntry​(java.io.InputStream content, java.lang.String requestContentType, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet)  
      protected void rollbackTransaction()  
      void setEntityReaderRegistry​(EntityReaderRegistry entityReaderRegistry)  
      void setItemLookupRequestFactory​(ItemLookupRequestFactory itemLookupRequestFactory)  
      void setModelService​(ModelService modelService)  
      void setODataServicesConfiguration​(ODataServicesConfiguration oDataServicesConfiguration)  
      void setPersistenceService​(PersistenceService persistenceService)  
      void setStorageRequestFactory​(StorageRequestFactory storageRequestFactory)  
      protected org.apache.olingo.odata2.api.processor.ODataResponse writeBatchResponse​(java.util.List<org.apache.olingo.odata2.api.batch.BatchResponsePart> responseParts)  
      protected org.apache.olingo.odata2.api.processor.ODataResponse writeEntry​(java.lang.String responseContentType, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry persistedEntry, org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties writeProperties)  
      protected org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties writeProperties()  
      • 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, updateEntity, updateEntityComplexProperty, updateEntityLink, updateEntityMedia, updateEntitySimpleProperty, updateEntitySimplePropertyValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultODataProcessor

        public DefaultODataProcessor()
    • Method Detail

      • createLogStatements

        protected java.lang.String createLogStatements​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                                       org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry,
                                                       int level)
                                                throws org.apache.olingo.odata2.api.edm.EdmException
        Throws:
        org.apache.olingo.odata2.api.edm.EdmException
      • logRequestEntity

        protected void logRequestEntity​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                        org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
                                 throws org.apache.olingo.odata2.api.edm.EdmException
        Throws:
        org.apache.olingo.odata2.api.edm.EdmException
      • 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:
        createEntity in interface org.apache.olingo.odata2.api.processor.part.EntitySetProcessor
        Overrides:
        createEntity in class org.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:
        executeBatch in interface org.apache.olingo.odata2.api.processor.part.BatchProcessor
        Overrides:
        executeBatch in class org.apache.olingo.odata2.api.processor.ODataSingleProcessor
        Throws:
        org.apache.olingo.odata2.api.exception.ODataException
      • writeBatchResponse

        protected org.apache.olingo.odata2.api.processor.ODataResponse writeBatchResponse​(java.util.List<org.apache.olingo.odata2.api.batch.BatchResponsePart> responseParts)
                                                                                   throws org.apache.olingo.odata2.api.batch.BatchException
        Throws:
        org.apache.olingo.odata2.api.batch.BatchException
      • parseBatchRequest

        protected java.util.List<org.apache.olingo.odata2.api.batch.BatchRequestPart> parseBatchRequest​(java.lang.String contentType,
                                                                                                        java.io.InputStream content,
                                                                                                        org.apache.olingo.odata2.api.ep.EntityProviderBatchProperties batchProperties)
                                                                                                 throws org.apache.olingo.odata2.api.batch.BatchException
        Throws:
        org.apache.olingo.odata2.api.batch.BatchException
      • executeChangeSet

        public org.apache.olingo.odata2.api.batch.BatchResponsePart executeChangeSet​(org.apache.olingo.odata2.api.batch.BatchHandler handler,
                                                                                     java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)
        Specified by:
        executeChangeSet in interface org.apache.olingo.odata2.api.processor.part.BatchProcessor
        Overrides:
        executeChangeSet in class org.apache.olingo.odata2.api.processor.ODataSingleProcessor
      • deleteEntity

        public org.apache.olingo.odata2.api.processor.ODataResponse deleteEntity​(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo,
                                                                                 java.lang.String contentType)
        Specified by:
        deleteEntity in interface org.apache.olingo.odata2.api.processor.part.EntityProcessor
        Overrides:
        deleteEntity in class org.apache.olingo.odata2.api.processor.ODataSingleProcessor
      • executeInTransaction

        protected java.lang.Object executeInTransaction​(org.apache.olingo.odata2.api.batch.BatchHandler handler,
                                                        java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)
      • commitTransaction

        protected void commitTransaction()
      • rollbackTransaction

        protected void rollbackTransaction()
      • beginTransaction

        protected void beginTransaction()
      • partFromResponses

        protected org.apache.olingo.odata2.api.batch.BatchResponsePart partFromResponses​(java.util.List<org.apache.olingo.odata2.api.processor.ODataResponse> responses)
      • 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:
        countEntitySet in interface org.apache.olingo.odata2.api.processor.part.EntitySetProcessor
        Overrides:
        countEntitySet in class org.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:
        readEntity in interface org.apache.olingo.odata2.api.processor.part.EntityProcessor
        Overrides:
        readEntity in class org.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:
        readEntitySet in interface org.apache.olingo.odata2.api.processor.part.EntitySetProcessor
        Overrides:
        readEntitySet in class org.apache.olingo.odata2.api.processor.ODataSingleProcessor
        Throws:
        org.apache.olingo.odata2.api.exception.ODataException
      • readEntry

        protected org.apache.olingo.odata2.api.ep.entry.ODataEntry readEntry​(java.io.InputStream content,
                                                                             java.lang.String requestContentType,
                                                                             org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet)
                                                                      throws org.apache.olingo.odata2.api.ep.EntityProviderException
        Throws:
        org.apache.olingo.odata2.api.ep.EntityProviderException
      • writeEntry

        protected org.apache.olingo.odata2.api.processor.ODataResponse writeEntry​(java.lang.String responseContentType,
                                                                                  org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet,
                                                                                  org.apache.olingo.odata2.api.ep.entry.ODataEntry persistedEntry,
                                                                                  org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties writeProperties)
                                                                           throws org.apache.olingo.odata2.api.ep.EntityProviderException
        Throws:
        org.apache.olingo.odata2.api.ep.EntityProviderException
      • writeProperties

        protected org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties writeProperties()
                                                                                         throws org.apache.olingo.odata2.api.exception.ODataException
        Throws:
        org.apache.olingo.odata2.api.exception.ODataException
      • getoDataResponseBuilder

        protected org.apache.olingo.odata2.api.processor.ODataResponse.ODataResponseBuilder getoDataResponseBuilder​(org.apache.olingo.odata2.api.processor.ODataResponse readerResponse)
      • executeChangeSetInTransaction

        protected java.util.List<org.apache.olingo.odata2.api.processor.ODataResponse> executeChangeSetInTransaction​(org.apache.olingo.odata2.api.batch.BatchHandler handler,
                                                                                                                     java.util.List<org.apache.olingo.odata2.api.processor.ODataRequest> requests)
                                                                                                              throws org.apache.olingo.odata2.api.exception.ODataException
        Throws:
        org.apache.olingo.odata2.api.exception.ODataException
      • setPersistenceService

        public void setPersistenceService​(PersistenceService persistenceService)
      • setODataServicesConfiguration

        public void setODataServicesConfiguration​(ODataServicesConfiguration oDataServicesConfiguration)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • setEntityReaderRegistry

        public void setEntityReaderRegistry​(EntityReaderRegistry entityReaderRegistry)
      • setItemLookupRequestFactory

        public void setItemLookupRequestFactory​(ItemLookupRequestFactory itemLookupRequestFactory)
      • setStorageRequestFactory

        public void setStorageRequestFactory​(StorageRequestFactory storageRequestFactory)