A B C E F G H I J P R S T V 

A

AbstractRuleBase<T> - Class in scpc.model.support
Implement basic function of IRule
AbstractRuleBase() - Constructor for class scpc.model.support.AbstractRuleBase
 
as() - Method in class scpc.model.BonusItem
 
as() - Method in class scpc.model.CurrentItem
 
as() - Method in interface scpc.model.IItem
購物車品項的真實類別
as() - Method in class scpc.model.SingleItem
 

B

bindVaribles(IRule<T>) - Method in class scpc.model.support.EvalHelper
 
bindVaribles(IRule<T>, SingleItem<T>) - Method in class scpc.model.support.EvalHelper
Bind rule and item into evaluation context.
bindVaribles(IRule<T>, SingleItem<T>) - Method in class scpc.model.support.SpelEvalHelper
 
bindVarValue(String, Object) - Method in class scpc.model.support.EvalHelper
Bind variable with value into context.
bindVarValue(String, Object) - Method in class scpc.model.support.JsEvalHelper
 
bindVarValue(String, Object) - Method in class scpc.model.support.SpelEvalHelper
 
BonusItem<T> - Class in scpc.model
Bonus item of promotions.
BonusItem(IRule<T>, IItem<T>) - Constructor for class scpc.model.BonusItem
 

C

calcBonus(List<? extends IRule<T>>, Set<? extends IItem<T>>) - Static method in class scpc.Calculator
Caculate bonus from rules and shopping cart items.
Calculator - Class in scpc
Calculator of Shopping cart promotion.
Calculator() - Constructor for class scpc.Calculator
 
contains(IItem<T>) - Method in interface scpc.model.IRule
Detecting item whether is applicable to this rule or not.
containsCountInc() - Method in interface scpc.model.IRule
Increase one count of items that is applicable to this rule.
containsCountInc() - Method in class scpc.model.support.AbstractRuleBase
for Calculator use only.
CurrentItem - Class in scpc.model
Represent current visit item as bonus.

E

equals(Object) - Method in class scpc.model.BonusItem
 
equals(Object) - Method in class scpc.model.CurrentItem
 
equals(Object) - Method in class scpc.model.SingleItem
 
eval(String) - Method in class scpc.model.support.EvalHelper
Evaluate formula as numeric or boolean.
eval(String) - Method in class scpc.model.support.JsEvalHelper
 
eval(String) - Method in class scpc.model.support.SpelEvalHelper
 
EvalHelper<T> - Class in scpc.model.support
A formula evaluator to help analysis.
EvalHelper() - Constructor for class scpc.model.support.EvalHelper
 
evalQuantity() - Method in interface scpc.model.ILeafRule
Quantity measure of bonus after IRule.isTriggered(scpc.model.SingleItem).
evalQuantity() - Method in class scpc.model.support.AbstractRuleBase
Quantity measure of bonus after isTriggered(scpc.model.SingleItem)

F

flat(Set<? extends IItem<T>>) - Static method in class scpc.Calculator
Spread shopping cart into single item for iteration.

G

getBonus() - Method in interface scpc.model.ILeafRule
優惠品項.
getContainsCount() - Method in interface scpc.model.IRule
符合此規則的品項數量
getContainsCount() - Method in class scpc.model.support.AbstractRuleBase
 
getCurrentAsBonus(IItem<T>) - Method in interface scpc.model.ILeafRule
Current visit item is bonus item.
getEvalHelper() - Method in class scpc.model.support.AbstractRuleBase
A formula evaluator to help analysis.
getExpression(String) - Method in class scpc.model.support.SpelEvalHelper
 
getFracQuantity() - Method in class scpc.model.BonusItem
for Calculator use only.
getIdentity() - Method in class scpc.model.BonusItem
 
getIdentity() - Method in class scpc.model.CurrentItem
 
getIdentity() - Method in interface scpc.model.IItem
購物車品項識別,例如 產品代號
getIdentity() - Method in class scpc.model.SingleItem
 
getInstance() - Static method in class scpc.model.CurrentItem
 
getItem() - Method in class scpc.model.SingleItem
購物車裡的物品
getNext() - Method in interface scpc.model.IChainRule
A chained-rule need to know where the next.
getOriginalPrice() - Method in class scpc.model.BonusItem
 
getOriginalPrice() - Method in class scpc.model.CurrentItem
 
getOriginalPrice() - Method in interface scpc.model.IItem
原價
getOriginalPrice() - Method in class scpc.model.SingleItem
 
getPrevious() - Method in interface scpc.model.IRule
Previous rule.
getPrevious() - Method in class scpc.model.support.AbstractRuleBase
 
