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:
DataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class PriceTCMasterCatalogWithFilteringDataBean
extends SmartDataBeanImpl

This databean 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% synched 3. T21s included -35% not synched 4. T21-SKU001 included 5. Aptivas excluded 6. T21-SKU002 excluded ... DATABEAN PSEUDOCODE: -------------------- if (TC AB provided, or XML provided) goto CREATEVECTOR: get reseller default contract if none exists return error get reseller PriceTCMasterCatalogWithFiltering TC using TC access bean if none exists, return 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

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_CATENTRY_ADJUSTMENT
          Default adjustment for all catentries in the catalog filter tool
static java.lang.String DEFAULT_CATENTRY_PRECEDENCE
          Default precedence for catentries in the catalog filter.
static java.lang.String DEFAULT_ITEM_PRECEDENCE
          Default item precedence (infinity).
static java.lang.String DEFAULT_MASTER_CATALOG_PRECEDENCE
          Default precedence for the master catalog filter
static java.lang.String DEFAULT_MASTER_CATALOG_SYNCHRONIZATION
          Default synchronization setting for the master catalog
static java.lang.String DEFAULT_PRODUCT_PRECEDENCE
          Default product precedence (infinity-1).
static int MODE_CATALOG_FILTER_PUBLISH_ENGINE
          Catalog Filter Publish Engine Databean Mode
static int MODE_CATALOG_FILTER_UI
          Catalog Filter UI Databean Mode
static int PUBLISH_STATUS_FAILED
          Failed publish status
static int PUBLISH_STATUS_INPROGRESS
          Inprogress publish status
static int PUBLISH_STATUS_SUCCESS
          Successful publish status
 
Fields inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
commandContext, COPYRIGHT
 
Fields inherited from class com.ibm.commerce.beans. InputDataBeanImpl
requestProperties
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Constructor Summary
PriceTCMasterCatalogWithFilteringDataBean()
           
 
Method Summary
 java.util.Vector buildCatalogFilters(org.w3c.dom.Document xmlDoc)
          Parses input XML and returns a vector of Catalog Filter data beans.
  CatalogFilterDataBean getCatalogFilter(int i)
          Gets a specific Catalog Filter data bean.
 java.util.Vector getCatalogFilters()
          Get all the defined catalog filters
 java.lang.String getCatalogIdentifier()
          Get the master catalog identifier for the store
  MemberDataBean getCatalogOwner()
          Gets the master catalog owner Member data bean for the store.
 java.lang.String getCatalogReferenceNumber()
          Get the master catalog identifier for the store
  ContractAccessBean getContractAccessBean()
          Get the contract access bean for this store
 java.lang.Long getContractId()
          Get the contract ID
 java.sql.Timestamp getContractLastUpdateTime()
          Get the contract last update time
  MemberDataBean getContractOwner()
          Gets the contract owner Member data bean for the store.
 java.lang.Integer getContractState()
          Get the contract state
 int getDatabeanMode()
          Gets the data bean mode.
 java.lang.String getDebugFilterXMLdefinition()
          Create a dummy XML string for debugging purposes and bypass getting the XML from the TCATTR table
 java.lang.Integer getFilterPublishStatus()
          Get the filter's last publish status
 java.sql.Timestamp getFilterPublishTime()
          Get the filter's last publish timestamp
 java.lang.String getFilterXMLdefinition()
          Gets the XML definition for the PriceTCMasterCatalogWithFiltering term and condition.
 java.lang.Boolean getImmediateDeploy()
          Get the immediate deployment flag
 java.lang.Boolean getIncludeEntireCatalog()
          Get the master catalog inclusion flag
  PolicyListDataBean getPriceListPolicies()
          Gets the price lists associated with this term and condition.
  PriceTCMasterCatalogWithFilteringAccessBean getPriceTCMasterCatalogWithFilteringAccessBean()
          Gets the price term and condition access bean for this term and condition.
 java.lang.Integer getStoreId()
          Get the store ID from the command context
 java.sql.Timestamp getTClastUpdateTime()
          Get the filter's last publish timestamp
  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.
 java.lang.Long getTermConditionId()
          Get the term and condition ID
 org.w3c.dom.Document getXMLdocument(java.lang.String xmlString)
          Gets the XML document describing the PriceTCMasterCatalogWithFiltering term and condition.
 java.lang.Boolean hasSharedCatalog()
          Determine whether the current store has a shared catalog, or is using a stand-alone partitioned catalog.
 void populate()
          Gets the XML document describing the PriceTCMasterCatalogWithFiltering term and condition and converts the XML definition into a vector of Catalog Filter data beans.
 void setContractId(java.lang.Long newContractId)
          Set the contract ID
 void setDatabeanMode(int newDatabeanMode)
          Sets the data bean mode.
 void setDebugMode(boolean newDebugMode)
          Set the debug mode
 void setFilterXMLdefinition(java.lang.String newFilterXMLdefinition)
          Sets the XML definition for the PriceTCMasterCatalogWithFiltering term and condition.
 void setStoreId(java.lang.Integer newStoreId)
          Set the store ID
 void setTermConditionAccessBean( TermConditionAccessBean newTCAB)
          Sets the term and condition access bean for this data bean.
 void setTermConditionId(java.lang.Long newTermConditionId)
          Set the term and condition ID
 void setTraceMode(boolean newTraceMode)
          Set the debug mode
 void trace(java.lang.String traceString)
          Output a line of trace if trace mode is true
 
