com.ibm.commerce.order.event

Class GuestUserOrderResetEventListener

  • java.lang.Object
    • com.ibm.commerce.event.EventComponentConfiguration
      • com.ibm.commerce.order.event.GuestUserOrderResetEventListener
  • All Implemented Interfaces:
    com.ibm.commerce.event.WCSEventListener, ComponentConfiguration, java.util.EventListener


    public class GuestUserOrderResetEventListener
    extends com.ibm.commerce.event.EventComponentConfiguration
    implements com.ibm.commerce.event.WCSEventListener
    This class is an event listener to listen for the guest user migration events. It will reset the pending orders belong to the previous guest user. It will set the ownership of the order to the new guest user and clear all the private information that belongs to the order.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void destroy()
      This method destroys the event listener by removing it from the WCSEventSource.
      void enable(boolean val)
      This method enables the event listener by registering the listener to listen for the GuestUserMigrationEvent.
      boolean isTransactionRequired()
      This method indicates that a transaction is always required.
      void processActivityEvent(com.ibm.commerce.event.WCSEvent event)
      This method processes the event by invoking the GuestUserOrderResetCmd to perform the following task: Set all the pending order of the previous guest user to the current guest user.
      • Methods inherited from class com.ibm.commerce.event.EventComponentConfiguration

        init
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GuestUserOrderResetEventListener

        public GuestUserOrderResetEventListener()
    • Method Detail

      • destroy

        public void destroy()
        This method destroys the event listener by removing it from the WCSEventSource.
        Specified by:
        destroy in interface ComponentConfiguration
        Specified by:
        destroy in class com.ibm.commerce.event.EventComponentConfiguration
        See Also:
        EventComponentConfiguration.destroy()
      • enable

        public void enable(boolean val)
                    throws java.lang.Exception
        This method enables the event listener by registering the listener to listen for the GuestUserMigrationEvent. If the listener is to be disabled, it will remove the listener from the WCSEventSource.
        Specified by:
        enable in interface ComponentConfiguration
        Specified by:
        enable in class com.ibm.commerce.event.EventComponentConfiguration
        Parameters:
        val - Whether the event listener is enabled or disabled.
        Throws:
        java.lang.Exception - This method will never thrown an exception.
        See Also:
        EventComponentConfiguration.enable(boolean)
      • isTransactionRequired

        public boolean isTransactionRequired()
        This method indicates that a transaction is always required.
        Specified by:
        isTransactionRequired in interface com.ibm.commerce.event.WCSEventListener
        Returns:
        Always true.
        See Also:
        WCSEventListener.isTransactionRequired()
      • processActivityEvent

        public void processActivityEvent(com.ibm.commerce.event.WCSEvent event)
                                  throws ECException
        This method processes the event by invoking the GuestUserOrderResetCmd to perform the following task: Set all the pending order of the previous guest user to the current guest user. Clear all sensitive data of the order.
        Specified by:
        processActivityEvent in interface com.ibm.commerce.event.WCSEventListener
        Parameters:
        event - The guest user migrate event.
        Throws:
        ECException
        See Also:
        WCSEventListener.processActivityEvent(com.ibm.commerce.event.WCSEvent)