com.ibm.commerce.negotiation.commands
Class CheckBidderStatusCmdImpl

com.ibm.commerce.negotiation.commands.CheckBidderStatusCmdImpl
All Implemented Interfaces:
CheckBidderStatusCmd, ECCommand

public class CheckBidderStatusCmdImpl
implements CheckBidderStatusCmd

Checks the bidder status. Currently, we make sure that the the user (shopper) has viewed the auction rules.


Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from interface com.ibm.commerce.negotiation.commands.CheckBidderStatusCmd
defaultCommandClassName, NAME
 
Constructor Summary
CheckBidderStatusCmdImpl()
          CheckBidderStatusImpl constructor.
 
Method Summary
 java.lang.Long getAuctionReferenceNumber()
          Returns the auction reference number for which a bidder status is being checked.
protected  void handleException(java.lang.Exception e)
          Formats an ECException based on the input exception value.
 boolean hasSeenAuctionRules()
          Returns a flag which indicates whether the user has viewed the current auction rules.
 boolean isReadyToCallExecute()
          Verifies that the this command is ready to be executed.
 void performExecute()
          Check if the user has seen the auction rules.
 void setAuctionReferenceNumber(java.lang.Long auctionReferenceNumber)
          Sets the Auction Reference Number.
 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, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

CheckBidderStatusCmdImpl

public CheckBidderStatusCmdImpl()
CheckBidderStatusImpl constructor.
Method Detail

getAuctionReferenceNumber

public java.lang.Long getAuctionReferenceNumber()
Returns the auction reference number for which a bidder status is being checked.
Returns:
Long - Auction reference number

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

hasSeenAuctionRules

public boolean hasSeenAuctionRules()
Returns a flag which indicates whether the user has viewed the current auction rules.
Specified by:
hasSeenAuctionRules in interface CheckBidderStatusCmd
Returns:
boolean - true if auction rules have been displayed before to the user, otherwise false.

isReadyToCallExecute

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

performExecute

public void performExecute()
                    throws ECException
Check if the user has seen the auction rules. if the auction rules has not been viewed yet, then the proper flag value so callers will handle displaying the rules page.
Specified by:
performExecute in interface ECCommand
Throws:
com.ibm.commerce.command.CommandException - - Error retrieving auction-user interaction info from the base.

setAuctionReferenceNumber

public void setAuctionReferenceNumber(java.lang.Long auctionReferenceNumber)
Sets the Auction Reference Number.
Specified by:
setAuctionReferenceNumber in interface CheckBidderStatusCmd
Parameters:
auctionReferenceNumber - Long - Auction reference number.

setErrorTaskName

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