com.ibm.commerce.price.commands

Class DeployPriceTCCmdImpl

  • 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, DeployTCCmd, DeployPriceTCCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class DeployPriceTCCmdImpl
    extends DeployTCCmdImpl
    implements DeployPriceTCCmd
    This DeployPriceTCCmd Task Command Implementation deploys the Price Terms & Conditions defined in a Trading Agreements.

    Three types of price Terms&Conditions to be deployed:

    • PriceTCPriceListWithOptionalAdjustment

      the price list id will be stored in BIGINTFIELD1, adjustment in FLOATFIELD1, product set id in INTEGERFIELD1.

    • PriceTCPriceListWithSelectiveAdjustment

      the price list id will be stored in BIGINTFIELD1, adjustment in FLAOTFIELD1, product set id in INTEGERFIELD1 and adjustment product set in INTEGERFIELD2.

    • PriceTCCustomPriceList

      the price list id will be stored in BIGINTFIELD1, producst set id in INTEGERFIELD1.

    This command calls the following TaskCommands:

    This command uses the following AccessBeans:
    • StoreAccessBean
    • BusinessPolicyAccessBean
    • OfferAccessBean
    • OfferPriceAccessBean
    • TermConditionAccessBean
    • PriceTCMasterCatalogWithOptionalAdjustmentAccessBean
    • PriceTCMasterCatalogWithFilteringAccessBean
    • PriceTCPriceListWithOptionalAdjustmentAccessBean
    • PriceTCPriceListWithSelectiveAdjustmentAccessBean
    • OrganizationAccessBean
    • CatalogAccessBean
    • TradingPositionContainerAccessBean
    • Constructor Summary

      Constructors 
      Constructor and Description
      DeployPriceTCCmdImpl()
      ContractCreateCommand constructor comment.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String createPriceListProductSetXML(java.lang.Long priceListId)
      If the product set DTD or XML is changed, customer need to overwrite this method
      java.lang.String createPriceListXML(java.lang.Long priceListId, boolean saveFlag)
      If the price list DTD or XML is change, customer need to overwrite this method
      void deployConfigBuildBlock()
      Deploys PriceTCConfigBuildBlock: the percentage price list id will be stored in BIGINTFIELD2, if there is only one percentage price list associated with the tc; product set id will be stored in INTEGERFIELD1.
      void deployCustomPriceList()
      Deploys PriceTCCustomPriceList: the price list id will be stored in BIGINTFIELD1, producst set id in INTEGERFIELD1.
      void deployMasterCatalogWOptAdj()
      Deploys PriceTCMasterCatalogWithOptionalAdjustment: the price list id will be stored in BIGINTFIELD1
      void deployPriceListWOptAdj()
      Deploys PriceTCPriceListWithOptionalAdjustment: the price list id will be stored in BIGINTFIELD1, adjustment in FLOATFIELD1, product set id in INTEGERFIELD1.
      void deployPriceListWSelAdj()
      Deploys PriceTCPriceListWithSelectiveAdjustment: the price list id will be stored in BIGINTFIELD1, adjustment in FLOATFIELD1, product set id in INTEGERFIELD1 and adjustment product set in INTEGERFIELD2.
      void performExecute()
      Execute the command.
      void setTermCondition(com.ibm.commerce.contract.objects.TermConditionAccessBean aTCAB)
      Sets the Term&Condition Access Bean to be deployed.
      void setXMLFlag(boolean aXMLFlag)
      Sets the indicator for XML creation (not being used).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 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, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
      • 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, validateParameters
    • Field Detail

      • COPYRIGHT

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

      • DeployPriceTCCmdImpl

        public DeployPriceTCCmdImpl()
        ContractCreateCommand constructor comment.
    • Method Detail

      • createPriceListProductSetXML

        public java.lang.String createPriceListProductSetXML(java.lang.Long priceListId)
                                                      throws com.ibm.commerce.exception.ECException,
                                                             java.sql.SQLException
        If the product set DTD or XML is changed, customer need to overwrite this method
        Parameters:
        priceListId - the priceList to create productset XML
        Returns:
        String a productset XML string
        Throws:
        com.ibm.commerce.exception.ECException
        java.sql.SQLException
      • createPriceListXML

        public java.lang.String createPriceListXML(java.lang.Long priceListId,
                                                   boolean saveFlag)
                                            throws com.ibm.commerce.exception.ECException,
                                                   java.sql.SQLException
        If the price list DTD or XML is change, customer need to overwrite this method
        Parameters:
        priceListId - a prictlist ID to be used to create XML string
        saveFlag - true if save to DB
        Returns:
        String generated pricelist XML file
        Throws:
        com.ibm.commerce.exception.ECException
        java.sql.SQLException
      • deployConfigBuildBlock

        public void deployConfigBuildBlock()
                                    throws com.ibm.commerce.exception.ECException
        Deploys PriceTCConfigBuildBlock: the percentage price list id will be stored in BIGINTFIELD2, if there is only one percentage price list associated with the tc; product set id will be stored in INTEGERFIELD1.
        Throws:
        com.ibm.commerce.exception.ECException
      • deployCustomPriceList

        public void deployCustomPriceList()
                                   throws com.ibm.commerce.exception.ECException,
                                          java.sql.SQLException
        Deploys PriceTCCustomPriceList: the price list id will be stored in BIGINTFIELD1, producst set id in INTEGERFIELD1.
        Throws:
        com.ibm.commerce.exception.ECException
        java.sql.SQLException
      • deployMasterCatalogWOptAdj

        public void deployMasterCatalogWOptAdj()
                                        throws com.ibm.commerce.exception.ECException
        Deploys PriceTCMasterCatalogWithOptionalAdjustment: the price list id will be stored in BIGINTFIELD1
        Throws:
        com.ibm.commerce.exception.ECException
      • deployPriceListWOptAdj

        public void deployPriceListWOptAdj()
                                    throws com.ibm.commerce.exception.ECException
        Deploys PriceTCPriceListWithOptionalAdjustment: the price list id will be stored in BIGINTFIELD1, adjustment in FLOATFIELD1, product set id in INTEGERFIELD1.
        Throws:
        com.ibm.commerce.exception.ECException
      • deployPriceListWSelAdj

        public void deployPriceListWSelAdj()
                                    throws com.ibm.commerce.exception.ECException
        Deploys PriceTCPriceListWithSelectiveAdjustment: the price list id will be stored in BIGINTFIELD1, adjustment in FLOATFIELD1, product set id in INTEGERFIELD1 and adjustment product set in INTEGERFIELD2.
        Throws:
        com.ibm.commerce.exception.ECException
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Execute 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
      • setXMLFlag

        public void setXMLFlag(boolean aXMLFlag)
        Sets the indicator for XML creation (not being used).
        Specified by:
        setXMLFlag in interface DeployPriceTCCmd
        Parameters:
        aXMLFlag - true to create xml string