public class PriceRuleElementCmdImpl extends com.ibm.websphere.command.CacheableCommandImpl implements PriceRuleElementCmd
validateParameters
to validate
the element during saving price rule. The method checks that
all the required data has been provided and is correct. Implement
performExecute
and put the condition evaluation result
into the returned object. The name of the variable to contain the condition
evaluation result is returnedObjectCondition
. The value of the
variable should be type of Boolean
.
For an action:
Optionally implement validateParameters
to validate
the element during saving price rule. The method checks that
all the required data has been provided and is correct.Implement
performExecute
and put the price calculation result
into the returned object. The name of the variable to contain the calculation
result is returnedObjectOffers
. The value of the variable should
be type of MonetaryAmount
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this class.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName
Constructor and Description |
---|
PriceRuleElementCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCatentryId()
Get catentryId.
|
java.lang.String |
getCurrency()
Get currency.
|
java.lang.String |
getElementId()
Get elementId.
|
java.util.Map |
getElementParameters()
This method gets the parameters.
|
com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject |
getPriceRule()
Get priceRule.
|
java.lang.Double |
getQuantity()
Get quantity.
|
java.util.Map |
getReturnedObject()
Get returned object.
|
java.util.Map |
getRuntimeParametersMap()
Get runtime parameters map.
|
java.lang.String |
getUom()
Get UOM.
|
boolean |
isReadyToCallExecute()
This method returns true.
|
void |
performExecute()
This method performs no actions.
|
void |
setCatentryId(java.lang.String newCatentryId)
Set the catentryId.
|
void |
setCurrency(java.lang.String newCurrency)
Set the currency.
|
void |
setElementId(java.lang.String newElementId)
Set the elementId.
|
void |
setElementParameters(java.util.Map newParameters)
This method sets the parameters associated with the element.
|
void |
setPriceRule(com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject newPriceRule)
Set the priceRule.
|
void |
setQuantity(java.lang.Double newQuantity)
Set the quantity.
|
void |
setReturnedObject(java.util.Map newReturnedObject)
Set returned object.
|
void |
setRuntimeParametersMap(java.util.Map newRuntimeParametersMap)
Set runtime parameters map.
|
void |
setUom(java.lang.String newUom)
Set the UOM.
|
java.util.List |
validateParameters(java.util.Map elementParameters)
This method performs validations.
|
execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, reset, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public java.lang.String getCatentryId()
getCatentryId
in interface PriceRuleElementCmd
public void setCatentryId(java.lang.String newCatentryId)
setCatentryId
in interface PriceRuleElementCmd
newCatentryId
- The catentryId to set. It can't be null.public java.lang.String getCurrency()
getCurrency
in interface PriceRuleElementCmd
public void setCurrency(java.lang.String newCurrency)
setCurrency
in interface PriceRuleElementCmd
newCurrency
- The currency to set. It can't be null.public java.lang.Double getQuantity()
getQuantity
in interface PriceRuleElementCmd
public void setQuantity(java.lang.Double newQuantity)
setQuantity
in interface PriceRuleElementCmd
newQuantity
- The quantity to set. It can't be null.public java.lang.String getUom()
getUom
in interface PriceRuleElementCmd
public void setUom(java.lang.String newUom)
setUom
in interface PriceRuleElementCmd
newUom
- The UOM to set. It can't be null.public com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject getPriceRule()
getPriceRule
in interface PriceRuleElementCmd
public void setPriceRule(com.ibm.commerce.price.rule.runtime.objects.PriceRuleObject newPriceRule)
setPriceRule
in interface PriceRuleElementCmd
newPriceRule
- The priceRule to set. It can't be null.public java.lang.String getElementId()
getElementId
in interface PriceRuleElementCmd
public void setElementId(java.lang.String newElementId)
setElementId
in interface PriceRuleElementCmd
newElementId
- The elementId to set. It can't be null.public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class com.ibm.websphere.command.TargetableCommandImpl
public void performExecute() throws java.lang.Exception
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class com.ibm.websphere.command.TargetableCommandImpl
java.lang.Exception
public java.util.List validateParameters(java.util.Map elementParameters)
validateParameters
in interface PriceRuleElementCmd
elementParameters
- The elementParameters to set. It can be null.public void setElementParameters(java.util.Map newParameters)
PRELEMENTATTR
database table.setElementParameters
in interface PriceRuleElementCmd
newParameters
- The name value pairs available to the task command
implementation. It can't be null.public java.util.Map getRuntimeParametersMap()
getRuntimeParametersMap
in interface PriceRuleElementCmd
public void setRuntimeParametersMap(java.util.Map newRuntimeParametersMap)
setRuntimeParametersMap
in interface PriceRuleElementCmd
newRuntimeParametersMap
- It can't be null.public java.util.Map getElementParameters()
getElementParameters
in interface PriceRuleElementCmd
public java.util.Map getReturnedObject()
getReturnedObject
in interface PriceRuleElementCmd
public void setReturnedObject(java.util.Map newReturnedObject)
setReturnedObject
in interface PriceRuleElementCmd
newReturnedObject
- It can't be null.