|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.commerce.negotiation.commands.DetermineWinnersCmdImpl
Determines the winning auto-bids's next bidding price for an auction.
Field Summary | |
static java.lang.String |
COPYRIGHT
|
protected java.util.Vector |
winners
|
Fields inherited from interface com.ibm.commerce.negotiation.commands.DetermineWinnersCmd |
defaultCommandClassName, NAME |
Constructor Summary | |
DetermineWinnersCmdImpl()
DetermineWinnersCmdImpl default constructor. |
Method Summary | |
protected java.math.BigDecimal |
calculateNextBidValue(java.math.BigDecimal currMaxBidValue)
Calculates the next bid value based on the current maximum bid value and the bid rule range/increment. |
protected com.ibm.commerce.negotiation.commands.BidDataLight |
findNextLoser(int start,
double availQuant)
Given the index of a winning auto bid, to find the closest loser(the runner-up) which is defined as the bid that is going to win if this winning autobid doesn't exist. |
protected java.util.Vector |
getActiveBids()
Get the list of active bids for processing. |
protected ControlRuleAccessBean |
getBidRule()
A singleton method for retrieving Control Rule Access Bean. |
protected java.lang.Long |
getBidRuleId()
Gets the auction's Bid Rule Id. |
protected java.math.BigDecimal |
getDefaultBidIncrement()
Return a default bid increment value. |
protected java.math.BigDecimal |
getDefaultMinBidValue()
Return a default minimum bid value. |
protected java.lang.String |
getErrorTaskName()
returns error task name that will be returned by the exceptions. |
protected java.lang.Double |
getQuantityOnAuction()
Get the quantity available for auction. |
java.util.Vector |
getWinners()
Get the list of auto bids that are winning. |
protected void |
handleException(java.lang.Exception e)
Formats an ECException based on the input exception value. |
boolean |
isReadyToCallExecute()
Verifies that the this command is ready to be executed. |
void |
performExecute()
For all active auto bids, determine if a new bid value should be submitted on behalf of the auto bid, in order to put the auto bid in a winning position. |
void |
reset()
Resets this command to allow for future reuse. |
void |
setActiveBids(java.util.Vector bids)
Sets the list of active bids to be processed. |
void |
setBidRuleId(java.lang.Long id)
Sets the auction Bid Rule id |
void |
setErrorTaskName(java.lang.String errorTaskName)
Set error task name that will be returned by the exceptions. |
void |
setQuantityOnAuction(java.lang.Double quantity)
Set the quantity available for auction. |
void |
setWinners(java.util.Vector newWinners)
Set the list of autobids that are currently winning. |
static java.lang.String |
traceBid(com.ibm.commerce.negotiation.commands.BidDataLight bid)
Return a string that shows the information about a bid. |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Field Detail |
public static final java.lang.String COPYRIGHT
protected java.util.Vector winners
Constructor Detail |
public DetermineWinnersCmdImpl()
Method Detail |
protected java.math.BigDecimal calculateNextBidValue(java.math.BigDecimal currMaxBidValue) throws ECException
BigDecimal
- currMaxBidValue - Current maximum bid value.ECException
- - Invalid input bid value or, error during bid control rule bean lookup.protected com.ibm.commerce.negotiation.commands.BidDataLight findNextLoser(int start, double availQuant)
start
- intavailQuant
- doubleprotected java.util.Vector getActiveBids()
protected ControlRuleAccessBean getBidRule() throws java.lang.Exception
java.lang.Exception
- - FinderException or data base retrieval exception.protected java.lang.Long getBidRuleId()
Long
- - Bid rule Id.protected java.math.BigDecimal getDefaultBidIncrement()
protected java.math.BigDecimal getDefaultMinBidValue()
protected java.lang.String getErrorTaskName()
protected java.lang.Double getQuantityOnAuction()
public java.util.Vector getWinners()
protected void handleException(java.lang.Exception e) throws ECException
e
- Exception - The exception instance to be formatted.ECException
- public boolean isReadyToCallExecute()
public void performExecute() throws ECException
performExecute
in interface ECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.public void reset()
public void setActiveBids(java.util.Vector bids)
setActiveBids
in interface DetermineWinnersCmd
bids
- Vector - Active bids listpublic void setBidRuleId(java.lang.Long id)
setBidRuleId
in interface DetermineWinnersCmd
id
- Long - Bid rule idpublic void setErrorTaskName(java.lang.String errorTaskName)
setErrorTaskName
in interface DetermineWinnersCmd
errorTaskName
- java.lang.Stringpublic void setQuantityOnAuction(java.lang.Double quantity)
setQuantityOnAuction
in interface DetermineWinnersCmd
quantity
- Double - Quantity available for auction.public void setWinners(java.util.Vector newWinners)
setWinners
in interface DetermineWinnersCmd
newWinners
- java.util.Vectorpublic static java.lang.String traceBid(com.ibm.commerce.negotiation.commands.BidDataLight bid)
bid
- BidDataLight
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |