com.ibm.commerce.price.commands

Class RetrievePricesCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.command.BusinessPolicyCommandImpl
              • com.ibm.commerce.price.commands.RetrievePricesCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, RetrievePricesCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command
    Direct Known Subclasses:
    MarketplaceRetrievePricesCmdImpl


    public class RetrievePricesCmdImpl
    extends com.ibm.commerce.command.BusinessPolicyCommandImpl
    implements RetrievePricesCmd
    This RetrievePricesCmd Task Command Implementation retrieves all the qualified offers for one or more catalog entries from the price lists which are referenced by the entitled contracts.

    If the command is successful in retrieving offers, it will return a list of qualified offers that can provide the offer prices.

    If unsuccessful, it will return an empty list.

    Behaviour

    Obtain all the qualified offers for each catalog entries. each offer, to be retrieved to find the price of a catalog entry, must satisfy certain criteria.

    If no valid offer can be found, the parent product offers will be searched providing the catalog entry. And the parent product is not excluded from the trading agreements.

    This command calls the following TaskCommands:

    This command uses the following AccessBeans:
    • StoreAccessBean
    • CatalogHelperAccessBean
    • CatalogEntryAccessBean
    • OfferAccessBean
    • ProductSetCeRelAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Hashtable[] getItemOffers()
      Returns all the qualified offers retrieved for each of the input items.
      void performExecute()
      Executes main business logic of the command.
      void reset()
      Prepare this command for re-execution.
      void setCatEntryIds(java.lang.Long[] aCatEntryIds)
      Sets the ids of the input catentries whose prices are to be calculated.
      void setCurrency(java.lang.String astrCurrency)
      Sets the currency to be used for finding the price (Optional).
      void setItemOffers(java.util.Hashtable[] aItemOffers)
      Sets the qualified offers retrieved for each of the items.
      void setOfferIds(java.lang.Long[] aOfferIds)
      Sets the ids of the input offers to be used for retrieving the offer prices (Optional).
      void setOutputProperties(TargetableCommand aCachedCommand)
      Sets the output properties by copying results from a previously cached command.
      void setPriceListIds(java.lang.Long[] aPriceListIds)
      Sets the ids of the input price lists to be used for retrieving the offers.
      void setPSExclusionList(java.lang.Integer[] aPSExclusionList)
      Sets the list of product sets excluded from the trading agreements.
      void setPSInclusionList(java.lang.Integer[] aPSInclusionList)
      Sets the list of product sets included in the trading agreements.
      void setQuantities(QuantityAmount[] aQuantities)
      Sets the quantities of the catentries to be used for calculating the prices.
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty requestProperties)
      Sets the request properties for the policy.
      void setStoreId(java.lang.Integer aStoreId)
      Sets the id of the input store to be used for calculating the price (Optional).
      void validateParameters()
      Checks mandatory parameters.
      • Methods inherited from class java.lang.Object

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

        getPolicyId, getRequestProperties, setPolicyId
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand

        getPolicyId, getRequestProperties, setPolicyId
      • 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, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
    • Field Detail

      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        class name field
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • RetrievePricesCmdImpl

        public RetrievePricesCmdImpl()
        Constructor.
    • Method Detail

      • getItemOffers

        public java.util.Hashtable[] getItemOffers()
        Returns all the qualified offers retrieved for each of the input items.
        Specified by:
        getItemOffers in interface RetrievePricesCmd
        Returns:
        offers for all the items
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Executes main business logic of the command.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException
      • reset

        public void reset()
        Prepare this command for re-execution.
        Overrides:
        reset in class com.ibm.commerce.command.AbstractECTargetableCommand
      • setCatEntryIds

        public void setCatEntryIds(java.lang.Long[] aCatEntryIds)
        Sets the ids of the input catentries whose prices are to be calculated.
        Specified by:
        setCatEntryIds in interface RetrievePricesCmd
        Parameters:
        aCatEntryIds - the catalog entry IDs
      • setCurrency

        public void setCurrency(java.lang.String astrCurrency)
        Sets the currency to be used for finding the price (Optional).
        Specified by:
        setCurrency in interface RetrievePricesCmd
        Parameters:
        astrCurrency - the currency
      • setItemOffers

        public void setItemOffers(java.util.Hashtable[] aItemOffers)
        Sets the qualified offers retrieved for each of the items.
        Parameters:
        aItemOffers - the offers for items
      • setOfferIds

        public void setOfferIds(java.lang.Long[] aOfferIds)
        Sets the ids of the input offers to be used for retrieving the offer prices (Optional).
        Specified by:
        setOfferIds in interface RetrievePricesCmd
        Parameters:
        aOfferIds - the input offer IDs
      • setOutputProperties

        public void setOutputProperties(TargetableCommand aCachedCommand)
        Sets the output properties by copying results from a previously cached command.
        Parameters:
        aCachedCommand - the previously cached command.
      • setPriceListIds

        public void setPriceListIds(java.lang.Long[] aPriceListIds)
        Sets the ids of the input price lists to be used for retrieving the offers.
        Specified by:
        setPriceListIds in interface RetrievePricesCmd
        Parameters:
        aPriceListIds - the input price list IDs
      • setPSExclusionList

        public void setPSExclusionList(java.lang.Integer[] aPSExclusionList)
        Sets the list of product sets excluded from the trading agreements.
        Specified by:
        setPSExclusionList in interface RetrievePricesCmd
        Parameters:
        aPSExclusionList - the product set exclusion list
      • setPSInclusionList

        public void setPSInclusionList(java.lang.Integer[] aPSInclusionList)
        Sets the list of product sets included in the trading agreements.
        Specified by:
        setPSInclusionList in interface RetrievePricesCmd
        Parameters:
        aPSInclusionList - the product set inclusion lists
      • setQuantities

        public void setQuantities(QuantityAmount[] aQuantities)
        Sets the quantities of the catentries to be used for calculating the prices.
        Specified by:
        setQuantities in interface RetrievePricesCmd
        Parameters:
        aQuantities - the quantities of the catentries
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty requestProperties)
        Sets the request properties for the policy.
        Specified by:
        setRequestProperties in interface com.ibm.commerce.command.BusinessPolicyCommand
        Overrides:
        setRequestProperties in class com.ibm.commerce.command.BusinessPolicyCommandImpl
        Parameters:
        requestProperties - the request properties for the policy
      • setStoreId

        public void setStoreId(java.lang.Integer aStoreId)
        Sets the id of the input store to be used for calculating the price (Optional).
        Specified by:
        setStoreId in interface RetrievePricesCmd
        Parameters:
        aStoreId - the store ID
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Checks mandatory parameters.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException