com.ibm.commerce.price.commands

Interface PredefinedConfigurationComponentPricingCmd

  • 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:
    PredefinedConfigurationComponentPricingCmdImpl


    public interface PredefinedConfigurationComponentPricingCmd
    extends com.ibm.commerce.command.TaskCommand
    TaskCommand used to calculate the price of a dynamic kit using a predefined configuration.
    • 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 implementation of this command.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.util.Set getAdditions(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
      Returns all of the items, that were added to the predefined configuration set on the command.
      MonetaryAmount getPriceDifferenceAddingComponents(java.util.Set components, java.lang.String currency, java.lang.Long contractId)
      Returns the price change to the predefined configuration that is caused by adding the components in the passed Set of DynamicKitComponent objects.
      MonetaryAmount getPriceDifferenceRemovingComponents(java.util.Set components, java.lang.String currency, java.lang.Long contractId)
      Returns the negated price change to the predefined configuration that is caused by removing the components in the passed Set of DynamicKitComponent objects.
      MonetaryAmount getPriceDifferenceReplacingComponents(java.util.Hashtable replacements, java.lang.String currency, java.lang.Long contractId)
      Returns the price change to the predefined configuration that is caused by preforming the component replacements in the passed Hashtable of DynamicKitComponent objects.
      java.util.Set getRemovals(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
      Returns all items that were removed from the predefined configuration set on the command in order to create the dynamic kit configuration represented by the OrderItemAccessBean passed.
      java.util.Hashtable getReplacements(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
      Returns a hashtable of the items, that were replaced in the predefined configuration set on the command.
      void setDynamicKitCatalogEntryId(java.lang.Long dynamicKitCatalogEntryId)
      Sets the catalog entry ID of the dynamic kit.
      void setPredefinedConfigurationId(java.lang.Long predefinedConfigurationId)
      Sets the ID of the predefined configuration to use.
      • 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 implementation of this command.
        See Also:
        Constant Field Values
    • Method Detail

      • getAdditions

        java.util.Set getAdditions(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
                            throws com.ibm.commerce.exception.ECException
        Returns all of the items, that were added to the predefined configuration set on the command. They are in order to create the dynamic kit configuration represented by the OrderItemAccessBean passed.
        Parameters:
        oiab - The OrderItemAccessBean that represents the dynamic kit configuration to price using the predefined configuration set on the command.
        Returns:
        A set of DynamicKitComponent objects that were added to the predefined configuration to yield the configuration represented by the OrderItemAccessBean passed into the command.
        Throws:
        com.ibm.commerce.exception.ECException - Thrown whenever there is an error determining the additions to the predefined configuration.
        See Also:
        OrderItemAccessBean, DynamicKitComponent
      • getPriceDifferenceAddingComponents

        MonetaryAmount getPriceDifferenceAddingComponents(java.util.Set components,
                                                          java.lang.String currency,
                                                          java.lang.Long contractId)
                                                   throws java.lang.Exception
        Returns the price change to the predefined configuration that is caused by adding the components in the passed Set of DynamicKitComponent objects.
        Parameters:
        components - A Set of DynamicKitComponent objects that represents the additions to the predefined configuration.
        currency - The currency in which to calculate the price changes.
        contractId - The ID of the contract to use to calculate the prices of each component in the components Set.
        Returns:
        A MonetaryAmount object that contains the price change to the predefined configuration.
        Throws:
        java.lang.Exception - Thrown whenever the price change cannot be calculated.
      • getPriceDifferenceRemovingComponents

        MonetaryAmount getPriceDifferenceRemovingComponents(java.util.Set components,
                                                            java.lang.String currency,
                                                            java.lang.Long contractId)
                                                     throws java.lang.Exception
        Returns the negated price change to the predefined configuration that is caused by removing the components in the passed Set of DynamicKitComponent objects.
        Parameters:
        components - A Set of DynamicKitComponent objects that represents the removals from the predefined configuration.
        currency - The currency in which to calculate the price changes.
        contractId - The ID of the contract to use to calculate the prices of each component in the components Set.
        Returns:
        A MonetaryAmount object that contains the price change to the predefined configuration.
        Throws:
        java.lang.Exception - Thrown whenever the price change cannot be calculated.
      • getPriceDifferenceReplacingComponents

        MonetaryAmount getPriceDifferenceReplacingComponents(java.util.Hashtable replacements,
                                                             java.lang.String currency,
                                                             java.lang.Long contractId)
                                                      throws java.lang.Exception
        Returns the price change to the predefined configuration that is caused by preforming the component replacements in the passed Hashtable of DynamicKitComponent objects.
        Parameters:
        replacements - A Hashtable of DynamicKitComponent objects that represents the replacements in the predefined configuration.
        currency - The currency in which to calculate the price changes.
        contractId - The ID of the contract to use to calculate the prices of each component in the components Set.
        Returns:
        a MonetaryAmount object that contains the price change to the predefined configuration.
        Throws:
        java.lang.Exception - Thrown whenever the price change cannot be calculated.
      • getRemovals

        java.util.Set getRemovals(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
                           throws com.ibm.commerce.exception.ECException
        Returns all items that were removed from the predefined configuration set on the command in order to create the dynamic kit configuration represented by the OrderItemAccessBean passed.
        Parameters:
        oiab - The OrderItemAccessBean that represents the dynamic kit configuration to price using the predefined configuration set on the command.
        Returns:
        A set of DynamicKitComponent objects that were removed from the predefined configuration to yield the configuration represented by the OrderItemAccessBean passed into the command.
        Throws:
        com.ibm.commerce.exception.ECException - Thrown whenever there is an error determining the removals from the predefined configuration.
        See Also:
        OrderItemAccessBean, DynamicKitComponent
      • getReplacements

        java.util.Hashtable getReplacements(com.ibm.commerce.order.objects.OrderItemAccessBean oiab)
                                     throws com.ibm.commerce.exception.ECException
        Returns a hashtable of the items, that were replaced in the predefined configuration set on the command. They are in order to create the dynamic kit configuration represented by the OrderItemAccessBean passed along with the replacement component.
        Parameters:
        oiab - The OrderItemAccessBean that represents the dynamic kit configuration to price using the predefined configuration set on the command.
        Returns:
        A hashtable representing the replacements. The keys of the hashtable are DynamicKitComponent objects, which represent the components that were replaced in the predefined configuration. They are to yield the configuration represented by the OrderItemAccessBean passed into the command. Each DynamicKitComponent key has a hashed DynamicKitComponent entry that represents the replacement of the DynamicKitComponent key in the predefined configuration.
        Throws:
        com.ibm.commerce.exception.ECException - Thrown whenever there is an error determining the replacements in the predefined configuration.
        See Also:
        OrderItemAccessBean, DynamicKitComponent
      • setDynamicKitCatalogEntryId

        void setDynamicKitCatalogEntryId(java.lang.Long dynamicKitCatalogEntryId)
        Sets the catalog entry ID of the dynamic kit.
        Parameters:
        dynamicKitCatalogEntryId - The catalog entry ID of the dynamic kit.
      • setPredefinedConfigurationId

        void setPredefinedConfigurationId(java.lang.Long predefinedConfigurationId)
        Sets the ID of the predefined configuration to use.
        Parameters:
        predefinedConfigurationId - The ID of the predefined configuration to use.