com.ibm.commerce.tools.contract.beans

Class PriceTCMasterCatalogWithFilteringDataBean

  • java.lang.Object
    • com.ibm.commerce.beans.InputDataBeanImpl
      • com.ibm.commerce.beans.SmartDataBeanImpl
        • com.ibm.commerce.tools.contract.beans.PriceTCMasterCatalogWithFilteringDataBean
  • All Implemented Interfaces:
    com.ibm.commerce.beans.DataBean, com.ibm.commerce.beans.InputDataBean, com.ibm.commerce.beans.SmartDataBean, java.io.Serializable


    public class PriceTCMasterCatalogWithFilteringDataBean
    extends com.ibm.commerce.beans.SmartDataBeanImpl
    This data bean represents a PriceTCMasterCatalogWithFiltering object. This data bean is used to populate the Javacript Remote Object Model (JROM) used in the catalog filter dynamic tree. The JROM contains the current filters defined by a particular hosted reseller. Types of filters that can be defined are: 1. Master catalog included -10% 2. Thinkpads included -20% synch 3. T21s included -35% not synch 4. T21-SKU001 included 5. Aptivas excluded 6. T21-SKU002 excluded ... DATA BEAN PSEUDOCODE: -------------------- if (TC AB provided, or XML provided) go to CREATEVECTOR: get reseller default contract if none exists return error. get reseller PriceTCMasterCatalogWithFiltering TC using TC access bean if none exists, returns null. get XMLdefinition on PriceTCMasterCatalogWithFiltering TC. CREATEVECTOR: initialize filterVector(); parse XMLdefinition into DOM for each node { convert node object to CatalogFilterDataBean add filterVector(CatalogFilterDataBean) } done When populating the JROM used in the catalog filter dynamic tree, the data bean will be called. The store ID or XML Document is prerequisite parameter that need to be set before populate. The data bean maps to a database table TERMCOND
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_CATENTRY_ADJUSTMENT

        public static final java.lang.String DEFAULT_CATENTRY_ADJUSTMENT
        Default adjustment for all catentries in the catalog filter tool
        See Also:
        Constant Field Values
      • DEFAULT_CATENTRY_PRECEDENCE

        public static final java.lang.String DEFAULT_CATENTRY_PRECEDENCE
        Default precedence for catentries in the catalog filter. Set to a large number so that catentries will always be considered at a higher precedence by the runtime pricing algorithm
        See Also:
        Constant Field Values
      • DEFAULT_ITEM_PRECEDENCE

        public static final java.lang.String DEFAULT_ITEM_PRECEDENCE
        Default item precedence (infinity). Items have the highest precedence overall.
        See Also:
        Constant Field Values
      • DEFAULT_MASTER_CATALOG_PRECEDENCE

        public static final java.lang.String DEFAULT_MASTER_CATALOG_PRECEDENCE
        Default precedence for the master catalog filter
        See Also:
        Constant Field Values
      • DEFAULT_MASTER_CATALOG_SYNCHRONIZATION

        public static final java.lang.String DEFAULT_MASTER_CATALOG_SYNCHRONIZATION
        Default synchronization setting for the master catalog
        See Also:
        Constant Field Values
      • DEFAULT_PRODUCT_PRECEDENCE

        public static final java.lang.String DEFAULT_PRODUCT_PRECEDENCE
        Default product precedence (infinity-1). Products have the second highest precedence overall.
        See Also:
        Constant Field Values
      • MODE_CATALOG_FILTER_PUBLISH_ENGINE

        public static final int MODE_CATALOG_FILTER_PUBLISH_ENGINE
        Catalog Filter Publish Engine Data bean Mode
        See Also:
        Constant Field Values
      • MODE_CATALOG_FILTER_UI

        public static final int MODE_CATALOG_FILTER_UI
        Catalog Filter UI Data bean Mode
        See Also:
        Constant Field Values
      • PUBLISH_STATUS_FAILED

        public static final int PUBLISH_STATUS_FAILED
        Failed publish status
        See Also:
        Constant Field Values
      • PUBLISH_STATUS_INPROGRESS

        public static final int PUBLISH_STATUS_INPROGRESS
        Inprogress publish status
        See Also:
        Constant Field Values
      • PUBLISH_STATUS_SUCCESS

        public static final int PUBLISH_STATUS_SUCCESS
        Successful publish status
        See Also:
        Constant Field Values
    • Constructor Detail

      • PriceTCMasterCatalogWithFilteringDataBean

        public PriceTCMasterCatalogWithFilteringDataBean()
    • Method Detail

      • buildCatalogFilters

        public java.util.Vector buildCatalogFilters(org.w3c.dom.Document xmlDoc)
        Parses input XML and returns a vector of Catalog Filter data beans.
        Parameters:
        xmlDoc - Document
        Returns:
        Vector
      • getBaseContractId

        public java.lang.Long getBaseContractId()
        Gets the base contract ID
        Returns:
        Long
      • getCatalogFilter

        public CatalogFilterDataBean getCatalogFilter(int i)
        Gets a specific Catalog Filter data bean.
        Parameters:
        i - int
        Returns:
        CatalogFilterDataBean
      • getCatalogFilters

        public java.util.Vector getCatalogFilters()
        Gets all the defined catalog filters
        Returns:
        Vector
      • getCatalogIdentifier

        public java.lang.String getCatalogIdentifier()
        Gets the master catalog identifier for the store
        Returns:
        String
      • getCatalogOwner

        public MemberDataBean getCatalogOwner()
        Gets the master catalog owner Member data bean for the store.
        Returns:
        MemberDataBean
      • getCatalogReferenceNumber

        public java.lang.String getCatalogReferenceNumber()
        Gets the master catalog identifier for the store
        Returns:
        String
      • getContractAccessBean

        public com.ibm.commerce.contract.objects.ContractAccessBean getContractAccessBean()
        Gets the contract access bean for this store
        Returns:
        ContractAccessBean
      • getContractId

        public java.lang.Long getContractId()
        Gets the contract ID
        Returns:
        Long
      • getContractLastUpdateTime

        public java.sql.Timestamp getContractLastUpdateTime()
        Gets the contract last update time
        Returns:
        Timestamp
      • getContractOwner

        public MemberDataBean getContractOwner()
        Gets the contract owner Member data bean for the store.
        Returns:
        MemberDataBean
      • getContractState

        public java.lang.Integer getContractState()
        Gets the contract state
        Returns:
        Integer
      • getDatabeanMode

        public int getDatabeanMode()
        Gets the data bean mode.
        Returns:
        int
      • getDebugFilterXMLdefinition

        public java.lang.String getDebugFilterXMLdefinition()
        Creates a dummy XML string for debugging purposes and bypass getting the XML from the TCATTR table
        Returns:
        String
      • getExcludedProductSetIds

        public java.lang.String getExcludedProductSetIds()
        Gets the excluded product set ids from the hosting contract
        Returns:
        String
      • getFilterPublishStatus

        public java.lang.Integer getFilterPublishStatus()
        Gets the filter's last publish status
        Returns:
        Integer
      • getFilterPublishTime

        public java.sql.Timestamp getFilterPublishTime()
        Gets the filter's last publish timestamp
        Returns:
        Timestamp
      • getFilterXMLdefinition

        public java.lang.String getFilterXMLdefinition()
        Gets the XML definition for the PriceTCMasterCatalogWithFiltering term and condition.
        Returns:
        String
      • getHasGrandparentBaseContractWithFiltering

        public boolean getHasGrandparentBaseContractWithFiltering()
        Gets if this contract has a contract 2 or more levels above this one with a PriceTCMasterCatalogWithFiltering term and condition
        Returns:
        boolean
      • getImmediateDeploy

        public java.lang.Boolean getImmediateDeploy()
        Gets the immediate deployment flag
        Returns:
        java.lang.Boolean
      • getIncludeEntireCatalog

        public java.lang.Boolean getIncludeEntireCatalog()
        Gets the master catalog inclusion flag
        Returns:
        java.lang.Boolean
      • getPriceListPolicies

        public PolicyListDataBean getPriceListPolicies()
        Gets the price lists associated with this term and condition.
        Returns:
        PolicyListDataBean
      • getPriceTCMasterCatalogWithFilteringAccessBean

        public com.ibm.commerce.contract.objects.PriceTCMasterCatalogWithFilteringAccessBean getPriceTCMasterCatalogWithFilteringAccessBean()
        Gets the price term and condition access bean for this term and condition.
        Returns:
        PriceTCMasterCatalogWithFilteringAccessBean
      • getStoreId

        public java.lang.Integer getStoreId()
        Gets the store ID from the command context
        Returns:
        Integer
      • getTClastUpdateTime

        public java.sql.Timestamp getTClastUpdateTime()
        Gets the filter's last publish timestamp
        Returns:
        Timestamp
      • getTermConditionAccessBean

        public com.ibm.commerce.contract.objects.TermConditionAccessBean getTermConditionAccessBean()
        Gets a term and condition access bean that represents the PriceTCMasterCatalogWithFiltering term and condition that is going to be used for this data bean. Generally, this data bean will be supplied the default contract ID for the store for which we are executing this bean. If no default contract ID is supplied this method will attempt to determine one. Get a term condition access bean that maps to the PriceTCMasterCatalogWithFiltering TC using the following algorithm:
        1) check for a TC ID explicitly set by the application developer.
        2) check for a Contract ID set explicitly by the application developer.
        3) check for a Contract ID by looking it up based on the store ID explicitly set by the application developer.
        4) check for a Contract ID by first looking up a store ID in the store command context.
        Returns:
        TermConditionAccessBean
      • getTermConditionId

        public java.lang.Long getTermConditionId()
        Gets the term and condition ID
        Returns:
        Long
      • getXMLdocument

        public org.w3c.dom.Document getXMLdocument(java.lang.String xmlString)
        Gets the XML document describing the PriceTCMasterCatalogWithFiltering term and condition.
        Parameters:
        xmlString - String
        Returns:
        Document
      • hasSharedCatalog

        public java.lang.Boolean hasSharedCatalog()
        Determines whether the current store has a shared catalog, or is using a stand-alone partitioned catalog. The catalog filter tool can only be used when a shared catalog relationship exists.
        Returns:
        boolean
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to populate the PriceTCMasterCatalogWithFilteringDataBean. Gets the XML document describing the PriceTCMasterCatalogWithFiltering term and condition and converts the XML definition into a vector of Catalog Filter data beans. This vector can be used to load the Catalog Filter, or by the product set commands. Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Overrides:
        populate in class com.ibm.commerce.beans.SmartDataBeanImpl
        Throws:
        java.lang.Exception
      • setBaseContractId

        public void setBaseContractId(java.lang.Long newBaseContractId)
        Sets the base contract ID.
        Parameters:
        newBaseContractId - Long
      • setContractId

        public void setContractId(java.lang.Long newContractId)
        Set the contract ID
        Parameters:
        newContractId - Long
      • setDatabeanMode

        public void setDatabeanMode(int newDatabeanMode)
        Sets the data bean mode.
        Parameters:
        newDatabeanMode - int
      • setDebugMode

        public void setDebugMode(boolean newDebugMode)
        Sets the debug mode
        Parameters:
        newDebugMode - boolean
      • setDoNotFindDefaultContract

        public void setDoNotFindDefaultContract()
        Sets whether the bean should find the default contract
      • setFilterXMLdefinition

        public void setFilterXMLdefinition(java.lang.String newFilterXMLdefinition)
        Sets the XML definition for the PriceTCMasterCatalogWithFiltering term and condition.
        Parameters:
        newFilterXMLdefinition - String
      • setHostingMode

        public void setHostingMode(boolean newHostingMode)
        Sets the hosting mode.
        Parameters:
        newHostingMode - boolean
      • setStoreId

        public void setStoreId(java.lang.Integer newStoreId)
        Sets the store ID
        Parameters:
        newStoreId - Integer
      • setTermConditionAccessBean

        public void setTermConditionAccessBean(com.ibm.commerce.contract.objects.TermConditionAccessBean newTCAB)
        Sets the term and condition access bean for this data bean.
        Parameters:
        newTCAB - TermConditionAccessBean
      • setTermConditionId

        public void setTermConditionId(java.lang.Long newTermConditionId)
        Sets the term and condition ID
        Parameters:
        newTermConditionId - Long
      • setValidateReferenceNumbers

        public void setValidateReferenceNumbers(boolean newValidate)
        Sets if the reference numbers should be validated against the database.
        Parameters:
        newValidate - boolean
      • trace

        public void trace(java.lang.String traceString)
        Outputs a line of trace if trace mode is true
        Parameters:
        traceString - String