|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.commerce.negotiation.commands.BidSubmitCmdImpl
Bid Submit Implementation
Field Summary | |
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
EC_BID_SUBMIT_ERROR_VIEW_CMD
|
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 java.lang.Long |
getAuctionReferenceNumber()
Returns the auction reference number for which a bid is being submitted. |
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 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. |
protected void |
saveRequestProp(TypedProperty reqProp)
Saves current request properties |
protected void |
setAuctionReferenceNumber(java.lang.String auctionReferenceKey)
Sets the auction reference number for which a bid is being submitted. |
protected void |
setBestBidValue(java.math.BigDecimal bestBidVal)
Set the current auction best bid value |
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. |
protected boolean |
validBidderStatus()
Checks that the bidder status is valid for the current auction. |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
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, setAccCheck, setForUserId, setOwner |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Methods inherited from interface com.ibm.commerce.security.Protectable |
fulfills, getOwner |
Field Detail |
public static final java.lang.String COPYRIGHT
public static final java.lang.String EC_BID_SUBMIT_ERROR_VIEW_CMD
Constructor Detail |
public BidSubmitCmdImpl()
Method Detail |
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.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, ECApplicationException, ECSystemException
amt
- java.math.BigDecimalECApplicationException
- The exception description.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
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()
protected boolean isValidAddress(java.lang.Long addressRefNum) throws ECException
billAddrRefKey
- String - String representation for billing address reference keyInvalidParameterValueException
- - Throws an exception if the billing address reference number is not numeric.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
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 numberInvalidParameterValueException
- - 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 quantityInvalidParameterValueException
- - 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 keyInvalidParameterValueException
- - 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.math.BigDecimal bidValue)
bidValue
- BigDecimalprotected void setBidValue(java.lang.String bidValue) throws InvalidParameterValueException
bidValue
- String - String representation for bid valueInvalidParameterValueException
- - Throws an exception if the bid value is empty,
has all blank characters, or negative.protected void setBillAddrReferenceKey(java.lang.String billAddrRefKey) throws InvalidParameterValueException
Long
- addressRefNum - Shipping/Billing address reference number.ECException
- - Encountered a data base error during shipping/billing
address entry lookup.protected void setDeductionAuthorized(java.lang.String flag) throws InvalidParameterValueException
flag
- StringInvalidParameterValueException
- - 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.Stringpublic void setPaymentSelectionIndex(java.lang.String newPaymentSelectionIndex)
newPaymentSelectionIndex
- intprotected void setRedirectUrl(java.lang.String url) throws InvalidParameterValueException
url
- String - url stringInvalidParameterValueException
- - Throws an exception if the url string contains
only blank characters.public void setRequestProperties(TypedProperty requestParam) throws ECApplicationException
setRequestProperties
in interface ControllerCommand
TypedPropery
- requestParam - Request propertiesECApplicationException:
- An exception is returned
if any of the mandatory parameters are missing, or invalidprotected void setShipAddrReferenceKey(java.lang.String shipAddrRefKey) throws InvalidParameterValueException
shipAddrRefKey
- String - String representation for shipping address reference keyInvalidParameterValueException
- - Throws an exception if the shipping address reference number is not numeric.protected void setShipModeReferenceKey(java.lang.String shipModeRefKey) throws InvalidParameterValueException
shipModeRefNum
- String - String representation for shipping mode reference keyInvalidParameterValueException
- - 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.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |