com.ibm.commerce.tools.contract.beans

Class ShippingTCShippingChargeAdjustmentFilterDataBean

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


    public class ShippingTCShippingChargeAdjustmentFilterDataBean
    extends com.ibm.commerce.beans.SmartDataBeanImpl
    This data bean represents a Shipping Term and Condition Shipping Charge Adjustment Filter object. This data bean is used to populate the JavaScript 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: Master catalog (-10% All-shipmode). +-- Thinkpads (-20% All-shipmode). +-- T21s (-5 USD Overnight, -10% UPS 3-day). +-- T21-SKU001 (-0 USD Overnight). +-- T21-SKU002 (-0 All-shipmode). +-- T21-SKU003 (-5 USD Overnight, -10% UPS 3-day). +-- Aptivas (-0 All-shipmode). ... DATA BEAN JOB: -------------------- if (TC AB provided, or XML provided) go to CREATEVECTOR: get reseller default contract if none exists return error get reseller ShippingTCShippingChargeAdjustment TCs using TC access bean if none exists, return null CREATE VECTOR: initialize filterVector(); for each TC { convert tC object to CatalogShippingAdjustmentDataBean add filterVector(CatalogShippingAdjustmentDataBean) } done When populating the JROM used in the Catalog Filter dynamic tree, the data bean will be called. Contract Identifier is prerequisite parameter that need to be set before populate. The data bean maps to a database table TERMCOND
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String DEFAULT_ADJUSTMENT
      Default adjustment for all in the shipping charge adjustment filter tool
      • Fields inherited from interface com.ibm.commerce.beans.DataBean

        emptyString
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void buildCatalogShippingAdjustments()
      Based on the contract ID and create the Vector of CatalogShippingAdjustments Data Bean.
      java.lang.String getCatalogIdentifier()
      Gets the master catalog identifier for the store
      MemberDataBean getCatalogOwner()
      Gets the master catalog owner Member data bean for the store.
      java.lang.String getCatalogReferenceNumber()
      Gets the master catalog identifier for the store
      CatalogShippingAdjustmentDataBean getCatalogShippingAdjustment(int i)
      Gets a specific CatalogShippingAdjustment data bean.
      java.util.Vector getCatalogShippingAdjustments()
      Gets all the defined catalog shipping adjustments
      com.ibm.commerce.contract.objects.ContractAccessBean getContractAccessBean()
      Gets the contract access bean for this store
      java.lang.Long getContractId()
      Gets the contract ID
      java.sql.Timestamp getContractLastUpdateTime()
      Gets the contract last update time
      MemberDataBean getContractOwner()
      Gets the contract owner Member data bean for the store.
      java.lang.Integer getContractState()
      Gets the contract state
      java.lang.String getNodeReferenceNumber(com.ibm.commerce.contract.objects.ShippingTCShippingChargeAdjustmentAccessBean ab)
      Gets the node references number for this each CatalogShippingAdjustment node The node ref could be: "CA-xxx" or "CG-xxx" or "CE-xxx"
      java.lang.Integer getStoreId()
      Gets the store ID from the command context
      java.util.Vector getTermConditionAccessBeans()
      Gets a term and condition access beans that represent the ShippingTCShippingChargeAdjustment term and conditions that is going to be used for this data bean.
      java.util.Vector getTermConditionIds()
      Gets the term and condition ID
      java.lang.Boolean hasSharedCatalog()
      Determines whether the current store has a shared catalog, or is using a stand-alone partitioned catalog.
      void populate()
      This method is used to get the ShippingTCShippingChargeAdjustment term and condition access beans and converts all the term and condition access bean information into a vector of CatalogShippingAdjustment data beans.
      void setContractId(java.lang.Long newContractId)
      Sets the contract ID
      void setStoreId(java.lang.Integer newStoreId)
      Sets the store ID
      void setTermConditionAccessBeans(java.util.Vector newTCABs)
      Sets the term and condition access bean for this data bean.
      void setTermConditionIds(java.util.Vector newTermConditionIds)
      Sets the term and condition ID
      void trace(java.lang.String traceString)
      Outputs a line of trace if trace mode is true
      • Methods inherited from class com.ibm.commerce.beans.SmartDataBeanImpl

        fulfills, getCommandContext, getHttpRequest, getHttpResponse, getResources, getViewCommandContext, setCommandContext, setHttpRequest, setHttpResponse, setViewCommandContext
      • Methods inherited from class com.ibm.commerce.beans.InputDataBeanImpl

        getRequestProperties, setRequestProperties
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.beans.InputDataBean

        getRequestProperties, setRequestProperties
    • Field Detail

      • DEFAULT_ADJUSTMENT

        public static final java.lang.String DEFAULT_ADJUSTMENT
        Default adjustment for all in the shipping charge adjustment filter tool
        See Also:
        Constant Field Values
    • Constructor Detail

      • ShippingTCShippingChargeAdjustmentFilterDataBean

        public ShippingTCShippingChargeAdjustmentFilterDataBean()
    • Method Detail

      • buildCatalogShippingAdjustments

        public void buildCatalogShippingAdjustments()
        Based on the contract ID and create the Vector of CatalogShippingAdjustments Data Bean.
      • 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
      • getCatalogShippingAdjustment

        public CatalogShippingAdjustmentDataBean getCatalogShippingAdjustment(int i)
        Gets a specific CatalogShippingAdjustment data bean.
        Parameters:
        i - int
        Returns:
        CatalogShippingAdjustmentDataBean
      • getCatalogShippingAdjustments

        public java.util.Vector getCatalogShippingAdjustments()
        Gets all the defined catalog shipping adjustments
        Returns:
        Vector
      • 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
      • getNodeReferenceNumber

        public java.lang.String getNodeReferenceNumber(com.ibm.commerce.contract.objects.ShippingTCShippingChargeAdjustmentAccessBean ab)
        Gets the node references number for this each CatalogShippingAdjustment node The node ref could be: "CA-xxx" or "CG-xxx" or "CE-xxx"
        Parameters:
        ab - ShippingTCShippingChargeAdjustmentAccessBean
        Returns:
        String
      • getStoreId

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

        public java.util.Vector getTermConditionAccessBeans()
        Gets a term and condition access beans that represent the ShippingTCShippingChargeAdjustment term and conditions that is going to be used for this data bean. Generally, this data bean will be supplied the default contract ID for the store. If no default contract ID is supplied this method will attempt to determine one. Gets a list of term condition access beans that map to the ShippingTCShippingChargeAdjustment term and condition using the following algorithm:
        1) Check for all the known term condition IDs
        2) Check for a Contract ID and return all terms and conditions associated with it.
        Returns:
        ShippingTCShippingChargeAdjustmentAccessBean vector
      • getTermConditionIds

        public java.util.Vector getTermConditionIds()
        Gets the term and condition ID
        Returns:
        Long
      • 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 get the ShippingTCShippingChargeAdjustment term and condition access beans and converts all the term and condition access bean information into a vector of CatalogShippingAdjustment data beans. This vector can be used to load the catalog shipping adjustment filter tree. 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
      • setContractId

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

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

        public void setTermConditionAccessBeans(java.util.Vector newTCABs)
        Sets the term and condition access bean for this data bean.
        Parameters:
        newTCABs - TermConditionAccessBean
      • setTermConditionIds

        public void setTermConditionIds(java.util.Vector newTermConditionIds)
        Sets the term and condition ID
        Parameters:
        newTermConditionIds - Long
      • trace

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