Class DefaultProfileTransactionService

    • Constructor Detail

      • DefaultProfileTransactionService

        public DefaultProfileTransactionService()
    • Method Detail

      • sendOrder

        protected void sendOrder​(java.lang.String consentReference,
                                 Order order,
                                 java.lang.String eventType,
                                 java.lang.String debugEnabled)
      • shouldSendEvent

        protected boolean shouldSendEvent​(java.lang.String consentReference,
                                          java.lang.String baseSiteId)
      • sendUserRegistrationEvent

        public void sendUserRegistrationEvent​(UserModel userModel,
                                              java.lang.String consentReferenceId,
                                              java.lang.String sessionId,
                                              java.lang.String baseSiteId)
        Send user registration event to yprofile.
        Specified by:
        sendUserRegistrationEvent in interface ProfileTransactionService
        Parameters:
        userModel - the user model
        consentReferenceId - consent refrence
        sessionId - ec session id
        baseSiteId - storefront name like 'electronics'
      • sendUidChangedEvent

        public void sendUidChangedEvent​(ChangeUIDEvent event,
                                        java.lang.String consentReferenceId)
        Send changed UID event to yprofile.
        Specified by:
        sendUidChangedEvent in interface ProfileTransactionService
        Parameters:
        event - the changeUIDEvent. The populator knows how to extract the appropriate information
        consentReferenceId - consent refrence
      • sendAddressSavedEvent

        public void sendAddressSavedEvent​(UserModel userModel,
                                          java.lang.String baseSiteId,
                                          java.lang.String consentReferenceId)
        Sends address saved event to Profile.
        Specified by:
        sendAddressSavedEvent in interface ProfileTransactionService
        Parameters:
        userModel - the user model
        consentReferenceId - the consent reference
        baseSiteId - site id from the event
      • sendAddressDeletedEvent

        public void sendAddressDeletedEvent​(UserModel userModel,
                                            java.lang.String baseSiteId,
                                            java.lang.String consentReferenceId)
        Sends address deleted event to Profile.
        Specified by:
        sendAddressDeletedEvent in interface ProfileTransactionService
        Parameters:
        userModel - the user model
        consentReferenceId - the consent reference
        baseSiteId - site id from the event
      • sendPersonalDetailsChangedEvent

        public void sendPersonalDetailsChangedEvent​(UserModel userModel,
                                                    java.lang.String baseSiteId,
                                                    java.lang.String consentReferenceId)
        Sends personal details updated event to Profile.
        Specified by:
        sendPersonalDetailsChangedEvent in interface ProfileTransactionService
        Parameters:
        userModel - the user model
        consentReferenceId - the consent reference
        baseSiteId - site id from the event
      • sendLoginEvent

        public void sendLoginEvent​(UserModel userModel,
                                   java.lang.String consentReferenceId,
                                   java.lang.String sessionId,
                                   java.lang.String baseSiteId)
        Send user login event to yprofile.
        Specified by:
        sendLoginEvent in interface ProfileTransactionService
        Parameters:
        userModel - the user model
        consentReferenceId - consent refrence
        sessionId - ec session id
        baseSiteId - storefront name like 'electronics'
      • sendUserEvent

        protected void sendUserEvent​(UserModel userModel,
                                     java.lang.String consentReferenceId,
                                     java.lang.String sessionId,
                                     java.lang.String baseSiteId,
                                     java.lang.String eventType)
      • getDebugFlagValue

        protected static java.lang.String getDebugFlagValue​(UserModel userModel)
      • isValidConsentReference

        protected static boolean isValidConsentReference​(java.lang.String consentReferenceId)
      • logSuccess

        protected static void logSuccess​(java.util.Optional<com.hybris.charon.RawResponse> rawResponse,
                                         java.lang.Object obj,
                                         java.lang.String consentReferenceId)
      • logError

        protected static void logError​(java.lang.Throwable error,
                                       java.lang.Object obj)
      • getConsentReference

        protected java.lang.String getConsentReference​(OrderModel orderModel)
      • setRetrieveRestClientStrategy

        public void setRetrieveRestClientStrategy​(RetrieveRestClientStrategy retrieveRestClientStrategy)
      • setProfileConfigurationService

        public void setProfileConfigurationService​(ProfileConfigurationService profileConfigurationService)
      • setProfileOrderEventConverter

        public void setProfileOrderEventConverter​(Converter<OrderModel,​Order> profileOrderEventConverter)
      • setProfileConsignmentEventConverter

        public void setProfileConsignmentEventConverter​(Converter<ConsignmentModel,​Order> profileConsignmentEventConverter)
      • setProfileUserEventConverter

        public void setProfileUserEventConverter​(Converter<UserModel,​User> profileUserEventConverter)