com.ibm.commerce.catalogmanagement.commands

Class OfferAddCmdImpl

  • All Implemented Interfaces:
    OfferAddCmd, AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class OfferAddCmdImpl
    extends ControllerCommandImpl
    implements OfferAddCmd
    The OfferAddCmd is a URL and controller command that:
    • Adds a new offer.
    • Adds a new offer description.
    • Adds a new offer price.
    • Calls ListPriceAddCmd to create a list price.
    Parameters:
    • All fields in the Offer table.
    • All fields in the OfferDesc table.
    • All fields in the OfferPrice table.
    • See ListPriceAdd command.
    Access Beans:
    • OfferAccessBean
    • OfferDescriptionAccessBean
    • OfferPriceAccessBean
    • See ListPriceAdd command.
    Task Commands: AddOfferCmd
    Other Controller Commands: ListpriceAddCmd
    Mandatory Parameters: (catentryId + identifier, or OfferId if offer already exists).
    Additional Parameters: None.
    Optional Parameters: field1, field2, flags, maxQuantity, minQuantity, precedence, published, qtyunitId, desc, descLangId, compareprice, currency and price, URL.
    See Also:
    Serialized Form
    • 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.OfferAddCmdImpl".
        See Also:
        Constant Field Values
    • Constructor Detail

      • OfferAddCmdImpl

        public OfferAddCmdImpl()
    • Method Detail

      • getDescLanguage

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

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

        public java.lang.Long getOfferId()
        Get the offer Id
        Specified by:
        getOfferId in interface OfferAddCmd
        Returns:
        java.lang.Long
      • getCatentryId

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

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

        public java.sql.Timestamp getStartdate()
        Get Start Date of the Offer
        Returns:
        java.sql.Timestamp
      • getTradeposcnId

        public java.lang.Long getTradeposcnId()
        Get the trading position container Id
        Parameters:
        java.lang.Long -
      • getCurrency

        public java.lang.String getCurrency()
        Get the currency
        Returns:
        java.lang.String
      • getPrice

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

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

        public void performExecute()
                            throws ECException
        The main program for OfferAdd command. This method calls the AddOfferCmd task command, and then sets the offer ID, catalog entry ID, and identifier, description language, currency, price, and start date in the response properties.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • reset

        public void reset()
        This method reset all the variables used in OfferAdd command
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setCatentryId

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

        public void setCompareprice(java.math.BigDecimal abdCompareprice)
        Set the compare price
        Specified by:
        setCompareprice in interface OfferAddCmd
        Parameters:
        abdCompareprice - java.math.BigDecimal
      • setCurrency

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

        public void setDescLanguage(java.lang.Integer anDescLanguage)
        Set language id for the offer description
        Specified by:
        setDescLanguage in interface OfferAddCmd
        Parameters:
        anDescLanguage - java.lang.Integer
      • setDescription

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

        public void setEnddate(java.sql.Timestamp atmEnddate)
        Set the end date of the offer
        Specified by:
        setEnddate in interface OfferAddCmd
        Parameters:
        atmEnddate - java.sql.Timestamp
      • setField1

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

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

        public void setFlags(java.lang.Integer anFlags)
        Set offer flags: 1 = ship to 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 OfferAddCmd
        Parameters:
        anFlags - java.lang.Integer
      • setIdentifier

        public void setIdentifier(java.lang.Long anIdentifier)
        Set the offer identifier
        Specified by:
        setIdentifier in interface OfferAddCmd
        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 OfferAddCmd
        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 OfferAddCmd
        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 OfferAddCmd
        Parameters:
        adMinimumQuantity - java.lang.Double
      • setOfferId

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

        public void setOID(java.lang.String astrOID)
        Set the object identifier
        Specified by:
        setOID in interface OfferAddCmd
        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 OfferAddCmd
        Parameters:
        adPrecedence - java.lang.Double
      • setPrice

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

        public void setPublished(java.lang.Integer anPublished)
        Sets 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 OfferAddCmd
        Parameters:
        anPublished - java.lang.Integer
      • 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 OfferAddCmd
        Parameters:
        astrQtyunitId - java.lang.String
      • setStartdate

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

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

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