com.ibm.commerce.tools.contract.beans

Class ProductTreeDataBean

  • java.lang.Object
    • com.ibm.commerce.tools.contract.beans.ProductTreeDataBean
  • All Implemented Interfaces:
    com.ibm.commerce.beans.DataBean, com.ibm.commerce.beans.InputDataBean, com.ibm.commerce.beans.SmartDataBean, com.ibm.commerce.tools.common.ui.DynamicTreeUserDataBean, java.io.Serializable


    public class ProductTreeDataBean
    extends java.lang.Object
    implements com.ibm.commerce.tools.common.ui.DynamicTreeUserDataBean
    This data bean represents a Product Tree object. When displaying the results of a product search in a tree view, the data bean will be called. RequestProperties and commandContext are prerequisite parameters that need to be set before populate.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CATENTRY_TYPE_BUNDLE
      Catentry type constants
      static java.lang.String CATENTRY_TYPE_ITEM
      Catentry type constants
      static java.lang.String CATENTRY_TYPE_PACKAGE
      Catentry type constants
      static java.lang.String CATENTRY_TYPE_PRODUCT
      Catentry type constants
      • Fields inherited from interface com.ibm.commerce.beans.DataBean

        emptyString
    • Constructor Summary

      Constructors 
      Constructor and Description
      ProductTreeDataBean()
      Constructs a ProductTreeDataBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String buildCategoryExclusionQuery(java.lang.String contractId, java.lang.String catalogId)
      Builds the query to excluded the excluded categories
      java.lang.String buildProductExclusionQuery(java.lang.String contractId)
      Builds the query to excluded the excluded catentries
      java.lang.String getCatalogId()
      Gets the catalog identifier for the tree
      java.lang.String getCategoryId()
      Gets the category identifier for the tree
      com.ibm.commerce.command.CommandContext getCommandContext()
      Gets the command context
      java.lang.String getContractId()
      Gets the contract identifier for the tree
      java.lang.String getDefaultLanguageId()
      Gets the language identifier for the language in which to search
      java.lang.String getExcludedProductSets(java.lang.String contractId)
      Finds the excluded product sets from the base contract
      java.util.Vector getIconInfo()
      Gets the information for the icons in the tree
      java.lang.String getLanguageId()
      Gets the language identifier for the language in which to fetch.
      java.util.Vector getMenuInfo()
      Gets the information for the menu
      java.util.Vector getNodeInfo()
      Gets the information for the nodes in the tree
      com.ibm.commerce.datatype.TypedProperty getRequestProperties()
      Gets the request properties
      java.lang.String getSelectionType()
      Gets the selection type
      java.lang.String getStoreId()
      Gets the store identifier
      java.lang.String getStoreIds()
      Gets the store identifiers for all the related stores in the store path
      void populate()
      This method is used to populate the data bean.
      void setCommandContext(com.ibm.commerce.command.CommandContext cc)
      Sets the command context
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
      Sets the requestProperties associated with the data bean.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CATENTRY_TYPE_BUNDLE

        public static final java.lang.String CATENTRY_TYPE_BUNDLE
        Catentry type constants
        See Also:
        Constant Field Values
      • CATENTRY_TYPE_ITEM

        public static final java.lang.String CATENTRY_TYPE_ITEM
        Catentry type constants
        See Also:
        Constant Field Values
      • CATENTRY_TYPE_PACKAGE

        public static final java.lang.String CATENTRY_TYPE_PACKAGE
        Catentry type constants
        See Also:
        Constant Field Values
      • CATENTRY_TYPE_PRODUCT

        public static final java.lang.String CATENTRY_TYPE_PRODUCT
        Catentry type constants
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProductTreeDataBean

        public ProductTreeDataBean()
        Constructs a ProductTreeDataBean
    • Method Detail

      • buildCategoryExclusionQuery

        public java.lang.String buildCategoryExclusionQuery(java.lang.String contractId,
                                                            java.lang.String catalogId)
        Builds the query to excluded the excluded categories
        Parameters:
        contractId - java.lang.String
        catalogId - java.lang.String
        Returns:
        String
      • buildProductExclusionQuery

        public java.lang.String buildProductExclusionQuery(java.lang.String contractId)
        Builds the query to excluded the excluded catentries
        Parameters:
        contractId - java.lang.String
        Returns:
        String
      • getCatalogId

        public java.lang.String getCatalogId()
                                      throws com.ibm.commerce.exception.ECSystemException
        Gets the catalog identifier for the tree
        Returns:
        String
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getCategoryId

        public java.lang.String getCategoryId()
                                       throws com.ibm.commerce.exception.ECSystemException
        Gets the category identifier for the tree
        Returns:
        String
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getCommandContext

        public com.ibm.commerce.command.CommandContext getCommandContext()
        Gets the command context
        Specified by:
        getCommandContext in interface com.ibm.commerce.beans.SmartDataBean
      • getContractId

        public java.lang.String getContractId()
                                       throws com.ibm.commerce.exception.ECSystemException
        Gets the contract identifier for the tree
        Returns:
        String
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getDefaultLanguageId

        public java.lang.String getDefaultLanguageId()
                                              throws java.lang.Exception
        Gets the language identifier for the language in which to search
        Returns:
        java.lang.String - language identifier
        Throws:
        java.lang.Exception - - Thrown whenever an exception is encountered.
      • getExcludedProductSets

        public java.lang.String getExcludedProductSets(java.lang.String contractId)
        Finds the excluded product sets from the base contract
        Parameters:
        contractId - java.lang.String
        Returns:
        String
      • getIconInfo

        public java.util.Vector getIconInfo()
                                     throws com.ibm.commerce.exception.ECSystemException
        Gets the information for the icons in the tree
        Specified by:
        getIconInfo in interface com.ibm.commerce.tools.common.ui.DynamicTreeUserDataBean
        Returns:
        Vector
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getLanguageId

        public java.lang.String getLanguageId()
                                       throws java.lang.Exception
        Gets the language identifier for the language in which to fetch.
        Returns:
        java.lang.String - language identifier
        Throws:
        java.lang.Exception - - Thrown whenever an exception is encountered.
      • getMenuInfo

        public java.util.Vector getMenuInfo()
                                     throws com.ibm.commerce.exception.ECSystemException
        Gets the information for the menu
        Specified by:
        getMenuInfo in interface com.ibm.commerce.tools.common.ui.DynamicTreeUserDataBean
        Returns:
        Vector
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getNodeInfo

        public java.util.Vector getNodeInfo()
                                     throws com.ibm.commerce.exception.ECSystemException
        Gets the information for the nodes in the tree
        Specified by:
        getNodeInfo in interface com.ibm.commerce.tools.common.ui.DynamicTreeUserDataBean
        Returns:
        Vector
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getRequestProperties

        public com.ibm.commerce.datatype.TypedProperty getRequestProperties()
        Gets the request properties
        Specified by:
        getRequestProperties in interface com.ibm.commerce.beans.InputDataBean
      • getSelectionType

        public java.lang.String getSelectionType()
                                          throws com.ibm.commerce.exception.ECSystemException
        Gets the selection type
        Returns:
        java.lang.String
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • getStoreId

        public java.lang.String getStoreId()
                                    throws java.lang.Exception
        Gets the store identifier
        Returns:
        java.lang.String - store identifier
        Throws:
        java.lang.Exception - - Thrown whenever an exception is encountered while retrieving store Id
      • getStoreIds

        public java.lang.String getStoreIds()
                                     throws java.lang.Exception
        Gets the store identifiers for all the related stores in the store path
        Returns:
        java.lang.String - store identifiers
        Throws:
        java.lang.Exception - - Thrown whenever an exception is encountered while retrieving related stores using the store access bean.
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to populate the data bean. You should have everything you require from requestProperties and commandContext before this method is executed. Populates all nodes information and appends to the nodeInfo vector, which will later be retrieved by a caller data bean through the getNodeInfo() method. Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Throws:
        java.lang.Exception
      • setCommandContext

        public void setCommandContext(com.ibm.commerce.command.CommandContext cc)
        Sets the command context
        Specified by:
        setCommandContext in interface com.ibm.commerce.beans.SmartDataBean
        Parameters:
        cc - com.ibm.commerce.command.CommandContext
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
                                  throws java.lang.Exception
        Sets the requestProperties associated with the data bean. This is called by the DataBeanManager during the activate method.
        Specified by:
        setRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Parameters:
        param - - the set of properties passed to the JSP page that invokes this data bean,
        Throws:
        java.lang.Exception