com.ibm.commerce.negotiation.commands
Class ModifyAuctionTaskCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.negotiation.commands.AuctionTaskBaseCmdImpl
                    |
                    +--com.ibm.commerce.negotiation.commands.ModifyAuctionTaskCmdImpl
All Implemented Interfaces:
AuctionTaskBaseCmd, ECCommand, ModifyAuctionTaskCmd, TaskCommand

public class ModifyAuctionTaskCmdImpl
extends AuctionTaskBaseCmdImpl
implements ModifyAuctionTaskCmd

Modify Auction command. This command will update an existing auction.


Field Summary
protected  java.util.Hashtable dirtyFlags
           
 
Fields inherited from class com.ibm.commerce.negotiation.commands.AuctionTaskBaseCmdImpl
auctionAccessBean, auctionReferenceNumber, auctionType, bidRuleExist, bidRuleId, closeType, currency, currentAskPrice, currentAvailableQuantity, currentTimeStamp, deposit, durationDays, durationTimeStamp, endTime, fulfillmentCenterId, languageId, longDescriptions, ownerId, pricingRuleType, productDisplayPage, productId, quantity, reservationId, reservePrice, ruleDisplayPage, shortDescriptions, startPrice, startTime, status
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.negotiation.commands.ModifyAuctionTaskCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.negotiation.commands.AuctionTaskBaseCmd
AUCTION_BASE_TIMESTAMP
 
Constructor Summary
ModifyAuctionTaskCmdImpl()
          CreateAuctionCmdImpl1 constructor comment.
 
Method Summary
 java.lang.Long getBidRuleId()
          Gets the bid rule identifier.
 int getCloseType()
          Gets the way auction will be closed.
 java.math.BigDecimal getCurrentAskPrice()
          Gets the current ask price.
 java.lang.Double getCurrentAvailableQuantity()
          Gets the current available quantity.
 java.math.BigDecimal getDeposit()
          Gets the deposit amount.
 java.lang.Integer getDurationDays()
          Gets the duration days.
protected  java.sql.Timestamp getDurationTimeStamp()
          Gets the duration timestamp.
 java.sql.Timestamp getEndTime()
          Gets the auction end time.
 java.lang.String getPricingRuleType()
          Gets the pricing rule type.
 java.lang.String getProductDisplayPage()
          Gets the product display page.
 java.lang.Double getQuantity()
          Gets the quantity.
 java.math.BigDecimal getReservePrice()
          Gets the reserve price.
 java.lang.String getRuleDisplayPage()
          Gets the rule display page.
 java.math.BigDecimal getStartPrice()
          Gets the start price.
 java.sql.Timestamp getStartTime()
          Gets the auction start time.
 boolean isDirty(java.lang.String field)
          Check if a field has been updated.
 boolean isReadyToCallExecute()
          Determine if the command can be run.
 void performExecute()
          Update auction.
 void setAuctionReferenceNumber(java.lang.Long newAuctionReferenceNumber)
          Sets Auction Reference Number
 void setBidRuleId(java.lang.Long br_id)
          Sets the bid rule id.
 void setCloseType(int aType)
          Sets the close type.
 void setCurrentAskPrice(java.math.BigDecimal aPrice)
          Sets current ask price for dutch auction.
 void setDeposit(java.math.BigDecimal amount)
          Sets the deposit.
 void setDurationDays(java.lang.Integer days)
          Stores the incoming value for the day duration.
 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)
          Sets duration timestamp
 void setEndTime(java.sql.Timestamp newEndTimeStamp)
          Sets auction end date timestamp.
 void setPricingRuleType(java.lang.String s)
          Sets the pricing rule type.
 void setProductDisplayPage(java.lang.String s)
          Sets the product display page.
 void setQuantity(java.lang.Double q)
          Sets auction quantity.
 void setReservePrice(java.math.BigDecimal aPrice)
          Sets the reserved price.
 void setRuleDisplayPage(java.lang.String s)
          Sets the rule display page.
 void setStartPrice(java.math.BigDecimal newStartPrice)
          Sets the auction starting price.
 void setStartTime(java.sql.Timestamp s)
          Sets the auction start time.
 void validateParameters()
          Validate auction paramters.
 
Methods inherited from class com.ibm.commerce.negotiation.commands.AuctionTaskBaseCmdImpl
addTimestamp, checkBidRule, compareUptoMinute, dayChangeInTimestamp, getAuction, getAuctionReferenceNumber, getAuctionType, getBaseTimeStamp, getCurrency, getCurrentTimeStamp, getErrorContent, getErrorFlag, getFulfillmentCenterId, getFulfillmentCenterId, getLanguageId, getLongDescription, getMerchantCurrency, getOwnerId, getProductId, getReservationId, getShortDescription, getStatus, getUpdatedEndTimestamp, inventoryUpdate, isErrorFlag, reset, saveDescriptions, setAuctionType, setCurrency, setCurrentAvailableQuantity, setErrorContent, setErrorFlag, setFulfillmentCenterId, setLanguageId, setLongDescription, setOwnerId, setProductId, setProductOnAuction, setReservationId, setShortDescription, setStatus
 
