public class PaymentEventListenerImpl
extends com.ibm.commerce.event.impl.AbstractECEventListener
ExtendedDataElement
and gets the original
payment actions related data, then executes the corresponding payment
actions.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright field.
|
Constructor and Description |
---|
PaymentEventListenerImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getECEventContainer()
This method gets the eventContainer class, which acts as the event
container of payment rules.
|
java.util.Set |
getEvents()
This method gets the events, which contains all kinds of events could be
processed by this listener class.
|
java.util.Locale |
getLocale()
This method gets the current locale.
|
java.lang.String |
getOrderCannel()
This method gets the current order channel.
|
java.lang.String |
getPaymentGroupId()
This method gets the current payment group id.
|
java.lang.Integer |
getStoreId()
This method gets the current store id.
|
void |
processEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe)
This method processes the payment rules event in
CommonBaseEvent , when the payment rules event is listened
from event bus, this method is called. |
void |
setCommandContext(CommandContext context)
This method sets the command context.
|
void |
setLocale(java.util.Locale localLocale)
This method sets the current locale.
|
void |
setOrderChannel(java.lang.String string)
This method sets the current order channel.
|
void |
setPaymentGroupId(java.lang.String string)
This method sets the current payment group id.
|
void |
setStoreId(java.lang.Integer integer)
This method sets the current store id.
|
public static final java.lang.String COPYRIGHT
public void processEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent cbe) throws ECException
CommonBaseEvent
, when the payment rules event is listened
from event bus, this method is called.
1. If the event name equals "PaymentRule", which means this event is a
payment rule event and will be processed by this method. 2. It calls
corresponding method according to the name of the event data. For
example, if the name of event data equals to 'PrimePaymentEventData',then
the payment actions in the event data for prime payment will be executed.
Here it first decomposes the event to parse the
ExtendedDataElement
and get the original attributes needed
by corresponding payment business event. 3. According to payment actions
in the event data, it executes corresponding payment actions.
processEvent
in class com.ibm.commerce.event.impl.AbstractECEventListener
cbe
- The event which will be processed and listened from event busECException
public java.lang.Class getECEventContainer()
getECEventContainer
in class com.ibm.commerce.event.impl.AbstractECEventListener
public java.util.Set getEvents()
getEvents
in class com.ibm.commerce.event.impl.AbstractECEventListener
public void setCommandContext(CommandContext context)
context
- The CommandContext
public java.lang.String getPaymentGroupId()
public java.util.Locale getLocale()
public void setLocale(java.util.Locale localLocale)
localLocale
- The current localepublic void setOrderChannel(java.lang.String string)
string
- The current order channelpublic java.lang.String getOrderCannel()
public void setPaymentGroupId(java.lang.String string)
string
- The current payment group id.public java.lang.Integer getStoreId()
public void setStoreId(java.lang.Integer integer)
integer
- The current store id.