com.ibm.commerce.catalogmanagement.commands

Class OfferDeleteCmdImpl

  • All Implemented Interfaces:
    OfferDeleteCmd, 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 OfferDeleteCmdImpl
    extends ControllerCommandImpl
    implements OfferDeleteCmd
    The OfferDeleteCmd is a URL and controller command that:
    • If the offer ID is supplied, and
      • If the description language ID is supplied, then deletes the offer description with the specified offer ID and language ID.
      • If the currency is supplied, then deletes the offer price with the specified offer ID and currency, and if no more offer price exists for that offer ID, the offer will be deleted or marked for deletion. There is a force option available for this command, and by default, force=0, and it is set to mark for deletion. Also calls ListPriceDeleteCmd with the currency and catalog entry ID found in the offer.
      • If the currency is generic, then deletes or mark for delete the offer, depending on what is set on the force option, and offer price with the specified offer ID. Also calls ListPriceDeleteCmd with the catalog entry ID found in the offer.
      • At least one of currency or language ID is required, if both are missing, then an exception will be thrown.
    • If the catalog entry ID is supplied, and
      • If the description language ID is supplied, then deletes all offer description with the specified language ID for that catalog entry ID.
      • If the currency is supplied, then for each offer with the specified catalog entry ID, the offer price for that currency is deleted. Also calls ListPriceDeleteCmd for the specied catalog entry ID and currency.
      • If the currency supplied is generic, then all offers will be deleted or marked for deletion, depending on the force option value. Also, all the offer description, offer price with the specified catalog entry ID is deleted. Also calls ListPriceDeleteCmd with the catalog entry ID.
      • At least one of currency or language ID is required, if both are missing, then an exception will be thrown.
    Parameters:
    • Offer ID, and
      • Description Language ID
      • Currency
      • Currency=*
    • Catalog Entry ID, and
      • Description Language ID
      • Currency
      • Currency=*
    Access Beans:
      • OfferDescriptionAccessBean
      • OfferAccessBean, OfferPriceAccessBean, ListPriceAccessBean
      • OfferAccessBean, OfferPriceAccessBean, ListPriceAccessBean
      • OfferDescriptionAccessBean
      • OfferAccessBean, OfferPriceAccessBean, ListPriceAccessBean
      • OfferAccessBean, OfferPriceAccessBean, ListPriceAccessBean
    Task Commands: DeleteOfferCmd
    Other Controller Commands: ListpriceDeleteCmd
    Mandatory Parameters: offerId, or catentryId.
    Additional Parameters: None.
    Optional Parameters: precedence, qtyunitId, descLangId, currency, force, 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.OfferDeleteCmdImpl".
        See Also:
        Constant Field Values
      • GENERIC_CURRENCY

        public java.lang.Boolean GENERIC_CURRENCY
    • Constructor Detail

      • OfferDeleteCmdImpl

        public OfferDeleteCmdImpl()
    • Method Detail

      • getCatentryId

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

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

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

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

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

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

        public java.lang.Integer getForce()
        Get the force delete option 0 = offer will be marked for deletion 1 = offer will be force deleted
        Returns:
        java.lang.Integer
      • getURL

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

        public void reset()
        This method reset all the variables used in OfferDelete 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 OfferDeleteCmd
        Parameters:
        anCatentryId - java.lang.Long
      • setCurrency

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

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

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

        public void setOfferId(java.lang.Long anOfferId)
        Set the offer Id
        Specified by:
        setOfferId in interface OfferDeleteCmd
        Parameters:
        anOfferId - java.lang.Long
      • 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 OfferDeleteCmd
        Parameters:
        adPrecedence - 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 OfferDeleteCmd
        Parameters:
        astrQtyunitId - java.lang.String
      • setForce

        public void setForce(java.lang.Integer anForce)
        Set the force delete option of the offer 0 = offer will be marked for delete 1 = offer will be force deleted
        Specified by:
        setForce in interface OfferDeleteCmd
        Parameters:
        anForce - java.lang.Integer
      • setTradeposcnId

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

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