public class DefaultGenericPromotionCodeManager extends java.lang.Object implements GenericPromotionCodeManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
Constructor and Description |
---|
DefaultGenericPromotionCodeManager()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void | addCodeForOrder(java.lang.String code, OrderKey okey)
Add a promotion code to an order
|
void | addCodeForOrder(java.lang.String code, OrderKey okey, java.util.Date date)
Add a promotion code to an order
|
void | fromXML(org.w3c.dom.Node node)
Transforms the XML node into its corresponding real Object.
|
static DefaultGenericPromotionCodeManager | getInstance()
Singleton get instance method
|
GenericPromotionCodeResolver | getPromotionCodeResolver()
Returns the promotion code resolver used by this promotion code manager.
|
java.lang.String[] | listCodeForOrder(OrderKey okey)
List all the codes that are used in an order
|
void | removeAllCodesForOrder(OrderKey okey)
Removes all promotion codes entered for an order
|
void | removeCodeForOrder(java.lang.String code, OrderKey okey)
Removes a promotion code entered for an order
|
void | setPromotionCodeResolver(GenericPromotionCodeResolver resolver)
This method is used to set the PromotionCodeResolver object.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
PromotionErrorReport | validatePromotionCode(java.lang.String code, CustomerKey ukey, StoreKey storeKey)
Validates a promotion code.
|
PromotionErrorReport | validatePromotionCode(java.lang.String code, CustomerKey ukey, StoreKey storeKey, java.util.Date date)
Validates a promotion code.
|
public static final java.lang.String COPYRIGHT
public DefaultGenericPromotionCodeManager()
public static DefaultGenericPromotionCodeManager getInstance()
public void addCodeForOrder(java.lang.String code, OrderKey okey) throws PromotionApplicationException
public void addCodeForOrder(java.lang.String code, OrderKey okey, java.util.Date date) throws PromotionApplicationException
public java.lang.String[] listCodeForOrder(OrderKey okey)
public void removeCodeForOrder(java.lang.String code, OrderKey okey) throws PromotionApplicationException
public void removeAllCodesForOrder(OrderKey okey) throws PromotionApplicationException
public PromotionErrorReport validatePromotionCode(java.lang.String code, CustomerKey ukey, StoreKey storeKey) throws PromotionApplicationException
public PromotionErrorReport validatePromotionCode(java.lang.String code, CustomerKey ukey, StoreKey storeKey, java.util.Date date) throws PromotionApplicationException
public GenericPromotionCodeResolver getPromotionCodeResolver()
public void fromXML(org.w3c.dom.Node node) throws DeXMLizationException
public java.lang.String toXML() throws XMLizationException
public void setPromotionCodeResolver(GenericPromotionCodeResolver resolver)