com.ibm.commerce.price.rule.commands.element

Class ComparisonConditionElementCmdImpl

  • All Implemented Interfaces:
    ComparisonConditionElementCmd, PriceRuleElementCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class ComparisonConditionElementCmdImpl
    extends PriceRuleElementCmdImpl
    implements ComparisonConditionElementCmd
    The default implementation for the comparison condition element command. This command is used to determine whether comparison condition is met.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this class.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ComparisonConditionElementCmdImpl

        public ComparisonConditionElementCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws java.lang.Exception
        The main logic to execute the command.
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class PriceRuleElementCmdImpl
        Throws:
        java.lang.Exception
      • getPriceConstantValue

        public java.math.BigDecimal getPriceConstantValue(java.lang.String prconstantId,
                                                          java.lang.String targetCurrency)
                                                   throws java.lang.Exception
        This method retrieve value of a price constant.
        Parameters:
        prconstantId - The price constant Id. It can't be null or empty.
        targetCurrency - The specified currency for currency price constant. It can be null or empty if the price constant in question is not currency type.
        Returns:
        The price constant value. Return null if the price constant is not found.
        Throws:
        java.lang.Exception
      • validateParameters

        public java.util.List validateParameters(java.util.Map elementParameters)
        This method performs validations. Implementations that extend this class need to implement this method.This value can be null of no errors.
        Specified by:
        validateParameters in interface PriceRuleElementCmd
        Overrides:
        validateParameters in class PriceRuleElementCmdImpl
        Parameters:
        elementParameters -
        Returns:
        A list which contains all validation errors.This value will be null if no errors found.