public interface GenericPromotionCodeManager extends XMLizable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright
|
static int |
PROMO_CODE_IN_USE
A promotion code is being used in an order.
|
static int |
PROMO_CODE_USED
A promotion code has been used in an order that's completed.
|
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
|
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
|
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.
|
static final java.lang.String COPYRIGHT
static final int PROMO_CODE_IN_USE
static final int PROMO_CODE_USED
void addCodeForOrder(java.lang.String code, OrderKey okey) throws PromotionApplicationException
code
- The codeokey
- The order keyPromotionApplicationException
- is thrown when system fails to add the code to the ordervoid addCodeForOrder(java.lang.String code, OrderKey okey, java.util.Date date) throws PromotionApplicationException
code
- The codeokey
- The order keydate
- The date on which the code is enteredPromotionApplicationException
- is thrown when system fails to add the code to the orderjava.lang.String[] listCodeForOrder(OrderKey okey)
okey
- The order key of the order.void removeCodeForOrder(java.lang.String code, OrderKey okey) throws PromotionApplicationException
code
- The codeokey
- The order keyPromotionApplicationException
- is thrown when system fails to remove the code from the ordervoid removeAllCodesForOrder(OrderKey okey) throws PromotionApplicationException
okey
- The order keyPromotionApplicationException
- is thrown when system fails to remove the codes from the orderPromotionErrorReport validatePromotionCode(java.lang.String code, CustomerKey ukey, StoreKey storeKey) throws PromotionApplicationException
code
- the codeukey
- customer who entered the codestoreKey
- key of the store where the customer is shoppingPromotionApplicationException
- if any of the 3 criteria is not satisfied.PromotionErrorReport validatePromotionCode(java.lang.String code, CustomerKey ukey, StoreKey storeKey, java.util.Date date) throws PromotionApplicationException
code
- the codeukey
- customer who entered the codestoreKey
- key of the store where the customer is shoppingdate
- the date on which the code is enteredPromotionApplicationException
- if any of the 3 criteria is not satisfied.GenericPromotionCodeResolver getPromotionCodeResolver()