Package | Description |
---|---|
com.neurosys.ecom.orders.dao.jpa | |
com.neurosys.ecom.orders.service | |
com.neurosys.ecom.strategy.service | |
com.neurosys.ecom.user.service.jaxrs |
Modifier and Type | Method and Description |
---|---|
PromotionForUser |
PromotionDaoImpl.save(PromotionForUser promotionForUser) |
PromotionForUser |
PromotionDaoImpl.search(String userId,
String promotionName) |
Modifier and Type | Method and Description |
---|---|
Collection<PromotionForUser> |
PromotionDaoImpl.load(Collection<PromotionForUser> promotionForUsers) |
List<PromotionForUser> |
PromotionDaoImpl.search(List<String> codes) |
List<PromotionForUser> |
PromotionDaoImpl.search(String userId) |
List<PromotionForUser> |
PromotionDaoImpl.search(String userId,
List<String> codes) |
Modifier and Type | Method and Description |
---|---|
int |
PromotionDaoImpl.delete(PromotionForUser promotionForUser) |
PromotionForUser |
PromotionDaoImpl.save(PromotionForUser promotionForUser) |
Modifier and Type | Method and Description |
---|---|
Collection<PromotionForUser> |
PromotionDaoImpl.load(Collection<PromotionForUser> promotionForUsers) |
Modifier and Type | Method and Description |
---|---|
PromotionForUser |
PromotionService.save(PromotionForUser promotionForUser) |
PromotionForUser |
DefaultPromotionService.save(PromotionForUser promotionForUser) |
PromotionForUser |
PromotionService.search(String userId,
String promotionName)
Search for a
PromotionForUser |
PromotionForUser |
DefaultPromotionService.search(String userId,
String promotionName) |
protected PromotionForUser |
DefaultPromotionService.stringToPromotionUser(String userCouponId,
boolean generateCoupon)
Takes in a list of Strings.
|
Modifier and Type | Method and Description |
---|---|
List<PromotionForUser> |
PromotionService.search(List<String> codes)
For provided list of Codes, get
Promotion s |
List<PromotionForUser> |
DefaultPromotionService.search(List<String> codes) |
List<PromotionForUser> |
PromotionService.search(String userId)
Fpr a given user Id get all the Active Promotions
|
List<PromotionForUser> |
DefaultPromotionService.search(String userId) |
List<PromotionForUser> |
PromotionService.search(String userId,
List<String> codes)
For provided list of Codes, get
Promotion s for a given userId |
List<PromotionForUser> |
DefaultPromotionService.search(String userId,
List<String> codes) |
Collection<PromotionForUser> |
PromotionService.validate(Collection<PromotionForUser> promotionForUsers)
Ensure the passed collection contains valid entities; returns back only valid entities.
|
Collection<PromotionForUser> |
DefaultPromotionService.validate(Collection<PromotionForUser> promotionForUsers) |
Modifier and Type | Method and Description |
---|---|
int |
PromotionService.delete(PromotionForUser promotionForUser) |
int |
DefaultPromotionService.delete(PromotionForUser promotionForUser) |
PromotionForUser |
PromotionService.save(PromotionForUser promotionForUser) |
PromotionForUser |
DefaultPromotionService.save(PromotionForUser promotionForUser) |
Modifier and Type | Method and Description |
---|---|
Collection<PromotionForUser> |
PromotionService.validate(Collection<PromotionForUser> promotionForUsers)
Ensure the passed collection contains valid entities; returns back only valid entities.
|
Collection<PromotionForUser> |
DefaultPromotionService.validate(Collection<PromotionForUser> promotionForUsers) |
Modifier and Type | Field and Description |
---|---|
static MarshalUtils.GenericTransformer<PromotionForUser,String> |
DefaultPromotionStrategy.PROMOTION_STRING_TRANSFORMER
Create a Notation - PromotionName:UserId:CouponCode
|
static MarshalUtils.GenericTransformer<String,PromotionForUser> |
DefaultPromotionStrategy.STRING_PROMOTION_TRANSFORMER
Read the Notation - PromotionName:UserId:CouponCode to produce a PromotionForUser transient object
|
Modifier and Type | Method and Description |
---|---|
<CONTEXT> List<PromotionForUser> |
DefaultPromotionStrategy.getPromotions(Map<P,Number> productQtyMap,
U user,
Amount subTotal,
Number quantityTotal,
CONTEXT context)
Note: Default implementation looks for any item not on SALE to grant the Discount.
|
<CONTEXT> List<PromotionForUser> |
PromotionStrategy.getPromotions(Map<P,Number> productQtyMap,
U user,
Amount subTotal,
Number quantityTotal,
CONTEXT context)
Get a List of
PromotionForUser for the Order of a user |
protected List<PromotionForUser> |
DefaultPromotionStrategy.getPromotions(String userEmail,
String couponCode) |
Modifier and Type | Method and Description |
---|---|
protected Amount |
DefaultPromotionStrategy.discountForPromotion(PromotionForUser promotionForUser,
Map<P,Number> productQtyMap,
String currency,
Amount subTotal) |
protected Double |
DefaultPromotionStrategy.includeProductPriceForDiscount(P p,
PromotionForUser promotionForUser,
String currency,
Amount subTotal)
If this returns a double then in cases where the Discount is variable on the Cart amount; this will contribute.
|
protected void |
DefaultPromotionStrategy.validate(PromotionForUser promotionForUser,
String currency,
Amount subTotal,
Number totalQuantity) |
Modifier and Type | Method and Description |
---|---|
protected <CONTEXT> void |
DefaultSaleStrategy.applyDiscount(Amount amt,
P product,
Number quantity,
U user,
List<PromotionForUser> promotions,
CONTEXT context)
Apply discount on product.
|
protected <CONTEXT> void |
DefaultSaleStrategy.applyTax(Amount amt,
P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context) |
<CONTEXT> Amount |
CumulativeChargeStrategy.calculate(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Amount subTotal,
Number quantityTotal,
CONTEXT context)
Calculate raw amount for product(s)
|
<CONTEXT> Amount |
DefaultPromotionStrategy.calculate(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Amount subTotal,
Number totalQuantity,
CONTEXT context) |
<CONTEXT> Amount |
PromotionStrategy.calculate(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Amount subTotal,
Number totalQuantity,
CONTEXT context)
Note: Discounts are DEDUCTED in main / API calcs, so total can be (+), discount part (-) ...
|
<CONTEXT> Amount |
AbstractChargeStrategy.calculate(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Amount subTotal,
Number quantityTotal,
CONTEXT context) |
<CONTEXT> Amount |
DefaultPromotionStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context)
By default this Strategy does not do anything @ a product level.
|
<CONTEXT> Amount |
DefaultOrderStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context)
Will add amount from
ChargeStrategy.calculate(Product, Number, User, String, List, Object) for each of the following strategies in order @ The product level.The rules of Amount.add(Amount) will apply while adding:
DefaultOrderStrategy.saleStrategy
DefaultOrderStrategy.discountStrategy
DefaultOrderStrategy.promotionStrategy
|
<CONTEXT> Amount |
ChargeStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context)
Calculate raw amount for a product and any user making purchase
|
<CONTEXT> Amount |
DefaultSaleStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context)
Calculate
Amount for product in the given context. |
<CONTEXT> Amount |
DefaultPackagingStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context)
Return
Product.getPackagingData() as a Number |
<CONTEXT> Amount |
DefaultShippingStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context)
Return
Product.getShippingData() as a Number |
<CONTEXT> Amount |
DefaultTaxStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context)
Assumes tax data is represented in %, Number and the calculation is is a Tax% on (sale or regular price).
|
<CONTEXT> Amount |
DefaultDiscountStrategy.calculate(P product,
Number quantity,
U user,
String currency,
List<PromotionForUser> promotions,
CONTEXT context) |
<CONTEXT> O |
DefaultOrderStrategy.createOrder(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Map<String,Object> itemProperties,
boolean persist,
CONTEXT context) |
<CONTEXT> O |
OrderStrategy.createOrder(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Map<String,Object> itemProperties,
boolean persist,
CONTEXT context) |
<CONTEXT> O |
DefaultOrderStrategy.createOrder(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Map<String,Object> itemProperties,
boolean persist,
org.apache.commons.collections.Transformer transformer,
CONTEXT context)
|
<CONTEXT> O |
OrderStrategy.createOrder(Map<P,Number> productQtyMap,
U user,
String currency,
List<PromotionForUser> promotions,
Map<String,Object> itemProperties,
boolean persist,
org.apache.commons.collections.Transformer transformer,
CONTEXT context)
|
Modifier and Type | Method and Description |
---|---|
protected PartialTransactionException |
StrategiesService._strategiesCalcData(Map<P,Number> productQtyMap,
List<CartItem> cartItems,
U user,
String currency,
List<PromotionForUser> promotions,
Amount subTotal,
Number totalQuantity,
Collection<String> paramNames,
EComSession session,
CONTEXT context,
PartialTransactionException pte)
Can override if there are any App specific Strategies not handled by this default service
|
Copyright © 2018. All rights reserved.