com.ibm.commerce.catalogmanagement.commands
Class OfferUpdateCmdImpl

java.lang.Object
  CacheableCommandImpl
      com.ibm.commerce.command.AbstractECTargetableCommand
          com.ibm.commerce.command.ControllerCommandImpl
              com.ibm.commerce.catalogmanagement.commands.OfferUpdateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OfferUpdateCmd, Protectable

public class OfferUpdateCmdImpl
extends ControllerCommandImpl
implements OfferUpdateCmd

The OfferUpdateCmd is a URL and controller command that:

Parameters: Access Beans: Task Commands: UpdateOfferCmd
Other Controller Commands: ListpriceUpdateCmd Mandatory Parameters: offerId, or catentryId and identifier. Additional Parameters: None. Optional Parameters: field1, field2, flags, maxQuantity, minQuantity, precedence, published, qtyunitId, desc, descLangId, compareprice, currency, price, URL.
See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
The name of this interface is "com.ibm.commerce.catalogmanagement.commands.OfferUpdateCmdImpl".
static java.lang.String COPYRIGHT
The internal copyright field.
protected java.math.BigDecimal ibdCompareprice
protected java.math.BigDecimal ibdPrice
protected java.lang.Double idMaximumQuantity
protected java.lang.Double idMinimumQuantity
protected java.lang.Double idPrecedence
protected java.lang.Long inCatentryId
protected java.lang.Integer inDescLanguage
protected java.lang.Integer inFlags
protected java.lang.Long inIdentifier
protected java.lang.Long inOfferId
protected java.lang.Integer inPublished
protected java.lang.Long inTradeposcnId
protected java.lang.String istrCurrency
protected java.lang.String istrDescription
protected java.lang.String istrField1
protected java.lang.String istrField2
protected java.lang.String istrOID
protected java.lang.String istrQtyunitId
protected java.lang.String istrURL
protected java.sql.Timestamp itmEnddate
protected java.sql.Timestamp itmLastupdate
protected java.sql.Timestamp itmStartdate
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.command.ECCommand
defaultCommandClassName
Constructor Summary
OfferUpdateCmdImpl()
Method Summary
java.lang.Long getCatentryId()
Get the catalog entry Id
java.lang.String getCurrency()
Get the currency
java.lang.Integer getDescLanguage()
Get the description language Id
java.sql.Timestamp getEnddate()
Get the end date of the offer
java.lang.Long getIdentifier()
Get the offer identifier
java.lang.Long getOfferId()
Get the offer Id
java.math.BigDecimal getPrice()
Get the offer price
java.sql.Timestamp getStartdate()
Get the start date of the offer
java.lang.Long getTradeposcnId()
Get the trading position container Id
java.lang.String getURL()
Get the redirect URL
void performExecute()
The main program for OfferUpdate command
void reset()
This method reset all the variables used in OfferUpdate command
void setCatentryId(java.lang.Long anCatentryId)
Set the catalog entry Id
void setCompareprice(java.math.BigDecimal abdCompareprice)
Set the comparative price
void setCurrency(java.lang.String astrCurrency)
Set the currency
void setDescLanguage(java.lang.Integer anDescLanguage)
Set language Id of offer description
void setDescription(java.lang.String astrDescription)
Set the offer description
void setEnddate(java.sql.Timestamp atmEnddate)
Sets the end date of the offer
void setField1(java.lang.String astrField1)
Set field 1 of the offer
void setField2(java.lang.String astrField2)
Set field 2 of the offer
void setFlags(java.lang.Integer anFlags)
Set offer flags 1 = shipto address required (if 1, OrderPrepare will return an error if an OrderItem references this offer but does not have a shipping address)
void setIdentifier(java.lang.Long anIdentifier)
Set the offer identifier
void setLastupdate(java.sql.Timestamp atmLastupdate)
Sets the date and time when the offer was updated
void setMaximumQuantity(java.lang.Double adMaximumQuantity)
Set the maximum quantity allowed for the offer
void setMinimumQuantity(java.lang.Double adMinimumQuantity)
Set the minimum quantity required for the offer
void setOfferId(java.lang.Long anOfferId)
Set the offer Id
void setOID(java.lang.String astrOID)
Set the object identififer
void setPrecedence(java.lang.Double adPrecedence)
Set the precedence of the offer When more than one offer is effective at a particular time, the one with the highest precedence is used.
void setPrice(java.math.BigDecimal abdPrice)
Set the offer price
void setPublished(java.lang.Integer anPublished)
Set the published flag of the offer 0 = offer is not published (temporarily disabled).
void setQtyunitId(java.lang.String astrQtyunitId)
Set the quantity unit Id.
void setRequestProperties(TypedProperty reqParms)
This method obtain the input parameters for OfferUpdate command
void setStartdate(java.sql.Timestamp atmStartdate)
Sets the start date of the offer
void setTradeposcnId(java.lang.Long anTradeposcnId)
Set trading positioning container Id for the offer
void setURL(java.lang.String astrURL)
Set a redirect URL
void validateParameters()
This method validates the parameters for OfferUpdate command
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, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, 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
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
The name of this interface is "com.ibm.commerce.catalogmanagement.commands.OfferUpdateCmdImpl".
See Also:
Constant Field Values

