Class DefaultODataEntryToIntegrationItemConverter

    • Constructor Detail

      • DefaultODataEntryToIntegrationItemConverter

        public DefaultODataEntryToIntegrationItemConverter()
    • Method Detail

      • convert

        public IntegrationItem convert​(@NotNull
                                       @NotNull org.apache.olingo.odata2.api.processor.ODataContext context,
                                       @NotNull
                                       @NotNull org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet,
                                       @NotNull
                                       @NotNull org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
                                throws org.apache.olingo.odata2.api.edm.EdmException
        Description copied from interface: ODataEntryToIntegrationItemConverter
        Performs the conversion when there is no TypeDescriptor available. In this case the type descriptor will be derived from the other parameters.
        Specified by:
        convert in interface ODataEntryToIntegrationItemConverter
        Parameters:
        context - context of the request containing the entry
        entitySet - metadata about the entry received
        entry - the entry received to be converted to the IntegrationItem
        Returns:
        an integration item converted from the entry
        Throws:
        org.apache.olingo.odata2.api.edm.EdmException - if there is a problem with the metadata provided by the entitySet
      • convert

        public IntegrationItem convert​(@NotNull
                                       @NotNull org.apache.olingo.odata2.api.processor.ODataContext context,
                                       @NotNull
                                       @NotNull TypeDescriptor typeDesc,
                                       @NotNull
                                       @NotNull org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet,
                                       @NotNull
                                       @NotNull org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
        Description copied from interface: ODataEntryToIntegrationItemConverter
        Performs the conversion when TypeDescriptor for the integration item to create is available.
        Specified by:
        convert in interface ODataEntryToIntegrationItemConverter
        Parameters:
        context - context of the request containing the entry
        typeDesc - type descriptor for the integration item to create
        entitySet - metadata about the entry received
        entry - the entry received to be converted to the IntegrationItem
        Returns:
        an integration item converted from the entry
      • convert

        public IntegrationItem convert​(@NotNull
                                       @NotNull org.apache.olingo.odata2.api.processor.ODataContext context,
                                       @NotNull
                                       @NotNull TypeDescriptor typeDesc,
                                       @NotNull
                                       @NotNull org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
        Description copied from interface: ODataEntryToIntegrationItemConverter
        Performs the conversion when TypeDescriptor for the integration item to create is available.
        Specified by:
        convert in interface ODataEntryToIntegrationItemConverter
        Parameters:
        context - context of the request containing the entry
        typeDesc - type descriptor for the integration item to create
        entry - the entry received to be converted to the IntegrationItem
        Returns:
        an integration item converted from the entry
      • convert

        public IntegrationItem convert​(org.apache.olingo.odata2.api.processor.ODataContext context,
                                       TypeDescriptor typeDesc,
                                       org.apache.olingo.odata2.api.ep.entry.ODataEntry entry,
                                       IntegrationItem parentItem)
        Description copied from interface: ODataEntryToIntegrationItemConverter
        Performs conversion of an OData entry nested in the payload of an outer entry.
        Specified by:
        convert in interface ODataEntryToIntegrationItemConverter
        Parameters:
        context - context of the request containing the entry
        typeDesc - type descriptor for the integration item to create, that matches the entry being converted
        entry - the entry received to be converted to the IntegrationItem
        parentItem - integration item that corresponds to the OData entry containing the entry being converted.
        Returns:
        an integration item converted from the entry
      • createIntegrationItem

        protected DefaultIntegrationItem createIntegrationItem​(TypeDescriptor typeDesc,
                                                               IntegrationItem contextItem)
        Instantiates an item that will be populated and used as result of convert(...) methods call.
        Parameters:
        typeDesc - non-null type descriptor describing type of the integration item to create.
        contextItem - a container (outer) item that references the item being created through one of its attributes. null, if this item is the top level item in the request payload.
        Returns:
        new instance of the integration item that corresponds to the ODataEntry passed into convert(...) methods
      • setModelEntityService

        @Deprecated(since="1905.09-CEP",
                    forRemoval=true)
        public void setModelEntityService​(ModelEntityService service)
        Deprecated, for removal: This API element is subject to removal in a future version.
        not used anymore and does not have to be injected.
        Injects ModelEntityService to use
        Parameters:
        service - a service implementation
      • getModelEntityService

        @Deprecated(since="1905.09-CEP",
                    forRemoval=true)
        protected ModelEntityService getModelEntityService()
        Deprecated, for removal: This API element is subject to removal in a future version.
        this injected service was used only for calculating integration key and now it's not used. Instead this implementation uses IntegrationKeyValueGenerator now
      • setItemTypeDescriptorService

        public void setItemTypeDescriptorService​(ItemTypeDescriptorService service)
        Injects implementation of the ItemTypeDescriptorService to be used for the type descriptor lookup. This service is needed by convert(ODataContext, EdmEntitySet, ODataEntry) method and therefore must be injected, if this method is called by the application.
        Parameters:
        service - a service to use.
      • getLocalizationService

        @Deprecated(since="1905.2004-CEP",
                    forRemoval=true)
        protected IntegrationLocalizationService getLocalizationService()
        Deprecated, for removal: This API element is subject to removal in a future version.
        not used anymore.
      • setLocalizationService

        @Deprecated(since="1905.2004-CEP",
                    forRemoval=true)
        public void setLocalizationService​(IntegrationLocalizationService service)
        Deprecated, for removal: This API element is subject to removal in a future version.
        not used anymore.
        Parameters:
        service - implementation to use.
      • setIntegrationKeyValueGenerator

        @Deprecated(since="1905.2002-CEP",
                    forRemoval=true)
        public void setIntegrationKeyValueGenerator​(IntegrationKeyValueGenerator<org.apache.olingo.odata2.api.edm.EdmEntitySet,​org.apache.olingo.odata2.api.ep.entry.ODataEntry> generator)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Parameters:
        generator - implementation to use.