java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.ControllerCommandImpl | +--com.ibm.commerce.negotiation.commands.BidSubmitCmdImpl
Bid Submit Implementation Redirect to URL when executed completely Otherwise to Error View BidSubmitErrorView This command calls the following TaskCommands:
CheckBidControlCmd
DoDepositPaymentCmd
DataCryptCmd
CheckBidderQualificationCmd
EvaluateSingleQuantityOpenCryBidCmd
CheckGenBidRefCmd
CheckCCNumberCmd
CheckBidderStatusCmd
CheckBidUpdateAuthorizationCmd
AuctionAccessBean
AutoBidAccessBean
BidAccessBean
ControlRuleAccessBean
MemberAuctionRelationAccessBean
ShippingModeAccessBean
StoreAccessBean
AddressAccessBean
AddressBookAccessBean
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT Copyright statement. |
static java.lang.String |
EC_BID_EVALUATED Constant to indicate bid has been evaluated |
static java.lang.String |
EC_BID_SUBMIT_ERROR_VIEW_CMD BidSubmitCmd default Error View |
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. BidSubmitCmd |
defaultCommandClassName,
NAME |
Constructor Summary | |
---|---|
BidSubmitCmdImpl() BidSubmitImpl default constructor. |
Method Summary | |
---|---|
protected
void |
checkBidControlRules(AuctionAccessBean auction,
java.math.BigDecimal value) Verifies that the current bid/autobid value complies with the associated bid rules. |
protected
void |
deductBidDeposit(java.math.BigDecimal auctionDeposit,
BidAccessBean bid) Creates/Updates a bid payment deposit entry. |
protected
java.lang.String |
encryptPaymentInfo() Encrypts the user's device number. |
protected
AccessVector |
getAccessVector() Returns the AccessVector object. |
protected
AuctionAccessBean |
getAuction() Returns the bidding Auction object. |
protected
java.lang.Long |
getAuctionReferenceNumber() Returns the auction reference number for which a bid is being submitted. |
protected
AutoBidAccessBean |
getBestAutoBid() Returns the Best Auto Bid object of current Auction. |
protected
BidAccessBean |
getBestBid() Returns the Best Bid object of current Auction. |
protected
java.math.BigDecimal |
getBestBidBigDeciaml() Get the current auction best bid value. |
protected
java.lang.String |
getBestBidValue() Get the current auction best bid value. |
protected
BidAccessBean |
getBid() Returns the new Bid object. |
protected
java.lang.String |
getBidActionType() Returns the current bid action type. |
protected
java.lang.String |
getBidActionValue() Returns the current bid action value |
protected
java.lang.String |
getBidCreateTime() Returns the time this bid was created. |
protected
java.lang.Double |
getBidQuantity() Returns the quantity being bid for. |
protected
java.lang.String |
getBidReferenceKey() Returns the reference key for the bid being submitted. |
protected
java.lang.String |
getBidType() Returns the current bid type. |
protected
java.math.BigDecimal |
getBidValue() Returns the value of the bid being submitted. |
protected
java.lang.Long |
getBillAddrReferenceNumber() Returns the bidder's billing address Id. |
int |
getDeviceExpirationPeriod() Get the Device (credit card) maximum expiration period. |
protected
java.lang.String |
getDeviceNumber() Returns the Payment Device Number. |
protected
java.lang.String |
getEncryptedPaymentInfo() Returns the Payment Encrypted Device Number. |
java.lang.String |
getFormattedMonetaryAmountValue(java.math.BigDecimal amt) Foramtting amount of currency. |
protected
java.lang.String |
getLocalErrorTaskName() Returns this command's error task name. |
protected
java.util.Hashtable |
getNVPairs() Returns a hash table of name-value pairs. |
protected
java.lang.String |
getPartialDeviceNumber(java.lang.String aNum) This method will replace all numbers with 'X' except the last 4 digits for a payment device longer than 4 digits to avoid exposing the whole number when transmitted through the Internet. |
java.lang.String |
getPaymentInfoString() Returns the payment information. |
java.lang.String |
getPaymentSelectionIndex() Returns the payment selection index. |
protected
java.lang.String |
getRedirectUrl() Returns url that will be called when the bid is successfully submitted. |
protected
TypedProperty |
getRequestProp() Returns current request properties. |
AccessVector |
getResources() This method returns the resources resources accessed by this command It will return null if no resource if being accessed by this command. |
protected
java.lang.Long |
getShipAddrReferenceNumber() Returns the shipping address reference number |
protected
java.lang.Integer |
getShipModeReferenceNumber() Returns the shipping mode reference number |
protected
void |
handleException(java.lang.Exception e) Formats an ECException based on the input exception value. |
protected
void |
initBidData(BidAccessBean bid) Initializes bid fields. |
protected
boolean |
isBidderQualified() Checks if current Bidder (user) is qualified to Bid on the current auction. |
protected
boolean |
isDeductionAuthorized() Returns whether the bidder allowed for money to be deducted. |
protected
boolean |
isPartialQuantityAccepted() Returns whether the bidder will accept a partial quantiy. |
boolean |
isReadyToCallExecute() Verifies that the this command is ready to be executed. |
protected
boolean |
isValidAddress(java.lang.Long addressRefNum) Sets the Billing Address reference key for which a bid is being submitted. |
protected
boolean |
isValidShippingMode() Determines if the specified merchant shipping mode is valid. |
void |
performExecute() Executes a 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 |
saveRequestProp(
TypedProperty reqProp) Saves current request properties |
protected
void |
setAccessVector(
AccessVector accessVector) Sets the AccessVector object. |
protected
void |
setAuction(AuctionAccessBean abAuction) Sets the bidding Auction object. |
protected
void |
setAuctionReferenceNumber(java.lang.String auctionReferenceKey) Sets the auction reference number for which a bid is being submitted. |
protected
void |
setBestAutoBid(AutoBidAccessBean abBestAutoBid) Sets the Best Auto Bid object of current Auction. |
protected
void |
setBestBid(BidAccessBean abBestBid) Sets the Best Bid object of current Auction. |
protected
void |
setBestBidValue(java.math.BigDecimal bestBidVal) Set the current auction best bid value |
protected
void |
setBid(BidAccessBean abBid) Sets the new Bid object. |
protected
void |
setBidActionType(java.lang.String type) Sets the current bid action type |
protected
void |
setBidActionValue(java.lang.String value) Sets the current action to be performed on the bid. |
protected
void |
setBidCreateTime(java.lang.String bidCreateTime) Sets the bid create time. |
protected
void |
setBidQuantity(java.lang.String bidQuantity) Sets the quantity being bid for. |
protected
void |
setBidReferenceKey(java.lang.String bidReferenceKey) Sets the reference key for the bid being submitted. |
protected
void |
setBidType(java.lang.String bidType) Sets the type of the bid being submitted. |
protected
void |
setBidValue(java.math.BigDecimal bidValue) Sets a new value for the bid. |
protected
void |
setBidValue(java.lang.String bidValue) Sets the value of the bid being submitted. |
protected
void |
setBillAddrReferenceKey(java.lang.String billAddrRefKey) Determines if the bidder's shipping/billing address is valid. |
protected
void |
setDeductionAuthorized(java.lang.String flag) Set the bidder's deduction authorization flag. |
protected
void |
setEncryptedPaymentInfo(java.lang.String encryptedDeviceNumber) Sets the bidder payment encrypted device number. |
protected
void |
setLocalErrorTaskName(java.lang.String errorTaskName) Sets this command's error task name |
void |
setNVPairs(java.util.Hashtable newNVPairs) Stores the incoming hashtable of name-value pairs. |
protected
void |
setPartialQuantityAccepted(java.lang.String flag) Set the bidder's partial quantity flag (optional). |
void |
setPaymentInfoString(java.lang.String newPaymentInfoString) Set payment info string. |
void |
setPaymentSelectionIndex(java.lang.String newPaymentSelectionIndex) Stores the incoming value of the payment selection index. |
protected
void |
setRedirectUrl(java.lang.String url) Sets the value for redirect url called upon successful bid submit. |
void |
setRequestProperties(
TypedProperty requestParam) Saves the Mandatory and optional command parameter values. |
protected
void |
setShipAddrReferenceKey(java.lang.String shipAddrRefKey) Sets the Shipping Address reference key for which a bid is being submitted. |
protected
void |
setShipModeReferenceKey(java.lang.String shipModeRefKey) Sets the Shipping Mode reference key for which a bid is being submitted. |
protected
void |
updateAuctionGallery() Adds the auction being bid on to the auction gallery, if not already there. |
protected
void |
validateBidReferenceNumber() Validate that the current bid reference number is valid. |
protected
void |
validateCreditCard() Validates the user's Credit Card number and expiration date. |
void |
validateParameters() This is where parameter checking is done. |
protected
boolean |
validBidderStatus() Checks that the bidder status is valid for the current auction. |
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,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String EC_BID_SUBMIT_ERROR_VIEW_CMD
public static final java.lang.String EC_BID_EVALUATED
Constructor Detail |
---|
public BidSubmitCmdImpl()
Method Detail |
---|
protected AccessVector getAccessVector()
protected void setAccessVector(AccessVector accessVector)
protected AuctionAccessBean getAuction()
protected void setAuction(AuctionAccessBean abAuction)
abAuction
- AuctionAccessBean - Auction
object.protected BidAccessBean getBid()
protected void setBid(BidAccessBean abBid)
abBid
- BidAccessBean - Bid object.protected BidAccessBean getBestBid()
protected void setBestBid(BidAccessBean abBestBid)
protected AutoBidAccessBean getBestAutoBid()
protected void setBestAutoBid(AutoBidAccessBean abBestAutoBid)
protected void checkBidControlRules(AuctionAccessBean auction, java.math.BigDecimal value) throws java.lang.Exception
auction
- AuctionAccessBean - Current auction beanvalue
- BigDecimal - Bid/Autobid value to be checked.ECException
- - thorws an exception if an error occurred while executing the
CheckBidControlCmd or the bid does not meet the bid control rule
conditions.java.lang.Exception
protected void deductBidDeposit(java.math.BigDecimal auctionDeposit, BidAccessBean bid) throws java.lang.Exception
auctionDeposit
- BigDecimalbid
- BidAccesBeanjava.lang.Exception
- The exception
description.protected java.lang.String encryptPaymentInfo() throws ECException
ECException
- - throws an exception if encountered during DataCryptCmd command
execution.protected java.lang.Long getAuctionReferenceNumber()
protected java.math.BigDecimal getBestBidBigDeciaml()
protected java.lang.String getBestBidValue()
protected java.lang.String getBidActionType()
protected java.lang.String getBidActionValue()
protected java.lang.String getBidCreateTime()
protected java.lang.Double getBidQuantity()
protected java.lang.String getBidReferenceKey()
protected java.lang.String getBidType()
protected java.math.BigDecimal getBidValue()
protected java.lang.Long getBillAddrReferenceNumber()
public int getDeviceExpirationPeriod()
protected java.lang.String getDeviceNumber()
protected java.lang.String getEncryptedPaymentInfo()
public java.lang.String getFormattedMonetaryAmountValue(java.math.BigDecimal amt) throws ECException
amt
- java.math.BigDecimal
ECApplicationException
- The exception description.ECException
protected java.lang.String getLocalErrorTaskName()
protected java.util.Hashtable getNVPairs()
protected java.lang.String getPartialDeviceNumber(java.lang.String aNum)
aNum
- java.lang.Stringpublic java.lang.String getPaymentInfoString()
public java.lang.String getPaymentSelectionIndex()
protected java.lang.String getRedirectUrl()
protected TypedProperty getRequestProp()
public AccessVector getResources() throws ECException
getResources
in interface
ECCommand
getResources
in class
AbstractECTargetableCommand
ECException
protected java.lang.Long getShipAddrReferenceNumber()
protected java.lang.Integer getShipModeReferenceNumber()
protected void handleException(java.lang.Exception e) throws ECException
e
- Exception - The exception instance to be formatted.ECException
- - could be one of many diffrenet exceptions: ECApplicationException.
RemoteException, CreateException, FinderException, or
NamingException.protected void initBidData(BidAccessBean bid) throws ECException
bid
- BidAccessBean - Referes to the bid bean to be
initialized.ECException
- - Invalid data was used to set the bean fields.protected boolean isBidderQualified() throws ECException
ECException
- - thorws an exception if an error occurred while executing the bidder
qualification task.protected boolean isDeductionAuthorized()
protected boolean isPartialQuantityAccepted()
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class
AbstractECTargetableCommand
protected boolean isValidAddress(java.lang.Long addressRefNum) throws ECException
InvalidParameterValueException
- - Throws an exception if the
billing address reference number is not numeric.ECException
protected boolean isValidShippingMode() throws ECException
ECException
- - Encountered a data base error during shipping mode entry
lookup.public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- is thrown if anything goes wrong.protected void saveRequestProp(TypedProperty reqProp)
reqProp
-
com.ibm.commerce.datatype.TypedPropertyprotected void setAuctionReferenceNumber(java.lang.String auctionReferenceKey) throws InvalidParameterValueException
auctionReferenceKey
- String - String representation for
auction reference number
InvalidParameterValueException
- - Throws an exception if the
auction reference number is not numeric.protected void setBestBidValue(java.math.BigDecimal bestBidVal)
bestBidVal
- BigDecimal - Best Bid Valueprotected void setBidActionType(java.lang.String type)
type
- String - Bid Action Typeprotected void setBidActionValue(java.lang.String value)
value
- String - Bid Action valueprotected void setBidCreateTime(java.lang.String bidCreateTime)
bidCreateTime
- String - String representation for bid
creation time in JDBC timestamp escape format (yyyy-mm-dd
hh:mm:ss.fffffffff)protected void setBidQuantity(java.lang.String bidQuantity) throws InvalidParameterValueException
bidQuantity
- String - String representation for bid
quantity
InvalidParameterValueException
- - Throws an exception if the bid
quantity is empty, has all blank characters, or not
positiveprotected void setBidReferenceKey(java.lang.String bidReferenceKey) throws InvalidParameterValueException
bidReferenceKey
- String - String representation for bid
reference key
InvalidParameterValueException
- - Throws an exception if the bid
reference key is empty or has all blank characters.protected void setBidType(java.lang.String bidType)
bidType
- java.lang.String - Regular or Auto bid
type.protected void setBidValue(java.lang.String bidValue) throws InvalidParameterValueException
bidValue
- String - String representation for bid value
InvalidParameterValueException
- - Throws an exception if the bid
value is empty, has all blank characters, or negative.protected void setBidValue(java.math.BigDecimal bidValue)
bidValue
- BigDecimalprotected void setBillAddrReferenceKey(java.lang.String billAddrRefKey) throws InvalidParameterValueException
ECException
- - Encountered a data base error during shipping/billing address entry
lookup.
InvalidParameterValueException
protected void setDeductionAuthorized(java.lang.String flag) throws InvalidParameterValueException
flag
- String
InvalidParameterValueException
- - throws an exception if the
deduction authorization flag is not enabled, or has an invalid
value.protected void setEncryptedPaymentInfo(java.lang.String encryptedDeviceNumber)
encryptedDeviceNumber
- String - String representation for
payment encrypted device numberprotected void setLocalErrorTaskName(java.lang.String errorTaskName)
errorTaskName
- java.lang.Stringpublic void setNVPairs(java.util.Hashtable newNVPairs)
newNVPairs
- java.util.Hashtableprotected void setPartialQuantityAccepted(java.lang.String flag)
flag
- String - Partial quantity flag
valuepublic void setPaymentInfoString(java.lang.String newPaymentInfoString) throws InvalidParameterValueException
newPaymentInfoString
- java.lang.String
InvalidParameterValueException
- - if newPaymentInfoString is null
or is an empty stringpublic void setPaymentSelectionIndex(java.lang.String newPaymentSelectionIndex)
newPaymentSelectionIndex
- intprotected void setRedirectUrl(java.lang.String url) throws InvalidParameterValueException
url
- String - url string
InvalidParameterValueException
- - Throws an exception if the url
string contains only blank characters.public void setRequestProperties(TypedProperty requestParam) throws ECApplicationException
setRequestProperties
in interface
ControllerCommand
setRequestProperties
in class
ControllerCommandImpl
requestParam
- request propertiesECApplicationException:
- An exception is returned if any of
the mandatory parameters are missing, or invalid
ECApplicationException
protected void setShipAddrReferenceKey(java.lang.String shipAddrRefKey) throws InvalidParameterValueException
shipAddrRefKey
- String - String representation for shipping
address reference key
InvalidParameterValueException
- - Throws an exception if the
shipping address reference number is not numeric.protected void setShipModeReferenceKey(java.lang.String shipModeRefKey) throws InvalidParameterValueException
InvalidParameterValueException
- - Throws an exception if the
shipping mode reference key is not numeric.protected void updateAuctionGallery() throws ECException
ECException
- - On error looking up the auction in the member-auction-relation table,
creating a new entry in the same tableprotected void validateBidReferenceNumber() throws ECException
ECException
- - thorws an exception if an error occurred while executing the check bid
reference number task, when bid reference number is
invalid.protected void validateCreditCard() throws ECException
ECException
- - throws an exception if encountered during CheckCCNumberCmd command
execution.protected boolean validBidderStatus() throws ECException
ECException
- - An exception is thrown if encountered an while showing the bidder the
auction rules.public void reset()
reset
in class
AbstractECTargetableCommand
public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException.
ECException