getPreviousRulePrefix() - Method in class scpc.model.support.EvalHelper
A prefix string add on comman variable to represent a previous rule's variable.
getPriceScale() - Method in interface scpc.model.IRule
價格精度
getPriority() - Method in interface scpc.model.IRule
Priority, the smaller the value the higher the priority.
getQuantity() - Method in class scpc.model.BonusItem
The quantity of bonus.
getQuantity() - Method in class scpc.model.CurrentItem
 
getQuantity() - Method in interface scpc.model.IItem
品項的數量
getQuantity() - Method in class scpc.model.SingleItem
 
getQuantityFormula() - Method in class scpc.model.support.AbstractRuleBase
When triggered, a formula to check how many quantities should offer.
getRule() - Method in class scpc.model.BonusItem
The assoicate rule of this bonus.
getSalePrice() - Method in class scpc.model.BonusItem
 
getSalePrice() - Method in class scpc.model.CurrentItem
 
getSalePrice() - Method in interface scpc.model.IItem
售價
getSalePrice() - Method in class scpc.model.SingleItem
 
getScriptEngine() - Method in class scpc.model.support.JsEvalHelper
 
getSequenceNum() - Method in class scpc.model.SingleItem
排序編號
getSerialNum() - Method in interface scpc.model.IRule
目前走訪商品之同品項物品的編號(從1起算)
getSerialNum() - Method in class scpc.model.support.AbstractRuleBase
 
getSumOfContainsOriginalPrice() - Method in interface scpc.model.IRule
符合此規則的品項原價小計
getSumOfContainsOriginalPrice() - Method in class scpc.model.support.AbstractRuleBase
 
getSumOfContainsSalePrice() - Method in interface scpc.model.IRule
符合此規則的品項售價小計
getSumOfContainsSalePrice() - Method in class scpc.model.support.AbstractRuleBase
 
getSumOfSerialOriginalPrice() - Method in interface scpc.model.IRule
符合此規則的同品項原價小計
getSumOfSerialOriginalPrice() - Method in class scpc.model.support.AbstractRuleBase
 
getSumOfSerialSalePrice() - Method in interface scpc.model.IRule
符合此規則的同品項售價小計
getSumOfSerialSalePrice() - Method in class scpc.model.support.AbstractRuleBase
 
getTriggerFormula() - Method in class scpc.model.support.AbstractRuleBase
A trigger formula is evaluated to determine whether to get a bonus or not.
getVarContainsCount() - Method in class scpc.model.support.EvalHelper
Variable name of which represent the number of items that could applicable to this rule.
getVarOriginalPrice() - Method in class scpc.model.support.EvalHelper
Variable name of original price.
getVarSalePrice() - Method in class scpc.model.support.EvalHelper
Variable name of sale price.
getVarSerialNum() - Method in class scpc.model.support.EvalHelper
Variable name of which represent the sequence of the same applicable items.
getVarSumOfContainsOriginalPrice() - Method in class scpc.model.support.EvalHelper
Variable name of which represent the summary original price of applicable items.
getVarSumOfContainsSalePrice() - Method in class scpc.model.support.EvalHelper
Variable name of which represent the summary sale price of applicable items.
getVarSumOfSerialOriginalPrice() - Method in class scpc.model.support.EvalHelper
Variable name of which represent the summary oringal price of the same applicable items.
getVarSumOfSerialSalePrice() - Method in class scpc.model.support.EvalHelper
Variable name of which represent the summary sale price of the same applicable items.

H

hashCode() - Method in class scpc.model.BonusItem
 
hashCode() - Method in class scpc.model.CurrentItem
 
hashCode() - Method in class scpc.model.SingleItem
 

I

IChainRule<T> - Interface in scpc.model
 
IItem<T> - Interface in scpc.model
購物車裡的項目
Present a Shopping cart item.
ILeafRule<T> - Interface in scpc.model
Promotion rule that result in bonus item.
incFracQuantity(double) - Method in class scpc.model.BonusItem
for Calculator use only.
IRule<T> - Interface in scpc.model
Promotion rule which could be applicable to shopping cart.
isCurrent(Object) - Static method in class scpc.model.CurrentItem
 
isExclusiveLock() - Method in class scpc.model.SingleItem
for Calculator use only.
isLastQuantityOnly() - Method in interface scpc.model.ILeafRule
Only the last measure set to quantity.
isLeaf() - Method in interface scpc.model.IRule
Whether this rule is a leaf rule or not.
isSerialLast() - Method in class scpc.model.SingleItem
是否為同品項物品的最後一項
isTriggered(SingleItem<T>) - Method in interface scpc.model.IRule
Determined iterable items if matched.
isTriggered(SingleItem<T>) - Method in class scpc.model.support.AbstractRuleBase
 

J

JS_NAME_LOCATOR - Static variable in class scpc.model.support.EvalHelper
 
