com.ibm.commerce.tools.campaigns
Class ProductTreeDataBean

java.lang.Object
  |
  +--com.ibm.commerce.tools.campaigns.ProductTreeDataBean
All Implemented Interfaces:
DataBean, DynamicTreeUserDataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class ProductTreeDataBean
extends java.lang.Object
implements DynamicTreeUserDataBean

The ProductTreeDataBean class extends the com.ibm.commerce.tools.common.ui.DynamicTreeUserDataBean class to create the catalog browser used in campaign creation.

See Also:
Serialized Form

Field Summary
protected  java.lang.String catalogId
          The catalog ID defined in the root of this product tree.
protected  java.lang.String categoryId
          The category ID holder to be used when constructing the tree.
static java.lang.String CATENTRY_TYPE_BUNDLE
          Catalog entry type constants
static java.lang.String CATENTRY_TYPE_DYNAMIC_KIT
          Catalog entry type constants
static java.lang.String CATENTRY_TYPE_ITEM
          Catalog entry type constants
static java.lang.String CATENTRY_TYPE_PACKAGE
          Catalog entry type constants
static java.lang.String CATENTRY_TYPE_PRODUCT
          Catalog entry type constants
protected  java.lang.String catentryId
          The catalog entry ID holder to be used when constructing the tree.
protected  CommandContext commandContext
          The command context used in this bean.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
protected  java.lang.String defaultLanguageId
          The ID of the runtime default language.
protected  java.util.Vector iconInfo
          The vector of all the icon information in the tree.
protected  java.lang.String languageId
          The ID of the language that the node entry is in.
protected  java.lang.String locationType
          The location type of this product tree.
protected  java.util.Vector menuInfo
          The vector of all the menu information in the tree.
protected  java.util.Vector nodeInfo
          The vector of all the node information in the tree.
static java.lang.String QUERY_TYPE_FIND_CATALOG_BY_STORE
          Query type constants
static java.lang.String QUERY_TYPE_FIND_CATENTRY_BY_CATGROUP
          Query type constants
static java.lang.String QUERY_TYPE_FIND_CATGROUP_BY_CATALOG
          Query type constants
static java.lang.String QUERY_TYPE_FIND_CHILD_CATENTRY_BY_PARENT_CATENTRY
          Query type constants
static java.lang.String QUERY_TYPE_FIND_CHILD_CATGROUP_BY_PARENT_CATGROUP
          Query type constants
protected  java.lang.String queryType
          The query type defines which query is to be executed to get the appropriate data to display in the current tree level.
protected  TypedProperty requestProperties
          The request properties used in this bean.
protected  java.lang.String selectionType
          The selection type of this product tree.
protected  java.lang.String storeId
          The ID of the current store.
protected  java.lang.String storeIds
          The IDs of the all the related stores in the store path.
protected  java.lang.String storeRelType
          The store relationship type in the store path.
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Constructor Summary
ProductTreeDataBean()
          Constructs a ProductTreeDataBean object.
 