istrURL

protected java.lang.String istrURL

inCatentryId

protected java.lang.Long inCatentryId

istrField1

protected java.lang.String istrField1

istrField2

protected java.lang.String istrField2

inFlags

protected java.lang.Integer inFlags

inIdentifier

protected java.lang.Long inIdentifier

itmLastupdate

protected java.sql.Timestamp itmLastupdate

itmStartdate

protected java.sql.Timestamp itmStartdate

itmEnddate

protected java.sql.Timestamp itmEnddate

idMaximumQuantity

protected java.lang.Double idMaximumQuantity

idMinimumQuantity

protected java.lang.Double idMinimumQuantity

inOfferId

protected java.lang.Long inOfferId

istrOID

protected java.lang.String istrOID

idPrecedence

protected java.lang.Double idPrecedence

inPublished

protected java.lang.Integer inPublished

istrQtyunitId

protected java.lang.String istrQtyunitId

inTradeposcnId

protected java.lang.Long inTradeposcnId

istrDescription

protected java.lang.String istrDescription

inDescLanguage

protected java.lang.Integer inDescLanguage

ibdCompareprice

protected java.math.BigDecimal ibdCompareprice

istrCurrency

protected java.lang.String istrCurrency

ibdPrice

protected java.math.BigDecimal ibdPrice
Constructor Detail

OfferUpdateCmdImpl

public OfferUpdateCmdImpl()
Method Detail

getIdentifier

public java.lang.Long getIdentifier()
Get the offer identifier
Returns:
java.lang.Long

getOfferId

public java.lang.Long getOfferId()
Get the offer Id
Returns:
java.lang.Long

getCatentryId

public java.lang.Long getCatentryId()
Get the catalog entry Id
Specified by:
getCatentryId in interface OfferUpdateCmd
Returns:
java.lang.Long

getStartdate

public java.sql.Timestamp getStartdate()
Get the start date of the offer
Returns:
java.sql.Timestamp

getEnddate

public java.sql.Timestamp getEnddate()
Get the end date of the offer
Returns:
java.sql.Timestamp

getTradeposcnId

public java.lang.Long getTradeposcnId()
Get the trading position container Id
Returns:
java.lang.Long

getPrice

public java.math.BigDecimal getPrice()
Get the offer price
Returns:
java.math.BigDecimal

getCurrency

public java.lang.String getCurrency()
Get the currency
Specified by:
getCurrency in interface OfferUpdateCmd
Returns:
java.lang.String

getDescLanguage

public java.lang.Integer getDescLanguage()
Get the description language Id
Returns:
java.lang.Integer

getURL

public java.lang.String getURL()
Get the redirect URL
Returns:
java.lang.String

performExecute

public void performExecute()
                    throws ECException
The main program for OfferUpdate command
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

reset

public void reset()
This method reset all the variables used in OfferUpdate command
Overrides:
reset in class AbstractECTargetableCommand

setCatentryId

public void setCatentryId(java.lang.Long anCatentryId)
Set the catalog entry Id
Specified by:
setCatentryId in interface OfferUpdateCmd
Parameters:
anCatentryId - java.lang.Long

setField1

public void setField1(java.lang.String astrField1)
Set field 1 of the offer
Specified by:
setField1 in interface OfferUpdateCmd
Parameters:
astrField1 - java.lang.String

setField2

public void setField2(java.lang.String astrField2)
Set field 2 of the offer
Specified by:
setField2 in interface OfferUpdateCmd
Parameters:
astrField2 - java.lang.String

setFlags

public void setFlags(java.lang.Integer anFlags)
Set offer flags 1 = shipto address required (if 1, OrderPrepare will return an error if an OrderItem references this offer but does not have a shipping address)
Specified by:
setFlags in interface OfferUpdateCmd
Parameters:
anFlags - java.lang.Integer

setIdentifier