JS_NAME_VALIDATOR - Static variable in class scpc.model.support.EvalHelper
 
JsEvalHelper<T> - Class in scpc.model.support
A JavaScript formula evaluator using JDK build in JS Engin.
JsEvalHelper() - Constructor for class scpc.model.support.JsEvalHelper
 

P

purgeBind() - Method in class scpc.model.support.EvalHelper
Clear all binding variable in context.
purgeBind() - Method in class scpc.model.support.JsEvalHelper
 
purgeBind() - Method in class scpc.model.support.SpelEvalHelper
 
purification(Collection<? extends IItem<T>>) - Static method in class scpc.Calculator
Extract real cart items from a collection.

R

resetSumOfPrice() - Method in interface scpc.model.IRule
Reset sumary price to zero
重置所有價格累計為零
resetSumOfPrice() - Method in class scpc.model.support.AbstractRuleBase
 
resetSumOfSerialOriginalPrice() - Method in interface scpc.model.IRule
Reset the summary original price of the same applicable items.
resetSumOfSerialOriginalPrice() - Method in class scpc.model.support.AbstractRuleBase
 
resetSumOfSerialSalePrice() - Method in interface scpc.model.IRule
Reset the summary sale price of the same applicable items.
resetSumOfSerialSalePrice() - Method in class scpc.model.support.AbstractRuleBase
 

S

scpc - package scpc
 
scpc.model - package scpc.model
 
scpc.model.support - package scpc.model.support
 
serialNumInc(boolean) - Method in interface scpc.model.IRule
 
serialNumInc(boolean) - Method in class scpc.model.support.AbstractRuleBase
 
setEvalHelper(EvalHelper) - Method in class scpc.model.support.AbstractRuleBase
 
setExclusiveLock(boolean) - Method in class scpc.model.SingleItem
for Calculator use only.
setFracQuantity(double) - Method in class scpc.model.BonusItem
for Calculator use only.
setPrevious(IChainRule<T>) - Method in class scpc.model.support.AbstractRuleBase
Set previous rule if exists.
setQuantity(long) - Method in class scpc.model.BonusItem
Not supported.
setQuantity(long) - Method in class scpc.model.CurrentItem
 
setQuantity(long) - Method in interface scpc.model.IItem
設定品項數量
setQuantity(long) - Method in class scpc.model.SingleItem
 
setQuantityFormula(String) - Method in class scpc.model.support.AbstractRuleBase
Setting a formula to check how many quantities should offer after triggered.
setSerialLast(boolean) - Method in class scpc.model.SingleItem
Detect whether the current visit item is the last item of the same series or not.
setSerialSumOfSalePrice(BigDecimal) - Method in class scpc.model.support.AbstractRuleBase
Setting the summary sale price of the same applicable items.
setTriggerFormula(String) - Method in class scpc.model.support.AbstractRuleBase
Setting a trigger formula is evaluated to determine whether to get a bonus or not.
SingleItem<T> - Class in scpc.model
購物車內的單一物品
Present a single item of shopping cart.
SingleItem(IItem<T>, int) - Constructor for class scpc.model.SingleItem
 
SpelEvalHelper<T> - Class in scpc.model.support
A Spring Expression Language formula evaluator.
SpelEvalHelper() - Constructor for class scpc.model.support.SpelEvalHelper
 
sumOfContainsOriginalPriceInc(BigDecimal) - Method in interface scpc.model.IRule
Increase the summary original price of applicable items.
sumOfContainsOriginalPriceInc(BigDecimal) - Method in class scpc.model.support.AbstractRuleBase
 
sumOfContainsSalePriceInc(BigDecimal) - Method in interface scpc.model.IRule
Increase the summary sale price of applicable items.
sumOfContainsSalePriceInc(BigDecimal) - Method in class scpc.model.support.AbstractRuleBase
 
sumOfSerialOriginalPriceInc(BigDecimal) - Method in interface scpc.model.IRule
Increase the summary oringal price of the same applicable items.
sumOfSerialOriginalPriceInc(BigDecimal) - Method in class scpc.model.support.AbstractRuleBase
 
sumOfSerialSalePriceInc(BigDecimal) - Method in interface scpc.model.IRule
Increase the summary sale price of the same applicable items.
sumOfSerialSalePriceInc(BigDecimal) - Method in class scpc.model.support.AbstractRuleBase
 

T

toString() - Method in class scpc.model.BonusItem
 
toString() - Method in class scpc.model.SingleItem
 

V

validateJSVariable() - Method in class scpc.model.support.EvalHelper
Check all variables name are qualified javascript name.
validJSVarName(String) - Static method in class scpc.model.support.EvalHelper
Check a variable name is a qualified javascript name.
A B C E F G H I J P R S T V 

Copyright © 2018. All rights reserved.