com.ibm.commerce.catalog.facade.server.helpers

Class RuleBasedCategoryConfig

  • java.lang.Object
    • com.ibm.commerce.catalog.facade.server.helpers.RuleBasedCategoryConfig


  • public class RuleBasedCategoryConfig
    extends java.lang.Object
    This class will store the configuration for rule based categories. From WC\xml\config\com.ibm.commerce.catalog-fep\wc-admin-component.xml
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright field.
        See Also:
        Constant Field Values
      • RULE_BASED_CATEGORY_CONFIG

        public static final java.lang.String RULE_BASED_CATEGORY_CONFIG
        Constant representing the configuration node name for the rule based category configuration defined in wc-admin-component.xml. (RuleBasedCategoryConfiguration)
        See Also:
        Constant Field Values
      • RULE_BASED_CATEGORY_CONFIG_ENABLED

        public static final java.lang.String RULE_BASED_CATEGORY_CONFIG_ENABLED
        Constant representing the flag for the rule based category evaluation defined in wc-admin-component.xml. (evaluationEnabled)
        See Also:
        Constant Field Values
      • RULE_BASED_CATEGORY_CONFIG_HOSTNAME

        public static final java.lang.String RULE_BASED_CATEGORY_CONFIG_HOSTNAME
        Constant representing the host name for the rule based category configuration defined in wc-admin-component.xml. (evaluationHostname)
        See Also:
        Constant Field Values
      • RULE_BASED_CATEGORY_TIME_INTERVAL

        public static final java.lang.String RULE_BASED_CATEGORY_TIME_INTERVAL
        Constant representing the time interval for the rule based category configuration defined in wc-admin-component.xml. (evaluationTimeInterval)
        See Also:
        Constant Field Values
      • RULE_BASED_CATEGORY_TIME_INTERVAL_MINUS_ONE

        public static final java.math.BigInteger RULE_BASED_CATEGORY_TIME_INTERVAL_MINUS_ONE
        Constant, -1, representing the time interval value for not evaluating rules with EVALUATING=0 in the CATGRPRULE table.
      • RULE_BASED_CATEGORY_CONFIG_SCH_APPTYPE

        public static final java.lang.String RULE_BASED_CATEGORY_CONFIG_SCH_APPTYPE
        Constant representing the scheduler application type for the rule based category configuration defined in wc-admin-component.xml. (schedulerApplicationType)
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static RuleBasedCategoryConfig getInstance()

        This method returns the singleton instance of the rule based category configuration.

        Returns:
        RuleBasedCategoryConfig An instance of the rule based category configuration.
      • getCategoryRuleEvaluationEnabled

        public boolean getCategoryRuleEvaluationEnabled()

        This method will return the value for 'evaluationEnabled'.

        Returns:
        This method will return the value for 'evaluationEnabled'.
      • getSchedulerApplicationType

        public java.lang.String getSchedulerApplicationType()

        This method will return the value for 'schedulerApplicationType'.

        Returns:
        This method will return the value for 'schedulerApplicationType'.
      • getIsToolkit

        public boolean getIsToolkit()

        This method will return true if this is a Toolkit instance, false otherwise.

        Returns:
        This method will return true if this is a Toolkit instance, false otherwise.
      • getIsWorkspacesInstance

        public boolean getIsWorkspacesInstance()

        This method will return true if this is a Workspaces instance, false otherwise.

        This setting for 'workspaceTaskList' will be checked in the wc-server.xml file. ToolsGeneralConfig

        Returns:
        This method will return true if this is a Workspaces instance, false otherwise.
      • getIsStagingInstance

        public boolean getIsStagingInstance()

        This method will return true if this is a Staging instance, false otherwise.

        This setting for 'stagingEnabled' will be checked in the wc-server.xml file.

        wc-server.xml:

        Returns:
        This method will return true if this is a Staging instance, false otherwise.
      • setCategoryRuleEvaulationEnabled

        public void setCategoryRuleEvaulationEnabled(boolean ruleBasedCategoryEvaluationEnabled)

        This method will set the value for 'evaluationEnabled'.

        If set to false, rules for rule based categories will NOT be processed.

        Parameters:
        ruleBasedCategoryEvaluationEnabled - This is a flag to indicate whether the job to run category rules should be running or not.
      • setSchedulerApplicationType

        public void setSchedulerApplicationType(java.lang.String schedulerApplicationType)

        This method will set the value for 'schedulerApplicationType'.

        If set to an empty string or an application type that is not defined as the name of a work manager, then the default application type will used to schedule rule-based category jobs.

        Parameters:
        schedulerApplicationType - This is the name of the work manager whose thread pool will be used to run scheduler rule-based category jobs.
      • reloadConfiguration

        public void reloadConfiguration()

        This method will reload the configuration from wc-admin-component.xml.

      • getCategoryRuleEvaluationJobHostname

        public java.lang.String getCategoryRuleEvaluationJobHostname()

        This method will return the value for 'evaluationHostname'.

        Returns:
        This method will return the value for 'evaluationHostname'.
      • getRuleEvaluationTimeInterval

        public java.math.BigInteger getRuleEvaluationTimeInterval()

        This method will return the value for 'evaluationTimeInterval'.

        Returns:
        This method will return the value for 'evaluationTimeInterval'.
      • getRuleBasedCategoryHelper

        public RuleBasedCategoryHelper getRuleBasedCategoryHelper()

        This method will return a shared instance of Rule Based Category Helper.

        Returns:
        A shared instance of Rule Based Category Helper.