Methods inherited from class com.ibm.commerce.command.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, 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.negotiation.commands.AuctionTaskBaseCmd
getAuction, setFulfillmentCenterId, setLongDescription, setReservationId, setShortDescription
 
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
 

Field Detail

dirtyFlags

protected java.util.Hashtable dirtyFlags
Constructor Detail

ModifyAuctionTaskCmdImpl

public ModifyAuctionTaskCmdImpl()
CreateAuctionCmdImpl1 constructor comment.
Method Detail

getBidRuleId

public java.lang.Long getBidRuleId()
Gets the bid rule identifier.
Overrides:
getBidRuleId in class AuctionTaskBaseCmdImpl
Returns:
The bid rule identifier.

getCloseType

public int getCloseType()
Gets the way auction will be closed.
Overrides:
getCloseType in class AuctionTaskBaseCmdImpl
Returns:
The auction close type.

getCurrentAskPrice

public java.math.BigDecimal getCurrentAskPrice()
Gets the current ask price.
Overrides:
getCurrentAskPrice in class AuctionTaskBaseCmdImpl
Returns:
The current ask price.

getCurrentAvailableQuantity

public java.lang.Double getCurrentAvailableQuantity()
Gets the current available quantity.
Overrides:
getCurrentAvailableQuantity in class AuctionTaskBaseCmdImpl
Returns:
The current available quantity.

getDeposit

public java.math.BigDecimal getDeposit()
Gets the deposit amount.
Overrides:
getDeposit in class AuctionTaskBaseCmdImpl
Returns:
The deposit amount.

getDurationDays

public java.lang.Integer getDurationDays()
Gets the duration days.
Overrides:
getDurationDays in class AuctionTaskBaseCmdImpl
Returns:
The duration days.

getDurationTimeStamp

protected java.sql.Timestamp getDurationTimeStamp()
Gets the duration timestamp.
Overrides:
getDurationTimeStamp in class AuctionTaskBaseCmdImpl
Returns:
The duration timestamp.

getEndTime

public java.sql.Timestamp getEndTime()
Gets the auction end time.
Overrides:
getEndTime in class AuctionTaskBaseCmdImpl
Returns:
The auction end time.

getPricingRuleType

public java.lang.String getPricingRuleType()
Gets the pricing rule type.
Overrides:
getPricingRuleType in class AuctionTaskBaseCmdImpl
Returns:
The pricing rule type.

getProductDisplayPage

public java.lang.String getProductDisplayPage()
Gets the product display page.
Overrides:
getProductDisplayPage in class AuctionTaskBaseCmdImpl
Returns:
The product display page.

getQuantity

public java.lang.Double getQuantity()
Gets the quantity.
Overrides:
getQuantity in class AuctionTaskBaseCmdImpl
Returns:
The quantity.

getReservePrice

public java.math.BigDecimal getReservePrice()
Gets the reserve price.
Overrides:
getReservePrice in class AuctionTaskBaseCmdImpl
Returns:
The reserve price.

getRuleDisplayPage

public java.lang.String getRuleDisplayPage()
Gets the rule display page.
Overrides:
getRuleDisplayPage in class AuctionTaskBaseCmdImpl
Returns:
The rule display page.

getStartPrice

public java.math.BigDecimal getStartPrice()
Gets the start price.
Overrides:
getStartPrice in class AuctionTaskBaseCmdImpl
Returns:
The starting price.

getStartTime

public java.sql.Timestamp getStartTime()
Gets the auction start time.
Overrides:
getStartTime in class AuctionTaskBaseCmdImpl
Returns:
The auction start time.

isDirty

public boolean isDirty(java.lang.String field)
Check if a field has been updated.
Parameters:
field - The field to be checked.
Returns:
true if the field has been updated, false otherwise.

isReadyToCallExecute

public boolean isReadyToCallExecute()
Determine if the command can be run.
Overrides:
isReadyToCallExecute in class AuctionTaskBaseCmdImpl
Returns:
true if the command can be run, false otherwise.

performExecute

public void performExecute()
                    throws ECException
Update auction.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AuctionTaskBaseCmdImpl
Throws:
ECException - if EJB related errors are encountered.

setAuctionReferenceNumber

public void setAuctionReferenceNumber(java.lang.Long newAuctionReferenceNumber)
                               throws ECApplicationException,
                                      ECSystemException
Sets Auction Reference Number
Specified by:
setAuctionReferenceNumber in interface ModifyAuctionTaskCmd
Parameters:
newAuctionReferenceNumber - The auction reference number.
Throws:
ECApplicationException - if an invalid reference number is specified.
ECSystemException - if any other error is encountered.

setBidRuleId

public void setBidRuleId(java.lang.Long br_id)
                  throws ECException
Sets the bid rule id.
Specified by:
setBidRuleId in interface AuctionTaskBaseCmd
Overrides:
setBidRuleId in class AuctionTaskBaseCmdImpl
Parameters:
br_id - The bid rule id.
Throws:
ECException - if any problems are encountered.

setCloseType

public void setCloseType(int aType)
                  throws ECException
