java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.negotiation.commands.CalculateBestBidCmdImpl
Calculates the Highest Winning Bid and Lowest Winning Bid (aka Best Bid).
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT Copyright statement. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.negotiation.commands. CalculateBestBidCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CalculateBestBidCmdImpl() CalculateBestBidCmdImpl default constructor. |
Method Summary | |
---|---|
java.lang.Long |
getHighestWinningBid() Gets the highest winning bid id for the specified auction. |
java.lang.Long |
getLowestWinningBid() Gets the lowest winning bid (a.k.a Best Bid) id for the specified auction |
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() Determines the current highest and lowest winning bids for the specified auction. |
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 |
setAuctionId(java.lang.Long id) Sets the current auction Id value, |
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. |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public CalculateBestBidCmdImpl()
Method Detail |
---|
public java.lang.Long getHighestWinningBid()
getHighestWinningBid
in interface
CalculateBestBidCmd
public java.lang.Long getLowestWinningBid()
getLowestWinningBid
in interface
CalculateBestBidCmd
protected void handleException(java.lang.Exception e) throws ECException
e
- Exception - The exception instance to be formatted.CommandException
- - could be one of many diffrenet
exceptions: ECApplicationException. RemoteException, NullPointerException,
CreateException, FinderException, or NamingException.ECException
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class
AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
reset
in class
AbstractECTargetableCommand
public void setActiveBids(java.util.Vector bids)
setActiveBids
in interface
CalculateBestBidCmd
bids
- Vector - Active bids listpublic void setAuctionId(java.lang.Long id)
setAuctionId
in interface
CalculateBestBidCmd
id
- Long - Auction Idpublic void setErrorTaskName(java.lang.String errorTaskName)
setErrorTaskName
in interface
CalculateBestBidCmd
errorTaskName
- java.lang.Stringpublic void setQuantityOnAuction(java.lang.Double quantity)
setQuantityOnAuction
in interface
CalculateBestBidCmd
quantity
- Double - Quantity available for
auction.