com.ibm.commerce.price.commands

Interface GetEntitledPriceCmd

  • 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:
    AbstractGetEntitledPriceCmdImpl, GetCachedEntitledPriceCmdImpl, GetExternalEntitledPriceCmdImpl, GetExternalEntitledPriceWithCacheCheckCmdImpl


    public interface GetEntitledPriceCmd
    extends com.ibm.commerce.command.TaskCommand
    This command retrieves the best offer prices for one or more catalog entries from either the local cache or the external system.

    There are two ways to use the command:

    • Give command required catalog ID with optional quantity and currency and get price using getPrice.
    • Give command Catalog entry prices array of type CatEntryPrices and get price using getCatEntryPrices.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM copyright notice field.
      static java.lang.String defaultCommandClassName
      The default implementation 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
      CatEntryPrices[] getCatEntryPrices()
      Returns the price related information of the input catalog entries set by setCatEntryPrices.
      java.lang.String getCurrency()
      Returns the currency of a catalog entry.
      MonetaryAmount getPrice()
      Returns the actual price of the catalog entry if setCatEntryId was invoked to set input parameter.
      QuantityAmount getQuantity()
      Returns a quantity of a catalog entry.
      void setCatEntryId(java.lang.Long anCatEntryId)
      Sets the id of the input catalog entry.
      void setCatEntryPrices(CatEntryPrices[] aCatEntryPrices)
      Sets the information of one or more catalog entries.
      void setCurrency(java.lang.String astrCurrency)
      Sets the currency to be used for finding the price (Optional).
      void setQuantity(QuantityAmount aQuantityAmount)
      Sets the quantity amount of the input catalog entry that is to be priced (Optional).
      void setStoreId(java.lang.Integer aStoreId)
      Sets the id of the input store to be used for calculating the price (Optional).
      • 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
        The IBM copyright notice field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default implementation of this command.
        See Also:
        Constant Field Values
    • Method Detail

      • getCatEntryPrices

        CatEntryPrices[] getCatEntryPrices()
        Returns the price related information of the input catalog entries set by setCatEntryPrices.
        Returns:
        The price related information of the input catalog entries.
      • getCurrency

        java.lang.String getCurrency()
                              throws com.ibm.commerce.exception.ECSystemException
        Returns the currency of a catalog entry. If the currency is provided by the caller, the input will be returned, otherwise it returns a default currency of the store.
        Returns:
        currency
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getPrice

        MonetaryAmount getPrice()
        Returns the actual price of the catalog entry if setCatEntryId was invoked to set input parameter.
        Returns:
        The actual price of the catalog entry in the requested currency of the shopper.
      • getQuantity

        QuantityAmount getQuantity()
                            throws com.ibm.commerce.exception.ECSystemException
        Returns a quantity of a catalog entry. If quantity is provided by caller, the input will be returned, otherwise it returns a default nominal quantity for input catalog entry.
        Returns:
        Either the specified quantity, or a nominal quantity amount.
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • setCatEntryId

        void setCatEntryId(java.lang.Long anCatEntryId)
        Sets the id of the input catalog entry.
        Parameters:
        anCatEntryId - The reference number of a catalog entry whose price is to be retrieved and calculated.
      • setCatEntryPrices

        void setCatEntryPrices(CatEntryPrices[] aCatEntryPrices)
        Sets the information of one or more catalog entries. If this method is invoked to set input parameters, the getCatEntryPrices will be used to get price based on input.
        Parameters:
        aCatEntryPrices - The information of one or more catalog entries whose prices are To be retrieved.
      • setCurrency

        void setCurrency(java.lang.String astrCurrency)
        Sets the currency to be used for finding the price (Optional).
        Parameters:
        astrCurrency - The currency to look up 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).
      • setQuantity

        void setQuantity(QuantityAmount aQuantityAmount)
        Sets the quantity amount of the input catalog entry that is to be priced (Optional).
        Parameters:
        aQuantityAmount - The quantity amount of the catalog entry. 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.
      • setStoreId

        void setStoreId(java.lang.Integer aStoreId)
        Sets the id of the input store to be used for calculating the price (Optional).
        Parameters:
        aStoreId - The reference number of a store to be used for calculating the price. If the store id is not specified then the store id of the command context will be used.