com.ibm.commerce.negotiation.commands
Class AutoBidSubmitCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.negotiation.commands.BidSubmitCmdImpl
                          |
                          +--com.ibm.commerce.negotiation.commands.AutoBidSubmitCmdImpl
All Implemented Interfaces:
AccCommand, AutoBidSubmitCmd, BidSubmitCmd, ControllerCommand, ECCommand, ECTargetableCommand

public class AutoBidSubmitCmdImpl
extends BidSubmitCmdImpl
implements AutoBidSubmitCmd

Auto Bid Submit Command Implementation.


Redirect to URL when executed completely Otherwise to Error View AutoBidSubmitErrorView This command calls the following TaskCommands: This command uses the following AccessBeans:
See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright statement.
static java.lang.String EC_AUTOBID_SUBMIT_ERROR_VIEW_CMD
          AutoBidSubmitCmd default Error View
 
Fields inherited from class com.ibm.commerce.negotiation.commands. BidSubmitCmdImpl
EC_BID_EVALUATED, EC_BID_SUBMIT_ERROR_VIEW_CMD
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.negotiation.commands. AutoBidSubmitCmd
defaultCommandClassName, NAME
 
Constructor Summary
AutoBidSubmitCmdImpl()
          AutoBidSubmitCmdImpl default constructor.
 
Method Summary
protected  AutoBidAccessBean getAutoBid()
          Returns the new AutoBid object.
protected  java.math.BigDecimal getAutoBidUpperLimit()
          Returns the auto bid upper limit value
 boolean isReadyToCallExecute()
          Verifies that the this command is ready to be executed.
 void performExecute()
          Executes the auto bid submit task.
 void reset()
          This resets the output properties to the values they had prior to calling the execute method, so that the get methods no longer work but the isReadyToCallExecute returns true.
protected  void setAutoBid(AutoBidAccessBean abAutoBid)
          Sets the Best AutoBid object of current Auction.
protected  void setAutoBidUpperLimit(java.math.BigDecimal autoBidUpperLimit)
          Sets the auto bid upper limit value.
 void setRequestProperties( TypedProperty requestParam)
          Saves the Mandatory and optional command parameter values.
 void validateParameters()
          This is where parameter checking is done.
protected  void validateUpperLimit(java.lang.Long bidId)
          Checks the auto bid upper limit value to be higher or equal to the current value for the bid previously generated on behalf of the auto bid.
 
Methods inherited from class com.ibm.commerce.negotiation.commands. BidSubmitCmdImpl
checkBidControlRules, deductBidDeposit, encryptPaymentInfo, getAccessVector, getAuction, getAuctionReferenceNumber, getBestAutoBid, getBestBid, getBestBidBigDeciaml, getBestBidValue, getBid, getBidActionType, getBidActionValue, getBidCreateTime, getBidQuantity, getBidReferenceKey, getBidType, getBidValue, getBillAddrReferenceNumber, getDeviceExpirationPeriod, getDeviceNumber, getEncryptedPaymentInfo, getFormattedMonetaryAmountValue, getLocalErrorTaskName, getNVPairs, getPartialDeviceNumber, getPaymentInfoString, getPaymentSelectionIndex, getRedirectUrl, getRequestProp, getResources, getShipAddrReferenceNumber, getShipModeReferenceNumber, handleException, initBidData, isBidderQualified, isDeductionAuthorized, isPartialQuantityAccepted, isValidAddress, isValidShippingMode, saveRequestProp, setAccessVector, setAuction, setAuctionReferenceNumber, setBestAutoBid, setBestBid, setBestBidValue, setBid, setBidActionType, setBidActionValue, setBidCreateTime, setBidQuantity, setBidReferenceKey, setBidType, setBidValue, setBidValue, setBillAddrReferenceKey, setDeductionAuthorized, setEncryptedPaymentInfo, setLocalErrorTaskName, setNVPairs, setPartialQuantityAccepted, setPaymentInfoString, setPaymentSelectionIndex, setRedirectUrl, setShipAddrReferenceKey, setShipModeReferenceKey, updateAuctionGallery, validateBidReferenceNumber, validateCreditCard, validBidderStatus
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
Copyright statement.
See Also:
Constant Field Values

EC_AUTOBID_SUBMIT_ERROR_VIEW_CMD

public static final java.lang.String EC_AUTOBID_SUBMIT_ERROR_VIEW_CMD
AutoBidSubmitCmd default Error View
See Also:
Constant Field Values
Constructor Detail

AutoBidSubmitCmdImpl

public AutoBidSubmitCmdImpl()
AutoBidSubmitCmdImpl default constructor.
Method Detail

getAutoBid

protected AutoBidAccessBean getAutoBid()
Returns the new AutoBid object.
Returns:
AutoBidAccessBean

setAutoBid

protected void setAutoBid(AutoBidAccessBean abAutoBid)
Sets the Best AutoBid object of current Auction.
Parameters:
abAutoBid - AutoBidAccessBean - AutoBid object.

getAutoBidUpperLimit

protected java.math.BigDecimal getAutoBidUpperLimit()
Returns the auto bid upper limit value
Returns:
BigDecimal - Bid value

setAutoBidUpperLimit

protected void setAutoBidUpperLimit(java.math.BigDecimal autoBidUpperLimit)
Sets the auto bid upper limit value.

isReadyToCallExecute

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

performExecute

public void performExecute()
                    throws ECException
Executes the auto bid submit task.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class BidSubmitCmdImpl
Throws:
ECException - is thrown if anything goes wrong.

setRequestProperties

public void setRequestProperties(TypedProperty requestParam)
                          throws ECApplicationException
Saves the Mandatory and optional command parameter values.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class BidSubmitCmdImpl
Parameters:
requestParam - request properties
Throws:
ECApplicationException: - An exception is returned if any of the mandatory parameters are missing, or invalid
ECApplicationException

validateUpperLimit

protected void validateUpperLimit(java.lang.Long bidId)
                           throws ECException
Checks the auto bid upper limit value to be higher or equal to the current value for the bid previously generated on behalf of the auto bid.
Parameters:
bidId - Long - The Id for the bid that was generated on behalf of the auto bid.
Throws:
ECException - - Invalid upper limit value.

reset

public void reset()
This resets the output properties to the values they had prior to calling the execute method, so that the get methods no longer work but the isReadyToCallExecute returns true. It provides a convenient and efficient way to reuse the same command instance with changes in some input properties or in the CommandTarget.
Overrides:
reset in class BidSubmitCmdImpl

validateParameters

public void validateParameters()
                        throws ECException
This is where parameter checking is done. This method replaces checkParameters() in 5.1. The default implementation of validateParameters() is a no op. It is the responsibility of the command writers to implements this method if they want to perform server side parameter checking.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class BidSubmitCmdImpl
Throws:
ECException.
ECException