public void setIdentifier(java.lang.Long anIdentifier)
Set the offer identifier
Specified by:
setIdentifier in interface OfferUpdateCmd
Parameters:
anIdentifier - java.lang.Long

setLastupdate

public void setLastupdate(java.sql.Timestamp atmLastupdate)
Sets the date and time when the offer was updated
Specified by:
setLastupdate in interface OfferUpdateCmd
Parameters:
atmLastupdate - java.sql.Timestamp

setMaximumQuantity

public void setMaximumQuantity(java.lang.Double adMaximumQuantity)
Set the maximum quantity allowed for the offer
Specified by:
setMaximumQuantity in interface OfferUpdateCmd
Parameters:
adMaximumQuantity - java.lang.Double

setMinimumQuantity

public void setMinimumQuantity(java.lang.Double adMinimumQuantity)
Set the minimum quantity required for the offer
Specified by:
setMinimumQuantity in interface OfferUpdateCmd
Parameters:
adMinimumQuantity - java.lang.Double

setQtyunitId

public void setQtyunitId(java.lang.String astrQtyunitId)
Set the quantity unit Id. This is the unit of measure for minimum quantity and maximum quantity
Specified by:
setQtyunitId in interface OfferUpdateCmd
Parameters:
astrQtyunitId - java.lang.String

setOID

public void setOID(java.lang.String astrOID)
Set the object identififer
Specified by:
setOID in interface OfferUpdateCmd
Parameters:
astrOID - java.lang.String

setPrecedence

public void setPrecedence(java.lang.Double adPrecedence)
Set the precedence of the offer When more than one offer is effective at a particular time, the one with the highest precedence is used.
Specified by:
setPrecedence in interface OfferUpdateCmd
Parameters:
adPrecedence - java.lang.Double

setPublished

public void setPublished(java.lang.Integer anPublished)
Set the published flag of the offer 0 = offer is not published (temporarily disabled). 1 = offer is published. 2 = offer is marked for deletion (and not published).
Specified by:
setPublished in interface OfferUpdateCmd
Parameters:
anPublished - java.lang.Integer

setTradeposcnId

public void setTradeposcnId(java.lang.Long anTradeposcnId)
Set trading positioning container Id for the offer
Specified by:
setTradeposcnId in interface OfferUpdateCmd
Parameters:
anTradeposcnId - java.lang.Long

setStartdate

public void setStartdate(java.sql.Timestamp atmStartdate)
Sets the start date of the offer
Specified by:
setStartdate in interface OfferUpdateCmd
Parameters:
atmStartdate - java.sql.Timestamp

setEnddate

public void setEnddate(java.sql.Timestamp atmEnddate)
Sets the end date of the offer
Specified by:
setEnddate in interface OfferUpdateCmd
Parameters:
atmEnddate - java.sql.Timestamp

setOfferId

public void setOfferId(java.lang.Long anOfferId)
Set the offer Id
Specified by:
setOfferId in interface OfferUpdateCmd
Parameters:
anOfferId - java.lang.Long

setCompareprice

public void setCompareprice(java.math.BigDecimal abdCompareprice)
Set the comparative price
Specified by:
setCompareprice in interface OfferUpdateCmd
Parameters:
abdCompareprice - java.math.BigDecimal

setPrice

public void setPrice(java.math.BigDecimal abdPrice)
Set the offer price
Specified by:
setPrice in interface OfferUpdateCmd
Parameters:
abdPrice - java.math.BigDecimal

setCurrency

public void setCurrency(java.lang.String astrCurrency)
Set the currency
Specified by:
setCurrency in interface OfferUpdateCmd
Parameters:
astrCurrency - the currency

setDescLanguage

public void setDescLanguage(java.lang.Integer anDescLanguage)
Set language Id of offer description
Specified by:
setDescLanguage in interface OfferUpdateCmd
Parameters:
anDescLanguage - java.lang.Integer

setDescription

public void setDescription(java.lang.String astrDescription)
Set the offer description
Specified by:
setDescription in interface OfferUpdateCmd
Parameters:
astrDescription - java.lang.String

setRequestProperties

public void setRequestProperties(TypedProperty reqParms)
                          throws ECApplicationException
This method obtain the input parameters for OfferUpdate command
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Throws:
ECApplicationException

setURL

public void setURL(java.lang.String astrURL)
Set a redirect URL
Specified by:
setURL in interface OfferUpdateCmd
Parameters:
astrURL - java.lang.String

validateParameters

public void validateParameters()
                        throws ECException
This method validates the parameters for OfferUpdate command
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException

Feedback