com.ibm.commerce.price.commands

Class CatalogFilterGetContractUnitPriceCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, GetContractSpecialPriceCmd, GetContractUnitPriceCmd, GetProductContractUnitPriceCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class CatalogFilterGetContractUnitPriceCmdImpl
    extends AbstractGetPriceCmdImpl
    CatalogFilterGetContractUnitPriceCmdImpl is a price command that can be used to enhance other commands to support catalog entry entitlement. This command implementation cannot be used independently.

    To use this command, register the interface name in the command registry similar to the example below.

    Interface name Command
    com.ibm.commerce.price.commands.GetContractUnitPriceCmd com.ibm.commerce.price.commands.CatalogFilterGetContractUnitPriceCmdImpl
    com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd com.ibm.commerce.price.commands.CatalogFilterGetContractUnitPriceCmdImpl
    com.ibm.commerce.price.commands.GetContractSpecialPriceCmd com.ibm.commerce.price.commands.CatalogFilterGetContractUnitPriceCmdImpl
    com.ibm.commerce.price.commands.GetContractUnitPriceCmd+AfterCatalogFilter <Next Implementation of com.ibm.commerce.price.commands.GetContractUnitPriceCmd>
    com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd+AfterCatalogFilter <Next Implementation of com.ibm.commerce.price.commands.GetProductContractUnitPriceCmd >
    com.ibm.commerce.price.commands.GetContractSpecialPriceCmd+AfterCatalogFilter <Next Implementation of com.ibm.commerce.price.commands.GetContractSpecialPriceCmd>

    Note that this command can be called by other price commands to form a chain.

    This command implementation has the following steps:

    1. Creates all combinations of catalog entries and trading agreements that were requested through the input parameters using PriceInputCase.createPriceCases(GetPriceCmdInput).
    2. Uses the CheckCatalogEntryEntitlementCmd to discover which combinations of catalog entry and trading agreement are not valid.
    3. If there are any remaining combinations, calls the next command in the command registry using AbstractGetPriceCmdImpl.executeNextInChain(GetPriceCmdInput, String) with a suffix of "AfterCatalogFilter".
    4. If there are no remaining combinations, does not call the next command.
    5. Any prices that were not attempted due to filtering by this command will be null. All other prices will be calculated according to the registered next command.
    • Constructor Detail

      • CatalogFilterGetContractUnitPriceCmdImpl

        public CatalogFilterGetContractUnitPriceCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Performs the steps described in the class description.
        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 - If an error occurred while obtaining or executing CheckCatalogEntryEntitlementCmd, or while getting a trading agreement to determine entitlement. This error will not be thrown if AbstractGetPriceCmdImpl.setErrorMode(boolean) was set to false.