com.ibm.commerce.negotiation.operation
Class OpenCryBidRuleInterpreterImpl

java.lang.Object
  com.ibm.commerce.negotiation.operation.RuleInterpreterImpl
      com.ibm.commerce.negotiation.operation.OpenCryBidRuleInterpreterImpl
All Implemented Interfaces:
RuleInterpreter

public class OpenCryBidRuleInterpreterImpl
extends RuleInterpreterImpl

This class handles Open Cry Auction bid rule.


Field Summary
static java.lang.String COPYRIGHT
Copyright statement.
static java.lang.String TEXT_DELIMITER
Text delimiter.
static java.lang.String TEXT_SEPARATOR
text separator.
Fields inherited from class com.ibm.commerce.negotiation.operation.RuleInterpreterImpl
bestBidValue, bidQty, bidValue, dataBean, lowestWinningBid, objectList, rule
Constructor Summary
OpenCryBidRuleInterpreterImpl()
Creates an OpenCryBidRuleInterpreterImpl object.
Method Summary
protected java.math.BigDecimal getIncrementFromRule()
Returns the increment associated with a control-rule price range.
void populateDataBean()
Populates the databean object with a ControlRuleAccessBean object.
protected java.lang.String priceRangesToText()
Returns the string that represents the price range vector for Open Cry Bid Rule.
void saveDataBean()
Save the datbean back to a ControlRuleAccessBean, then to the database.
void setBidValue(java.lang.String newBidValue)
Sets a new bid value.
protected java.util.Vector textToPriceRanges()
Parses text string into upper/lower price limit components.
boolean validate()
validate Validates an open-cry bid against the auction control rule.
Methods inherited from class com.ibm.commerce.negotiation.operation.RuleInterpreterImpl
addRelevantObject, getBidQty, getBidValue, getControlRuleAccessBean, getControlRuleDataBean, getLowestWinningBid, getRelevantObject, setBidQty, setControlRuleAccessBean, setControlRuleDataBean, setLowestWinningBid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright statement.
See Also:
Constant Field Values

TEXT_SEPARATOR

public static final java.lang.String TEXT_SEPARATOR
text separator.
See Also:
Constant Field Values

TEXT_DELIMITER

public static final java.lang.String TEXT_DELIMITER
Text delimiter.
See Also:
Constant Field Values
Constructor Detail

OpenCryBidRuleInterpreterImpl

public OpenCryBidRuleInterpreterImpl()
Creates an OpenCryBidRuleInterpreterImpl object.
Method Detail

getIncrementFromRule

protected java.math.BigDecimal getIncrementFromRule()
Returns the increment associated with a control-rule price range.
Returns:
double

populateDataBean

public void populateDataBean()
                      throws java.lang.Exception
Populates the databean object with a ControlRuleAccessBean object.
Specified by:
populateDataBean in interface RuleInterpreter
Specified by:
populateDataBean in class RuleInterpreterImpl
Throws:
java.lang.Exception

priceRangesToText

protected java.lang.String priceRangesToText()
Returns the string that represents the price range vector for Open Cry Bid Rule. This string will be save to the database.
Returns:
java.lang.String

saveDataBean

public void saveDataBean()
                  throws java.lang.Exception
Save the datbean back to a ControlRuleAccessBean, then to the database.
Specified by:
saveDataBean in interface RuleInterpreter
Specified by:
saveDataBean in class RuleInterpreterImpl
Throws:
java.lang.Exception - The exception description.

setBidValue

public void setBidValue(java.lang.String newBidValue)
Sets a new bid value.
Specified by:
setBidValue in interface RuleInterpreter
Overrides:
setBidValue in class RuleInterpreterImpl
Parameters:
newBidValue - java.lang.String

textToPriceRanges

protected java.util.Vector textToPriceRanges()
Parses text string into upper/lower price limit components.
Returns:
Vector - contain the parsed object

validate

public boolean validate()
                 throws java.lang.Exception
validate Validates an open-cry bid against the auction control rule.
Specified by:
validate in interface RuleInterpreter
Overrides:
validate in class RuleInterpreterImpl
Returns:
boolean
Throws:
java.lang.Exception

Feedback