com.ibm.commerce.negotiation.commands
Class ProcessTaskCmdImpl

com.ibm.commerce.negotiation.commands.ProcessTaskCmdImpl
All Implemented Interfaces:
ECCommand, ProcessTaskCmd
Direct Known Subclasses:
AutoBidsTaskCmdImpl, DutchBidsTaskCmdImpl, OpenCryBidsTaskCmdImpl

public abstract class ProcessTaskCmdImpl
implements ProcessTaskCmd

Process Task Command implementation.


Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from interface com.ibm.commerce.negotiation.commands.ProcessTaskCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
Constructor Summary
ProcessTaskCmdImpl()
           
 
Method Summary
 java.util.Vector getActiveBids()
          Get the list of active bids for processing.
protected  AuctionAccessBean getAuction()
          Get the current auction Access Bean
protected  java.lang.Long getAuctionId()
          Get the current auction Id
protected  java.math.BigDecimal getDefaultBestBidValue()
          Get the defualt best bid value.
protected  int getDefaultBidCount()
          Get the default number of bids to be retrieved.
protected  java.lang.String getErrorTaskName()
          returns error task name that will be returned by the exceptions.
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 reset()
          Resets this command to allow for future reuse.
protected  void setActiveBids(java.util.Vector bids)
          Sets the list of active bids to be processed.
 void setDataHandle(java.lang.Object handle)
          Set the handle for the data.
 void setErrorTaskName(java.lang.String errorTaskName)
          Set error task name that will be returned by the exceptions.
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

ProcessTaskCmdImpl

public ProcessTaskCmdImpl()
Method Detail

getActiveBids

public java.util.Vector getActiveBids()
Get the list of active bids for processing.
Returns:
java.util.Vector

getAuction

protected AuctionAccessBean getAuction()
                                throws ECException
Get the current auction Access Bean
Returns:
Long - Current Auction Access Bean

getAuctionId

protected java.lang.Long getAuctionId()
Get the current auction Id
Returns:
Long - Current auction Id

getDefaultBestBidValue

protected java.math.BigDecimal getDefaultBestBidValue()
Get the defualt best bid value. This method is used if the auction's Lowest Winning Bid has not been set.
Returns:
BigDecimal - Default Best Bid value.

getDefaultBidCount

protected int getDefaultBidCount()
Get the default number of bids to be retrieved.
Returns:
int - number of bids. -1 implies all bids.

getErrorTaskName

protected java.lang.String getErrorTaskName()
returns error task name that will be returned by the exceptions.
Returns:
java.lang.String - Error task name

handleException

protected void handleException(java.lang.Exception e)
                        throws ECException
Formats an ECException based on the input exception value.
Parameters:
e - Exception - The exception instance to be formatted.
Throws:
com.ibm.commerce.command.CommandException - - could be one of many diffrenet exceptions: ECApplicationException. RemoteException, NullPointerException, CreateException, FinderException, or NamingException.

isReadyToCallExecute

public boolean isReadyToCallExecute()
Verifies that the this command is ready to be executed.
Returns:
boolean =true if command is ready, otherwise false.

reset

public void reset()
Resets this command to allow for future reuse.

setActiveBids

protected void setActiveBids(java.util.Vector bids)
Sets the list of active bids to be processed.
Parameters:
bids - Vector - Active bids list

setDataHandle

public void setDataHandle(java.lang.Object handle)
Set the handle for the data. The handle type varies based on the requirement of the user of this class.
Specified by:
setDataHandle in interface ProcessTaskCmd
Parameters:
handle - Object - A handle to the auction data to be processed.

setErrorTaskName

public void setErrorTaskName(java.lang.String errorTaskName)
Set error task name that will be returned by the exceptions.
Specified by:
setErrorTaskName in interface ProcessTaskCmd
Parameters:
errorTaskName - java.lang.String