Methods inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
fulfills, getCommandContext, getResources, setCommandContext
 
Methods inherited from class com.ibm.commerce.beans. InputDataBeanImpl
getRequestProperties, setRequestProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.beans. InputDataBean
getRequestProperties, setRequestProperties
 

Field Detail

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_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_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_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

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

PUBLISH_STATUS_SUCCESS

public static final int PUBLISH_STATUS_SUCCESS
Successful 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_FAILED

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

MODE_CATALOG_FILTER_UI

public static final int MODE_CATALOG_FILTER_UI
Catalog Filter UI Databean Mode
See Also:
Constant Field Values

MODE_CATALOG_FILTER_PUBLISH_ENGINE

public static final int MODE_CATALOG_FILTER_PUBLISH_ENGINE
Catalog Filter Publish Engine Databean Mode
See Also:
Constant Field Values
Constructor Detail

PriceTCMasterCatalogWithFilteringDataBean

public PriceTCMasterCatalogWithFilteringDataBean()
Method Detail

populate

public void populate()
              throws java.lang.Exception
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.
Specified by:
populate in interface SmartDataBean
Overrides:
populate in class SmartDataBeanImpl
Throws:
java.lang.Exception

setStoreId

public void setStoreId(java.lang.Integer newStoreId)
Set the store ID

getStoreId

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

getTermConditionAccessBean

public 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 databean 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 attemp 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

getCatalogReferenceNumber

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

getCatalogIdentifier

public java.lang.String getCatalogIdentifier()
Get 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

hasSharedCatalog

public java.lang.Boolean hasSharedCatalog()
Determine 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

setContractId

public void setContractId(java.lang.Long newContractId)
Set the contract ID

getContractId

public java.lang.Long getContractId()
Get the contract ID
Returns:
Long

getContractAccessBean

public ContractAccessBean getContractAccessBean()
Get the contract access bean for this store
Returns:
ContractAccessBean

getPriceTCMasterCatalogWithFilteringAccessBean

public PriceTCMasterCatalogWithFilteringAccessBean getPriceTCMasterCatalogWithFilteringAccessBean()
Gets the price term and condition access bean for this term and condition.
Returns:
PriceTCMasterCatalogWithFilteringAccessBean

getContractLastUpdateTime

public java.sql.Timestamp getContractLastUpdateTime()
Get 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()
Get the contract state
Returns:
Integer

getTClastUpdateTime

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

getFilterPublishStatus

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

getFilterPublishTime

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

getPriceListPolicies

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

setTermConditionId

public void setTermConditionId(java.lang.Long newTermConditionId)
Set the term and condition ID

getTermConditionId

public java.lang.Long getTermConditionId()
Get the term and condition ID
Returns:
Long

setFilterXMLdefinition

public void setFilterXMLdefinition(java.lang.String newFilterXMLdefinition)
Sets the XML definition for the PriceTCMasterCatalogWithFiltering term and condition.

getFilterXMLdefinition

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

getCatalogFilters

public java.util.Vector getCatalogFilters()
Get all the defined catalog filters
Returns:
Vector

getCatalogFilter

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

getIncludeEntireCatalog

public java.lang.Boolean getIncludeEntireCatalog()
Get the master catalog inclusion flag
Returns:
java.lang.Boolean

getImmediateDeploy

public java.lang.Boolean getImmediateDeploy()
Get the immediate deployment flag
Returns:
java.lang.Boolean

setTermConditionAccessBean

public void setTermConditionAccessBean(TermConditionAccessBean newTCAB)
Sets the term and condition access bean for this data bean.
Parameters:
newTCAB - TermConditionAccessBean

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

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

getDatabeanMode

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

setDatabeanMode

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

setDebugMode

public void setDebugMode(boolean newDebugMode)
Set the debug mode
Parameters:
newDebugMode - boolean

setTraceMode

public void setTraceMode(boolean newTraceMode)
Set the debug mode
Parameters:
newTraceMode - boolean

trace

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

getDebugFilterXMLdefinition

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