Sets the close type.
Specified by:
setCloseType in interface AuctionTaskBaseCmd
Overrides:
setCloseType in class AuctionTaskBaseCmdImpl
Parameters:
aType - The close type.
Throws:
ECException - if any problems are encountered.

setCurrentAskPrice

public void setCurrentAskPrice(java.math.BigDecimal aPrice)
                        throws ECException
Sets current ask price for dutch auction.
Specified by:
setCurrentAskPrice in interface AuctionTaskBaseCmd
Overrides:
setCurrentAskPrice in class AuctionTaskBaseCmdImpl
Parameters:
aprice - The current ask price.
Throws:
ECException - if any problems are encountered.

setDeposit

public void setDeposit(java.math.BigDecimal amount)
                throws ECException
Sets the deposit.
Specified by:
setDeposit in interface AuctionTaskBaseCmd
Overrides:
setDeposit in class AuctionTaskBaseCmdImpl
Parameters:
amount - The deposit amount.
Throws:
ECException - if any problems are encountered.

setDurationDays

public void setDurationDays(java.lang.Integer days)
Stores the incoming value for the day duration.
Specified by:
setDurationDays in interface AuctionTaskBaseCmd
Overrides:
setDurationDays in class AuctionTaskBaseCmdImpl
Parameters:
days - The duration days.

setDurationTime

public void setDurationTime(java.lang.Integer hours,
                            java.lang.Integer minutes)
Set up the duration timestamp based on hours and minutes.
Specified by:
setDurationTime in interface AuctionTaskBaseCmd
Overrides:
setDurationTime in class AuctionTaskBaseCmdImpl
Parameters:
hours - The duration hours.
minutes - The duration minutes.

setDurationTimestamp

public void setDurationTimestamp(java.sql.Timestamp newDurationTimeStamp)
                          throws ECApplicationException
Sets duration timestamp
Specified by:
setDurationTimestamp in interface AuctionTaskBaseCmd
Overrides:
setDurationTimestamp in class AuctionTaskBaseCmdImpl
Parameters:
newDurationTimeStamp - The duration timestamp.
Throws:
ECApplicationException - if any problems are encountered.

setEndTime

public void setEndTime(java.sql.Timestamp newEndTimeStamp)
                throws ECApplicationException
Sets auction end date timestamp.
Specified by:
setEndTime in interface AuctionTaskBaseCmd
Overrides:
setEndTime in class AuctionTaskBaseCmdImpl
Parameters:
newEndTimeStamp - The auction end timestamp.
Throws:
ECApplicationException - if any problems are encountered.

setPricingRuleType

public void setPricingRuleType(java.lang.String s)
                        throws ECException
Sets the pricing rule type.
Specified by:
setPricingRuleType in interface AuctionTaskBaseCmd
Overrides:
setPricingRuleType in class AuctionTaskBaseCmdImpl
Parameters:
s - The pricing rule type.
Throws:
ECException - if any problems are encountered.

setProductDisplayPage

public void setProductDisplayPage(java.lang.String s)
                           throws ECException
Sets the product display page.
Specified by:
setProductDisplayPage in interface AuctionTaskBaseCmd
Overrides:
setProductDisplayPage in class AuctionTaskBaseCmdImpl
Parameters:
s - The product display page.
Throws:
ECException - if any problems are encountered.

setQuantity

public void setQuantity(java.lang.Double q)
Sets auction quantity.
Specified by:
setQuantity in interface AuctionTaskBaseCmd
Overrides:
setQuantity in class AuctionTaskBaseCmdImpl
Parameters:
q - The auction quantity.

setReservePrice

public void setReservePrice(java.math.BigDecimal aPrice)
                     throws ECException
Sets the reserved price.
Specified by:
setReservePrice in interface AuctionTaskBaseCmd
Overrides:
setReservePrice in class AuctionTaskBaseCmdImpl
Parameters:
aPrice - The reserved price.
Throws:
ECException - if any problems are encountered.

setRuleDisplayPage

public void setRuleDisplayPage(java.lang.String s)
                        throws ECException
Sets the rule display page.
Specified by:
setRuleDisplayPage in interface AuctionTaskBaseCmd
Overrides:
setRuleDisplayPage in class AuctionTaskBaseCmdImpl
Parameters:
s - The rule display page.
Throws:
ECException - if any problems are encountered.

setStartPrice

public void setStartPrice(java.math.BigDecimal newStartPrice)
Sets the auction starting price.
Specified by:
setStartPrice in interface AuctionTaskBaseCmd
Overrides:
setStartPrice in class AuctionTaskBaseCmdImpl
Parameters:
newStartPrice - The auction starting price.

setStartTime

public void setStartTime(java.sql.Timestamp s)
                  throws ECException
Sets the auction start time.
Specified by:
setStartTime in interface AuctionTaskBaseCmd
Overrides:
setStartTime in class AuctionTaskBaseCmdImpl
Parameters:
s - The auction start time.
Throws:
ECException - if there are any problems.

validateParameters

public void validateParameters()
                        throws ECException
Validate auction paramters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECCommand
Throws:
ECException - if any problems are found with the parameters.