Class CustomerExportService

  • Direct Known Subclasses:
    SapCpiCustomerOutboundService

    public class CustomerExportService
    extends java.lang.Object
    Class to prepare the customer data and send the data to the Data Hub
    • Constructor Detail

      • CustomerExportService

        public CustomerExportService()
    • Method Detail

      • getDataHubOutboundService

        public DataHubOutboundService getDataHubOutboundService()
        return Data Hub Outbound Service
        Returns:
        dataHubOutboundService
      • setDataHubOutboundService

        public void setDataHubOutboundService​(DataHubOutboundService dataHubOutboundService)
        set Data Hub Outbound Service
        Parameters:
        dataHubOutboundService -
      • getBatchIdAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getBatchIdAttributes()
      • setBatchIdAttributes

        public void setBatchIdAttributes​(java.util.Map<java.lang.String,​java.lang.String> batchIdAttributes)
      • sendCustomerData

        public void sendCustomerData​(CustomerModel customerModel,
                                     java.lang.String baseStoreUid,
                                     java.lang.String sessionLanguage)
        map customer Model to the target map, set session language and base store name, and send data to the Data Hub
        Parameters:
        customerModel - Customer model
        baseStoreUid - Base store UID
        sessionLanguage - Language of session
      • sendCustomerData

        public void sendCustomerData​(CustomerModel customerModel,
                                     java.lang.String baseStoreUid,
                                     java.lang.String sessionLanguage,
                                     AddressModel addressModel)
        map customer Model and address Model to the target map, set session language and base store name, and send data to the Data Hub
        Parameters:
        customerModel - Customer model
        baseStoreUid - Base store UID
        sessionLanguage - Language of session
        addressModel - Address model
      • getTarget

        protected java.util.Map<java.lang.String,​java.lang.Object> getTarget()
        Returns:
        new target instance
      • prepareCustomerData

        protected void prepareCustomerData​(CustomerModel customerModel,
                                           java.lang.String baseStoreUid,
                                           java.lang.String sessionLanguage,
                                           java.util.Map<java.lang.String,​java.lang.Object> target)
      • prepareAddressData

        protected void prepareAddressData​(AddressModel addressModel,
                                          java.util.Map<java.lang.String,​java.lang.Object> target)
      • prepareBatchIdAttributes

        protected void prepareBatchIdAttributes​(CustomerModel customerModel,
                                                java.util.Map<java.lang.String,​java.lang.Object> target)
      • sendCustomerToDataHub

        protected void sendCustomerToDataHub​(java.util.Map<java.lang.String,​java.lang.Object> target)
      • getFeed

        public java.lang.String getFeed()
        return data hub feed
        Returns:
        feed
      • setFeed

        public void setFeed​(java.lang.String feed)
        set data hub feed (usually set via the local property file)
        Parameters:
        feed -
      • getCustomerNameStrategy

        public CustomerNameStrategy getCustomerNameStrategy()
        Returns:
        customerNameStrategy
      • setCustomerNameStrategy

        public void setCustomerNameStrategy​(CustomerNameStrategy customerNameStrategy)
        Parameters:
        customerNameStrategy -
      • setSapCoreSAPGlobalConfigurationService

        public void setSapCoreSAPGlobalConfigurationService​(SAPGlobalConfigurationServiceImpl sapCoreSAPGlobalConfigurationService)
      • isCustomerReplicationEnabled

        public boolean isCustomerReplicationEnabled()
      • isClassCustomerModel

        public boolean isClassCustomerModel​(java.lang.Object o)
        State checker to test whether passed object is a valid CustomerModel
        Parameters:
        o - Object passed to check
        Returns:
        Whether or not the tests object is a customer model