Method Summary
  DynamicTreeNode buildCatalogNode(java.util.Vector catalogRow)
          Builds a catalog node for the dynamic tree.
  DynamicTreeNode buildCategoryNode(java.util.Vector categoryRow)
          Builds a category node for the dynamic tree.
  DynamicTreeNode buildCatentryNode(java.util.Vector catentryRow)
          Builds a catalog entry node for the dynamic tree.
 java.lang.String buildQuery()
          Constructs the database query that is used to fetch tree node data.
 java.lang.String getCatalogId()
          Gets the catalog ID defined in the root of this product tree.
 java.lang.String getCategoryId()
          Gets the category ID of the selected tree node.
 java.lang.String getCatentryId()
          Gets the catalog entry ID of the selected tree node.
  CommandContext getCommandContext()
          Gets the command context associated with the data bean.
 java.lang.String getDefaultLanguageId()
          Gets the language identifier for the language in which to search.
 java.util.Vector getIconInfo()
          Gets the icon information of the dynamic tree node, represented by a Vector object.
 java.lang.String getLanguageId()
          Gets the language identifier for the language in which to fetch.
 java.lang.String getLocationType()
          Gets the location type of this product tree, where different locations represent different search type.
 java.util.Vector getMenuInfo()
          Gets the menu information of the dynamic tree node, represented by a Vector object.
 java.util.Vector getNodeInfo()
          Gets the node information of the dynamic tree node, represented by a Vector object.
 java.lang.String getQueryType()
          Gets the query type of the current tree level, where different types map to a query that finds different types of result (catalog, category or catalog entry).
  TypedProperty getRequestProperties()
          Gets the request properties associated with the data bean.
 java.lang.String getSelectionType()
          Gets the selection type of this product tree, which identifies whether this tree is used for category selection, catalog entry selection, or both.
 java.lang.String getStoreId()
          Gets the ID of the store that is currently logged on to.
 java.lang.String getStoreIds()
          Gets the store identifiers for all the related stores in the store path.
 java.lang.String getStoreRelType()
          Gets the store relationship type in the store path.
 void populate()
          Populates all nodes info and append to the nodeInfo vector, which will be later retrieved by a caller data bean through getNodeInfo() method.
 void setCatalogId(java.lang.String newCatalogId)
          Sets the catalog ID defined in the root of this product tree.
 void setCategoryId(java.lang.String newCategoryId)
          Sets the category ID of the selected tree node.
 void setCatentryId(java.lang.String newCatentryId)
          Sets the catalog entry ID of the selected tree node.
 void setCommandContext( CommandContext cc)
          Sets the command context associated with the data bean.
 void setLanguageId(java.lang.String newLanguageId)
          Sets the language identifier for the language in which to fetch.
 void setLocationType(java.lang.String newLocationType)
          Sets the location type of this product tree, where different locations represent different search type.
 void setQueryType(java.lang.String newQueryType)
          Sets the query type of the current tree level, where different types map to a query that finds different types of result (catalog, category or catalog entry).
 void setRequestProperties( TypedProperty param)
          Sets the request properties associated with the data bean.
 void setSelectionType(java.lang.String newSelectionType)
          Sets the selection type of this product tree, which identifies whether this tree is used for category selection, catalog entry selection, or both.
 void setStoreId(java.lang.String newStoreId)
          Sets the ID of the store that is currently logged on to.
 void setStoreIds(java.lang.String newStoreIds)
          Sets the store identifiers for all the related stores in the store path.
 void setStoreRelType(java.lang.String newStoreRelType)
          Sets the store relationship type in the store path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

catalogId

protected java.lang.String catalogId
The catalog ID defined in the root of this product tree.

categoryId

protected java.lang.String categoryId
The category ID holder to be used when constructing the tree.

catentryId

protected java.lang.String catentryId
The catalog entry ID holder to be used when constructing the tree.

commandContext

protected CommandContext commandContext
The command context used in this bean.

defaultLanguageId

protected java.lang.String defaultLanguageId
The ID of the runtime default language.

iconInfo

protected java.util.Vector iconInfo
The vector of all the icon information in the tree.

languageId

protected java.lang.String languageId
The ID of the language that the node entry is in.

locationType

protected java.lang.String locationType
The location type of this product tree.

protected java.util.Vector menuInfo
The vector of all the menu information in the tree.

nodeInfo

protected java.util.Vector nodeInfo
The vector of all the node information in the tree.

queryType

protected java.lang.String queryType
The query type defines which query is to be executed to get the appropriate data to display in the current tree level.

requestProperties

protected TypedProperty requestProperties
The request properties used in this bean.

selectionType

protected java.lang.String selectionType
The selection type of this product tree.

storeId

protected java.lang.String storeId
The ID of the current store.

storeIds

protected java.lang.String storeIds
The IDs of the all the related stores in the store path.

storeRelType

protected java.lang.String storeRelType
The store relationship type in the store path.

CATENTRY_TYPE_PRODUCT

public static final java.lang.String CATENTRY_TYPE_PRODUCT
Catalog entry type constants

CATENTRY_TYPE_ITEM

public static final java.lang.String CATENTRY_TYPE_ITEM
Catalog entry type constants

CATENTRY_TYPE_PACKAGE

public static final java.lang.String CATENTRY_TYPE_PACKAGE
Catalog entry type constants

CATENTRY_TYPE_BUNDLE

public static final java.lang.String CATENTRY_TYPE_BUNDLE
Catalog entry type constants

