com.ibm.commerce.price.commands

Interface GetProductBaseUnitPriceCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.TaskCommand
    All Known Implementing Classes:
    GetBaseUnitPriceCmdImpl


    public interface GetProductBaseUnitPriceCmd
    extends com.ibm.commerce.command.TaskCommand
    Interface for the command used for retrieving the product base unit price of a product.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String defaultCommandClassName
      The default name of this command.
      static java.lang.String ERR_CODE_NO_PRICE
      The no price error code of this command.
      static java.lang.String ERRTASK_NAME
      The error task name of this command.
      static java.lang.String NAME
      The name of this command.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      MonetaryAmount getBasePrice()
      Gets the base price of the catalog entry.
      java.lang.Long[] getContractIds()
      Get the contract IDs associated with the offer that supplied the price.
      java.sql.Timestamp getExpiryDateForCache()
      Gets an expiry date after which the price is no longer effective.
      com.ibm.commerce.order.objects.OfferAccessBean getOffer()
      Get the offer access bean that was used to determine the price.
      java.lang.Long getOfferId()
      Get the offer Id that was used to determine the price.
      MonetaryAmount getPrice()
      Gets the actual price of the catalog entry.
      void setCatEntryId(java.lang.Long aCatEntryId)
      Sets the primary key of the catalog entry whose price is to be retrieved.
      void setContractIds(java.lang.Long[] aContractIdList)
      (Optional) Sets the contract IDs to be used to determine which offers apply.
      void setCurrency(java.lang.String aCurrency)
      (Optional) Set the currency to be used for finding the price.
      void setOfferIds(java.lang.Long[] anOfferIdList)
      (Optional) Sets the offer IDs to use for the price.
      void setQuantity(QuantityAmount aQuantityAmount)
      (Optional) Set the quantity amount of the catalog entry that is to be priced.
      void setStoreId(java.lang.Integer aStoreId)
      (Optional) Set the store Id to use for calculating the price.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default name of this command.
        See Also:
        Constant Field Values
      • ERR_CODE_NO_PRICE

        static final java.lang.String ERR_CODE_NO_PRICE
        The no price error code of this command.
        See Also:
        Constant Field Values
      • ERRTASK_NAME

        static final java.lang.String ERRTASK_NAME
        The error task name of this command.
        See Also:
        Constant Field Values
    • Method Detail

      • getBasePrice

        MonetaryAmount getBasePrice()
        Gets the base price of the catalog entry. The base price is the price (and currency) found for the catalog entry before any conversion. This is only set when the requested currency is different from the base currency and the base price must be converted to the requested price.
        Returns:
        the base price of the product.
      • getContractIds

        java.lang.Long[] getContractIds()
                                 throws com.ibm.commerce.exception.ECSystemException
        Get the contract IDs associated with the offer that supplied the price.
        Returns:
        the contract ID(s).
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getExpiryDateForCache

        java.sql.Timestamp getExpiryDateForCache()
                                          throws com.ibm.commerce.exception.ECSystemException
        Gets an expiry date after which the price is no longer effective. This expiry date may be used to decide when a page is deleted from the cache.
        Returns:
        the expiry date of this price.
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getOffer

        com.ibm.commerce.order.objects.OfferAccessBean getOffer()
        Get the offer access bean that was used to determine the price.
        Returns:
        the offer access bean associated with the offer used to calculate the price.
      • getOfferId

        java.lang.Long getOfferId()
        Get the offer Id that was used to determine the price.
        Returns:
        the offer Id.
      • getPrice

        MonetaryAmount getPrice()
        Gets the actual price of the catalog entry. This price is in the requested currency of the shopper.
        Returns:
        the price of the catalog entry Id.
      • setCatEntryId

        void setCatEntryId(java.lang.Long aCatEntryId)
        Sets the primary key of the catalog entry whose price is to be retrieved.
        Parameters:
        aCatEntryId - the reference number of a catalog entry.
      • setContractIds

        void setContractIds(java.lang.Long[] aContractIdList)
        (Optional) Sets the contract IDs to be used to determine which offers apply. If no contract ID is specified then the default contract for the store is used.
        Parameters:
        aContractIdList - the contract IDs to use.
      • setCurrency

        void setCurrency(java.lang.String aCurrency)
        (Optional) Set the currency to be used for finding the price. If the currency is not specified then the "negotiated" currency is used for the store Id and shopper's preferred currency. (The negotiated currency is the currency returned from the getCurrency() method of the currency manager).
        Parameters:
        aCurrency - the currency.
      • setOfferIds

        void setOfferIds(java.lang.Long[] anOfferIdList)
        (Optional) Sets the offer IDs to use for the price. If no offer IDs are supplied, then the "best" of all qualifying offers will be used. If offer IDs are specified, the "best" of the specified offers will be returned.
        Parameters:
        anOfferIdList - the offer IDs.
      • setQuantity

        void setQuantity(QuantityAmount aQuantityAmount)
        (Optional) Set the quantity amount of the catalog entry that is to be priced. The quantity amount helps determine which offers are valid. If the quantity amount is not specified; then the nominal quantity (rounded up to the nearest multiple as specified in the quantityMultiple attribute) of the Catalog entry is assumed to be the requested quantity.
        Parameters:
        aQuantityAmount - a quantity amount.
      • setStoreId

        void setStoreId(java.lang.Integer aStoreId)
        (Optional) Set the store Id to use for calculating the price. If the store Id is not specified then the store Id of the command context will be used.
        Parameters:
        aStoreId - the store Id.