com.ibm.commerce.negotiation.commands
Class ProcessTaskCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.negotiation.commands.ProcessTaskCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, ProcessTaskCmd, TaskCommand
Direct Known Subclasses:
AutoBidsTaskCmdImpl, DutchBidsTaskCmdImpl, OpenCryBidsTaskCmdImpl

public abstract class ProcessTaskCmdImpl
extends TaskCommandImpl
implements ProcessTaskCmd

Process Task Command implementation.

See Also:
Serialized Form

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. 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 class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, 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
Copyright statement.
See Also:
Constant Field Values
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
Throws:
ECException - - Error looking up auction

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:
CommandException - - could be one of many diffrenet exceptions: ECApplicationException. RemoteException, NullPointerException, CreateException, FinderException, or NamingException.
ECException

isReadyToCallExecute

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

reset

public void reset()
Resets this command to allow for future reuse.
Overrides:
reset in class AbstractECTargetableCommand

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