java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.negotiation.commands.AuctionTaskBaseCmdImpl
Base class for auction administration task commands. This command calls the following Commands:
This command uses the following AccessBeans:CatalogEntryAccessBean
StoreAccessBean
AuctionAccessBean
ControlRuleAccessBean
Field Summary | |
---|---|
protected
AuctionAccessBean |
auctionAccessBean The access bean representing the auction. |
protected
java.lang.Long |
auctionReferenceNumber The auction's Id (aka identifier). |
protected
java.lang.String |
auctionType The access bean representing the auction. |
protected
boolean |
bidRuleExist The bid rule validity variable (default false). |
protected
java.lang.Long |
bidRuleId The bid rule Id. |
protected
int |
closeType The auction close type. |
static java.lang.String |
COPYRIGHT Copyright statement. |
protected
java.lang.String |
currency The currency type for the auction. |
protected
java.math.BigDecimal |
currentAskPrice The Dutch auction's current ask price. |
protected
java.lang.Double |
currentAvailableQuantity The current available quantity for an auction. |
protected
java.sql.Timestamp |
currentTimeStamp The current time stamp |
protected
java.math.BigDecimal |
deposit The deposit required by the auction. |
protected
java.lang.Integer |
durationDays The duration days related to auction closing rule. |
protected
java.sql.Timestamp |
durationTimeStamp The auction's duration time. |
protected
java.sql.Timestamp |
endTime The auction's end time |
protected
java.lang.Integer |
fulfillmentCenterId The fulfillment center Id. |
protected
java.lang.Integer |
languageId The language Id. |
protected
java.util.Hashtable |
longDescriptions The long description for the auction. |
protected
java.lang.Long |
ownerId The auction's owner Id. |
protected
java.lang.String |
pricingRuleType The Get auction's pricing rule type. |
protected
java.lang.String |
productDisplayPage The product display page. |
protected
java.lang.Long |
productId The product (aka catalog entry) Id. |
protected
java.lang.Double |
quantity The current available quantity for an auction. |
protected
java.lang.Long |
reservationId The reservation identifier. |
protected
java.math.BigDecimal |
reservePrice The reserve price. |
protected
java.lang.String |
ruleDisplayPage The auction's rule display page. |
protected
java.util.Hashtable |
shortDescriptions The auction's short desciption. |
protected
java.math.BigDecimal |
startPrice The Dutch auction's openning price. |
protected
java.sql.Timestamp |
startTime The auction's start time |
protected
java.lang.String |
status The auction's status. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.negotiation.commands. AuctionTaskBaseCmd |
AUCTION_BASE_TIMESTAMP,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
AuctionTaskBaseCmdImpl() AuctionTaskBaseCmdImpl default constructor. |
Method Summary | |
---|---|
protected
static java.sql.Timestamp |
addTimestamp(java.sql.Timestamp t1, java.sql.Timestamp t2) Utility method to add two timestamps. |
protected
int |
checkBidRule() Validate the bid rule. |
static int |
compareUptoMinute(java.sql.Timestamp time1,
java.sql.Timestamp time2) Compare two timestamps up to the minute level. |
protected
java.sql.Timestamp |
dayChangeInTimestamp(java.sql.Timestamp t1,
int dayChanged) returns a new timestamp of the original timestamp with an increment of the specified days. |
com.ibm.commerce.negotiation.objects.AuctionAccessBean |
getAuction() Returns the access bean representing the auction. |
java.lang.Long |
getAuctionReferenceNumber() Gets auction's Id (aka identifier). |
java.lang.String |
getAuctionType() Returns the auction type. |
protected
java.sql.Timestamp |
getBaseTimeStamp() Returns the base timestamp. |
java.lang.Long |
getBidRuleId() Returns the bid rule Id. |
int |
getCloseType() Gets the auction's closing type. |
java.lang.String |
getCurrency() Get the currency type for the auction. |
java.math.BigDecimal |
getCurrentAskPrice() Get Dutch auction's current ask price. |
java.lang.Double |
getCurrentAvailableQuantity() Gets the current available quantity for an auction. |
protected
java.sql.Timestamp |
getCurrentTimeStamp() Gets current time stamp. |
java.math.BigDecimal |
getDeposit() Gets deposit required by the auction. |
java.lang.Integer |
getDurationDays() Get duration days related to auction closing rule. |
protected
java.sql.Timestamp |
getDurationTimeStamp() Get duration time stamp. |
java.sql.Timestamp |
getEndTime() Gets auction's end time. |
java.util.Hashtable |
getErrorContent() Get error hashtable. |
boolean |
getErrorFlag() Get error flag. |
java.lang.Integer |
getFulfillmentCenterId() get fulfillment center Id. |
protected
java.lang.Integer |
getFulfillmentCenterId(java.lang.Long catId,
java.lang.Double quantity) Resolves fulfill center base on product Id and allocation quantity. |
java.lang.Integer |
getLanguageId() Get language Id. |
java.lang.String |
getLongDescription(java.lang.Integer langid) Get long description for the auction. |
protected
java.lang.String |
getMerchantCurrency(java.lang.Integer anMerchantNum) Get the default currency type for the given store. |
java.lang.Long |
getOwnerId() Gets auction's owner Id. |
java.lang.String |
getPricingRuleType() Get auction's pricing rule type. |
java.lang.String |
getProductDisplayPage() Gets product display page. |
java.lang.Long |
getProductId() Get product (aka catalog entry) Id. |
java.lang.Double |
getQuantity() Gets Auction quantity. |
java.lang.Long |
getReservationId() Returns the reservation identifier. |
java.math.BigDecimal |
getReservePrice() Returns reserve price. |
java.lang.String |
getRuleDisplayPage() Gets auction's rule display page. |
java.lang.String |
getShortDescription(java.lang.Integer langid) Gets auction's short desciption. |
java.math.BigDecimal |
getStartPrice() Get Dutch auction's openning price. |
java.sql.Timestamp |
getStartTime() Gets auction's start time. |
protected
java.lang.String |
getStatus() Get auction's status. |
protected
java.sql.Timestamp |
getUpdatedEndTimestamp() Calculates what is the ending time based on auction rule type. |
protected
boolean |
inventoryUpdate(java.lang.Long catId,
java.lang.Double qua) Reserves inventory for the auction. |
boolean |
isErrorFlag() Gets error flag. |
boolean |
isReadyToCallExecute() Is ready to call Execute method. |
void |
performExecute() Execute the command. |
void |
reset() reset the parameters.. |
void |
saveDescriptions() Saves the short and long descriptions for the auction. |
void |
setAuctionType(java.lang.String s) Set auction type for the command. |
void |
setBidRuleId(java.lang.Long br_id) Stores the identifier of the bid control rule used by the auction. |
void |
setCloseType(int aType) Stores an integer representing the auction close type. |
void |
setCurrency(java.lang.String newCurrency) Sets the currency type for the auction. |
void |
setCurrentAskPrice(java.math.BigDecimal aPrice) Stores the current asking price for the item on a Dutch auction. |
void |
setCurrentAvailableQuantity(java.lang.Double q) Set current available quantity. |
void |
setDeposit(java.math.BigDecimal amount) Stores the value of the deposit that should accompany each bid for the auction. |
void |
setDurationDays(java.lang.Integer days) Saves the number of days between successive bids for which the auction will be active. |
void |
setDurationTime(java.lang.Integer hours,
java.lang.Integer minutes) Set up the duration timestamp based on hours and minutes. |
void |
setDurationTimestamp(java.sql.Timestamp newDurationTimeStamp) Set duration timestamp |
void |
setEndTime(java.sql.Timestamp newEndTimeStamp) Set auction end date timestamp. |
void |
setErrorContent(java.util.Hashtable newErrorContent) Set error content hashtable. |
void |
setErrorFlag(boolean newErrorFlag) Set error flag. |
void |
setFulfillmentCenterId(java.lang.Integer newFulfillmentCenterId) Set fullfillment center id. |
void |
setLanguageId(java.lang.Integer id) Sets language id. |
void |
setLongDescription(java.lang.Integer langid,
java.lang.String ld) Stores the long description for the auction for the specified language. |
void |
setOwnerId(java.lang.Long id) Sets auction owner Id. |
void |
setPricingRuleType(java.lang.String s) Stores the pricing rule for the auction. |
void |
setProductDisplayPage(java.lang.String s) Stores the path and name of the product display page. |
void |
setProductId(java.lang.Long theId) Set product (aka catalog entry) Id. |
protected
void |
setProductOnAuction(java.lang.Integer i) set auction flag in catentry table |
void |
setQuantity(java.lang.Double q) Set auction quantity. |
void |
setReservationId(java.lang.Long newReservationId) Stores the identifier for the reservation. |
void |
setReservePrice(java.math.BigDecimal aPrice) Set reserve price. |
void |
setRuleDisplayPage(java.lang.String s) Stores the path and name of the web page that displays the auction rules. |
void |
setShortDescription(java.lang.Integer langid,
java.lang.String s) Stores the short description for the specified language. |
void |
setStartPrice(java.math.BigDecimal newStartPrice) Stores the starting price for the Dutch auction. |
void |
setStartTime(java.sql.Timestamp s) Stores the starting date and time for the auction. |
protected
void |
setStatus(java.lang.String newStatus) Set auction status. |
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,
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
protected java.math.BigDecimal currentAskPrice
protected java.lang.Double currentAvailableQuantity
protected java.math.BigDecimal deposit
protected java.sql.Timestamp endTime
protected java.lang.Double quantity
protected java.math.BigDecimal startPrice
protected java.sql.Timestamp startTime
protected java.sql.Timestamp durationTimeStamp
protected java.lang.String status
protected java.lang.String currency
protected java.lang.Integer fulfillmentCenterId
protected java.lang.Integer languageId
protected java.lang.Long auctionReferenceNumber
protected boolean bidRuleExist
protected AuctionAccessBean auctionAccessBean
protected java.lang.String auctionType
protected java.lang.Long bidRuleId
protected int closeType
protected java.sql.Timestamp currentTimeStamp
protected java.lang.Integer durationDays
protected java.util.Hashtable longDescriptions
protected java.lang.Long ownerId
protected java.lang.String pricingRuleType
protected java.lang.String productDisplayPage
protected java.lang.Long productId
protected java.math.BigDecimal reservePrice
protected java.lang.String ruleDisplayPage
protected java.util.Hashtable shortDescriptions
protected java.lang.Long reservationId
Constructor Detail |
---|
public AuctionTaskBaseCmdImpl()
Method Detail |
---|
protected static java.sql.Timestamp addTimestamp(java.sql.Timestamp t1, java.sql.Timestamp t2)
t1
- java.sql.Timestampt2
- java.sql.Timestampprotected int checkBidRule() throws ECApplicationException
ECApplicationException
- Raised with messge
_ERR_TOOLS_AUCTION_NO_BID_RULE when the bid rule is
invalid.public static int compareUptoMinute(java.sql.Timestamp time1, java.sql.Timestamp time2)
2001-10-20 13:24:34.384 is considered equal to 2001-10-20 13:24:00.0
time1
-time2
-protected java.sql.Timestamp dayChangeInTimestamp(java.sql.Timestamp t1, int dayChanged)
t1
- Original timestamp.public com.ibm.commerce.negotiation.objects.AuctionAccessBean getAuction()
getAuction
in interface
AuctionTaskBaseCmd
public java.lang.Long getAuctionReferenceNumber()
public java.lang.String getAuctionType()
O for open cry, SB for sealed bid, and D for Dutch.
protected java.sql.Timestamp getBaseTimeStamp()
public java.lang.Long getBidRuleId()
public int getCloseType()
Auction closing rule has the following valid values:
public java.lang.String getCurrency()
public java.math.BigDecimal getCurrentAskPrice()
public java.lang.Double getCurrentAvailableQuantity()
protected java.sql.Timestamp getCurrentTimeStamp()
public java.math.BigDecimal getDeposit()
public java.lang.Integer getDurationDays()
protected java.sql.Timestamp getDurationTimeStamp()
public java.sql.Timestamp getEndTime()
public java.util.Hashtable getErrorContent()
public boolean getErrorFlag()
public java.lang.Integer getFulfillmentCenterId()
protected java.lang.Integer getFulfillmentCenterId(java.lang.Long catId, java.lang.Double quantity)
catId
- is the catalog entry Id.quantity
- is the quantity needs to be allocated.public java.lang.Integer getLanguageId()
public java.lang.String getLongDescription(java.lang.Integer langid)
langid
- is the language id. It is an integer.protected java.lang.String getMerchantCurrency(java.lang.Integer anMerchantNum)
anMerchantNum
- is the store Id.public java.lang.Long getOwnerId()
public java.lang.String getPricingRuleType()
ND for nondiscriminative, D for discriminative.
public java.lang.String getProductDisplayPage()
public java.lang.Long getProductId()
public java.lang.Double getQuantity()
public java.lang.Long getReservationId()
public java.math.BigDecimal getReservePrice()
public java.lang.String getRuleDisplayPage()
public java.lang.String getShortDescription(java.lang.Integer langid)
langid
- is the language id. It is an integer.public java.math.BigDecimal getStartPrice()
public java.sql.Timestamp getStartTime()
protected java.lang.String getStatus()
F for future, C for current, BC for bidding closed, SC for settlement closed.
protected java.sql.Timestamp getUpdatedEndTimestamp()
protected boolean inventoryUpdate(java.lang.Long catId, java.lang.Double qua) throws ECApplicationException
qua
- The quantity that needs to be reserved.catId
- The catalog entry Id.
ECApplicationException
- is thrown when the quantity of inventory
that is needed for the auction can not be reserved.public boolean isErrorFlag()
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class
AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
reset
in class
AbstractECTargetableCommand
public void saveDescriptions() throws java.lang.Exception
if
- anything goes wrong.java.lang.Exception
public void setAuctionType(java.lang.String s) throws ECException
s
- The auction type.ECException
public void setBidRuleId(java.lang.Long br_id) throws ECException
setBidRuleId
in interface
AuctionTaskBaseCmd
br_id
- is the bid rule ID.throws
- ECException if anything goes wrong.ECException
public void setCloseType(int aType) throws ECException
Auction closing rule has the following valid values:
setCloseType
in interface
AuctionTaskBaseCmd
aType
-ECException
public void setCurrency(java.lang.String newCurrency) throws ECApplicationException
newCurrency
- java.lang.String
ECApplicationException
public void setCurrentAskPrice(java.math.BigDecimal aPrice) throws ECException
setCurrentAskPrice
in interface
AuctionTaskBaseCmd
aPrice
-ECException
public void setCurrentAvailableQuantity(java.lang.Double q)
q
- The current available quantity.public void setDeposit(java.math.BigDecimal amount) throws ECException
setDeposit
in interface
AuctionTaskBaseCmd
amount
-ECException
public void setDurationDays(java.lang.Integer days)
setDurationDays
in interface
AuctionTaskBaseCmd
days
- java.lang.Integerpublic void setDurationTime(java.lang.Integer hours, java.lang.Integer minutes)
setDurationTime
in interface
AuctionTaskBaseCmd
hours
-minutes
-public void setDurationTimestamp(java.sql.Timestamp newDurationTimeStamp) throws ECApplicationException
setDurationTimestamp
in interface
AuctionTaskBaseCmd
newDurationTimeStamp
-
ECApplicationException
public void setEndTime(java.sql.Timestamp newEndTimeStamp) throws ECApplicationException
setEndTime
in interface
AuctionTaskBaseCmd
newEndTimeStamp
-
ECApplicationException
public void setErrorContent(java.util.Hashtable newErrorContent)
newErrorContent
-public void setErrorFlag(boolean newErrorFlag)
newErrorFlag
-public void setFulfillmentCenterId(java.lang.Integer newFulfillmentCenterId)
setFulfillmentCenterId
in interface
AuctionTaskBaseCmd
newFulfillmentCenterId
-public void setLanguageId(java.lang.Integer id)
id
-public void setLongDescription(java.lang.Integer langid, java.lang.String ld) throws ECException
setLongDescription
in interface
AuctionTaskBaseCmd
langid
- Language Id.ld
- Long description.ECException
public void setOwnerId(java.lang.Long id)
id
- The owner's Id.public void setPricingRuleType(java.lang.String s) throws ECException
ND for nondiscriminative, D for discriminative.
setPricingRuleType
in interface
AuctionTaskBaseCmd
s
-ECException
public void setProductDisplayPage(java.lang.String s) throws ECException
setProductDisplayPage
in interface
AuctionTaskBaseCmd
s
-ECException
public void setProductId(java.lang.Long theId) throws ECException
theId
- is used to set the product (aka catalog entry) Id. It
is of type java.lang.Long.ECException
protected void setProductOnAuction(java.lang.Integer i) throws javax.ejb.CreateException, ECApplicationException, ECSystemException, java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.FinderException
i
- is the value to be set. 1 for on auction, 0 for not on
auction.javax.ejb.CreateException
ECApplicationException
ECSystemException
java.rmi.RemoteException
javax.naming.NamingException
javax.ejb.FinderException
public void setQuantity(java.lang.Double q)
setQuantity
in interface
AuctionTaskBaseCmd
q
- is the quntity.public void setReservationId(java.lang.Long newReservationId)
setReservationId
in interface
AuctionTaskBaseCmd
newReservationId
-public void setReservePrice(java.math.BigDecimal aPrice) throws ECException
setReservePrice
in interface
AuctionTaskBaseCmd
ECException
public void setRuleDisplayPage(java.lang.String s) throws ECException
setRuleDisplayPage
in interface
AuctionTaskBaseCmd
s
- is the page name.ECException
public void setShortDescription(java.lang.Integer langid, java.lang.String s) throws ECException
setShortDescription
in interface
AuctionTaskBaseCmd
langid
- The language Id.s
- The short description.ECException
public void setStartPrice(java.math.BigDecimal newStartPrice)
setStartPrice
in interface
AuctionTaskBaseCmd
newStartPrice
-public void setStartTime(java.sql.Timestamp s) throws ECException
setStartTime
in interface
AuctionTaskBaseCmd
s
- is the new start time.ECException
protected void setStatus(java.lang.String newStatus)
newStatus
-