CATENTRY_TYPE_DYNAMIC_KIT

public static final java.lang.String CATENTRY_TYPE_DYNAMIC_KIT
Catalog entry type constants

QUERY_TYPE_FIND_CATALOG_BY_STORE

public static final java.lang.String QUERY_TYPE_FIND_CATALOG_BY_STORE
Query type constants
See Also:
Constant Field Values

QUERY_TYPE_FIND_CATGROUP_BY_CATALOG

public static final java.lang.String QUERY_TYPE_FIND_CATGROUP_BY_CATALOG
Query type constants
See Also:
Constant Field Values

QUERY_TYPE_FIND_CHILD_CATGROUP_BY_PARENT_CATGROUP

public static final java.lang.String QUERY_TYPE_FIND_CHILD_CATGROUP_BY_PARENT_CATGROUP
Query type constants
See Also:
Constant Field Values

QUERY_TYPE_FIND_CATENTRY_BY_CATGROUP

public static final java.lang.String QUERY_TYPE_FIND_CATENTRY_BY_CATGROUP
Query type constants
See Also:
Constant Field Values

QUERY_TYPE_FIND_CHILD_CATENTRY_BY_PARENT_CATENTRY

public static final java.lang.String QUERY_TYPE_FIND_CHILD_CATENTRY_BY_PARENT_CATENTRY
Query type constants
See Also:
Constant Field Values
Constructor Detail

ProductTreeDataBean

public ProductTreeDataBean()
Constructs a ProductTreeDataBean object.
Method Detail

buildCatalogNode

public DynamicTreeNode buildCatalogNode(java.util.Vector catalogRow)
Builds a catalog node for the dynamic tree.
Parameters:
catalogRow - catalog row from the ServerJDBCHelper bean
Returns:
A DynamicTreeNode object that represents a catalog node.

buildCategoryNode

public DynamicTreeNode buildCategoryNode(java.util.Vector categoryRow)
Builds a category node for the dynamic tree.
Parameters:
categoryRow - category row from the ServerJDBCHelper bean
Returns:
A DynamicTreeNode object that represents a category node.

buildCatentryNode

public DynamicTreeNode buildCatentryNode(java.util.Vector catentryRow)
Builds a catalog entry node for the dynamic tree.
Parameters:
catentryRow - catalog entry row from the ServerJDBCHelper bean
Returns:
A DynamicTreeNode object that represents a catalog entry node.

buildQuery

public java.lang.String buildQuery()
                            throws java.lang.Exception
Constructs the database query that is used to fetch tree node data.
Returns:
the SQL query string
Throws:
java.lang.Exception - Thrown whenever an exception is encountered.

getCatalogId

public java.lang.String getCatalogId()
                              throws ECSystemException
Gets the catalog ID defined in the root of this product tree.
Returns:
The catalog ID defined in the root of this product tree.
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getCategoryId

public java.lang.String getCategoryId()
                               throws ECSystemException
Gets the category ID of the selected tree node.
Returns:
the category ID of the selected tree node
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getCatentryId

public java.lang.String getCatentryId()
                               throws ECSystemException
Gets the catalog entry ID of the selected tree node.
Returns:
the catalog entry ID of the selected tree node
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getCommandContext

public CommandContext getCommandContext()
Gets the command context associated with the data bean.
Specified by:
getCommandContext in interface SmartDataBean
Returns:
The command context passed to the JSP page that invokes this data bean.

getDefaultLanguageId

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

getIconInfo

public java.util.Vector getIconInfo()
                             throws ECSystemException
Gets the icon information of the dynamic tree node, represented by a Vector object.
Specified by:
getIconInfo in interface DynamicTreeUserDataBean
Returns:
A vector object that contains the icon information.
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getLanguageId

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

getLocationType

public java.lang.String getLocationType()
                                 throws ECSystemException
Gets the location type of this product tree, where different locations represent different search type. The search type can be either search for all catalog entries, or search only for items.
Returns:
the location type of this product tree
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getMenuInfo

public java.util.Vector getMenuInfo()
                             throws ECSystemException
Gets the menu information of the dynamic tree node, represented by a Vector object.
Specified by:
getMenuInfo in interface DynamicTreeUserDataBean
Returns:
A vector object that contains the menu information.
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getNodeInfo

public java.util.Vector getNodeInfo()
                             throws ECSystemException
Gets the node information of the dynamic tree node, represented by a Vector object.
Specified by:
getNodeInfo in interface DynamicTreeUserDataBean
Returns:
A vector object that contains the node information.
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getQueryType

public java.lang.String getQueryType()
                              throws ECSystemException
Gets the query type of the current tree level, where different types map to a query that finds different types of result (catalog, category or catalog entry).
Returns:
the query type of the current tree level
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getRequestProperties

public TypedProperty getRequestProperties()
Gets the request properties associated with the data bean.
Specified by:
getRequestProperties in interface InputDataBean
Returns:
The set of properties passed to the JSP page that invokes this data bean.

getSelectionType

public java.lang.String getSelectionType()
                                  throws ECSystemException
Gets the selection type of this product tree, which identifies whether this tree is used for category selection, catalog entry selection, or both.
Returns:
the selection type of this product tree
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getStoreId

public java.lang.String getStoreId()
                            throws ECSystemException
Gets the ID of the store that is currently logged on to.
Returns:
the current store ID
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

getStoreIds

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

getStoreRelType

public java.lang.String getStoreRelType()
                                 throws ECSystemException
Gets the store relationship type in the store path.
Returns:
store relationship type
Throws:
ECSystemException - Thrown whenever an EC system exception is encountered.

populate

public void populate()
              throws java.lang.Exception
Populates all nodes info and append to the nodeInfo vector, which will be later retrieved by a caller data bean through getNodeInfo() method.
Specified by:
populate in interface SmartDataBean
Throws:
java.lang.Exception - Thrown whenever an exception is encountered.

setCatalogId

public void setCatalogId(java.lang.String newCatalogId)
Sets the catalog ID defined in the root of this product tree.
Parameters:
newCatalogId - The catalog ID defined in the root of this product tree.

setCategoryId

public void setCategoryId(java.lang.String newCategoryId)
Sets the category ID of the selected tree node.
Parameters:
newCategoryId - the category ID of the selected tree node

setCatentryId

public void setCatentryId(java.lang.String newCatentryId)
Sets the catalog entry ID of the selected tree node.
Parameters:
newCatentryId - the catalog entry ID of the selected tree node

setCommandContext

public void setCommandContext(CommandContext cc)
Sets the command context associated with the data bean. This is called by the DataBeanManager during the activate method.
Specified by:
setCommandContext in interface SmartDataBean
Parameters:
cc - The command context passed to the JSP page that invokes this data bean.

setLanguageId

public void setLanguageId(java.lang.String newLanguageId)
Sets the language identifier for the language in which to fetch.
Parameters:
newLanguageId - the language identifier

setLocationType

public void setLocationType(java.lang.String newLocationType)
Sets the location type of this product tree, where different locations represent different search type. The search type can be either search for all catalog entries, or search only for items.
Parameters:
newLocationType - the location type of this product tree

setQueryType

public void setQueryType(java.lang.String newQueryType)
Sets the query type of the current tree level, where different types map to a query that finds different types of result (catalog, category or catalog entry).
Parameters:
newQueryType - the query type of the current tree level

setRequestProperties

public void setRequestProperties(TypedProperty param)
Sets the request properties associated with the data bean. This is called by the DataBeanManager during the activate method.
Specified by:
setRequestProperties in interface InputDataBean
Parameters:
param - The set of properties passed to the JSP page that invokes this data bean.

setSelectionType

public void setSelectionType(java.lang.String newSelectionType)
Sets the selection type of this product tree, which identifies whether this tree is used for category selection, catalog entry selection, or both.
Parameters:
newSelectionType - the selection type of this product tree

setStoreId

public void setStoreId(java.lang.String newStoreId)
Sets the ID of the store that is currently logged on to.
Parameters:
newStoreId - the current store ID

setStoreIds

public void setStoreIds(java.lang.String newStoreIds)
Sets the store identifiers for all the related stores in the store path.
Parameters:
newStoreIds - the store identifiers

setStoreRelType

public void setStoreRelType(java.lang.String newStoreRelType)
Sets the store relationship type in the store path.
Parameters:
newStoreRelType - store relationship type