|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.rules.RulesSystemDataModel
This class represents the Rules System part of the data model. Its primary responsibility is to centralize interaction with the data model and its persistence mechanisms. It also allows for conversions between the data model types and the persistence mechanism types, when they are different.
All interaction with a particular persistence mechanism should be placed in subclasses.
Almost all these methods can throw the
unchecked exception RulesSystemDataModelException
,
which subclasses should throw only to indicate
a low-level exception within its persistent store.
These are exceptions which should never happen, for example,
to an in-memory implementation of the data model. Common
examples include serialization errors, database errors and
network/distributed database errors. These are generally
unrecoverable or fatal errors.
Field Summary | |
static java.lang.String |
COPYRIGHT
|
Constructor Summary | |
RulesSystemDataModel()
|
Method Summary | |
abstract boolean |
commitRuleServerConfiguration(RuleServerConfiguration aRuleServerConfiguration)
Commits the specified rule server configuration to this data model's persistent store. |
abstract boolean |
commitRuleServiceConfiguration(RuleServiceConfiguration aRuleServiceConfiguration)
Commits the specified rule service configuration to this data model's persistent store. |
abstract void |
commitRuleServiceStatus(java.lang.String aServerName,
RuleServiceKey aServiceKey,
java.lang.String aCloneName,
RuleServiceStatusCode aStatusCode)
Commits the specified rule service status report to this data model's persistent store. |
abstract int |
countRuleServiceConfigurations()
Counts the number of rule service configurations in all rule servers |
abstract int |
countRuleServiceConfigurationsInServer(java.lang.String aServerName)
Counts the number of rule service configurations in the specified rule server. |
com.ibm.commerce.rules.blaze.BlazeRuleServiceConfiguration |
createBlazeRuleServiceConfiguration(RuleServiceConfiguration from)
Creates a BlazeRuleServiceConfiguration from
the specified RuleServiceConfigurationAccessBean . |
abstract void |
eachRuleServiceConfiguration(RuleServiceConfigurationBlock command)
Executes the specified block of code for each rule service configuration in all rule servers. |
abstract void |
eachRuleServiceConfigurationInServer(java.lang.String aServerName,
RuleServiceConfigurationBlock command)
Executes the specified block of code for each rule service configuration in the specified server. |
static RulesSystemDataModel |
getInstance()
Provides access to an instance of the data model implementation used by the production system. |
abstract RuleServerConfiguration |
lookupRuleServerConfiguration(java.lang.String aServerName)
Retrieves the rule server configuration with the specified name. |
abstract RuleServiceConfiguration |
lookupRuleServiceConfiguration(java.lang.String aServerName,
RuleServiceKey aRuleServiceKey)
Retrieves the rule service configuration in the specified rule server with the specified identifying key. |
abstract RuleServiceStatus |
lookupRuleServiceStatus(java.lang.String aServerName,
RuleServiceKey aServiceKey)
Retrieves the rule service status for the specified rule service within the specified rule server. |
abstract void |
removeRuleServerConfiguration(java.lang.String aServerName)
Removes a rule server configuration specified by name, along with all its configured rule services. |
abstract void |
removeRuleServiceConfiguration(java.lang.String aServerName,
RuleServiceKey aRuleServiceKey)
Removes a rule service configuration from the rule server specified by name. |
abstract void |
removeRuleServiceConfigurations(RuleServiceConfigurationFilter filter)
Removes the rule service configurations accepted by the specified filter. |
static void |
reset()
Resets the singleton, which can be useful to clear caches, and so on. |
boolean |
ruleServerConfigurationExists(RuleServerConfiguration aRuleServerConfiguration)
Answers the question, "Does this rule server configuration exist in the persistent store?" |
abstract boolean |
ruleServerConfigurationExists(java.lang.String aServerName)
Answers the question, "Does a rule server configuration exist in the persistent store with this name?" |
abstract boolean |
ruleServiceConfigurationExists(java.lang.String aServerName,
RuleServiceKey aServiceKey)
Answers the question, "Does a rule service configuration exist in the persistent store with this key and in this rule server?" |
abstract boolean |
ruleServiceStatusExists(java.lang.String aServerName,
RuleServiceKey aServiceKey)
Answers the question, "Is there a rule service status report in the persistent store for this rule service key in this rule server?" |
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
Constructor Detail |
public RulesSystemDataModel()
Method Detail |
public abstract boolean commitRuleServerConfiguration(RuleServerConfiguration aRuleServerConfiguration) throws RulesSystemDataModelException
true
if a new persistent object was
created; false
if one was only updated.public abstract boolean commitRuleServiceConfiguration(RuleServiceConfiguration aRuleServiceConfiguration) throws RulesSystemDataModelException, RuleServerConfigurationNotFoundException
true
if a new persistent object was
created; false
if one was only updated.RuleServerConfigurationNotFoundException
- Indicates
that the rule server configuration for the rule server to which
the specified rule service belongs does not exist.public abstract void commitRuleServiceStatus(java.lang.String aServerName, RuleServiceKey aServiceKey, java.lang.String aCloneName, RuleServiceStatusCode aStatusCode)
aServerName
- The name of the rule server to which
the rule service belongs.aServiceKey
- The identifying key of the rule service.aCloneName
- The name of the clone for which the
rule service status is to be reported.aStatusCode
- The status to report for the rule service.RuleServerConfigurationNotFoundException
- Indicates
that the rule server configuration for the rule server to which
the specified rule service belongs does not exist.public abstract int countRuleServiceConfigurations()
public abstract int countRuleServiceConfigurationsInServer(java.lang.String aServerName) throws RulesSystemDataModelException
ruleServerConfigurationExists(aServerName)
if you are unsure whether the rule server configuration exists
for your specified server.aServerName
- The name of a rule server.public com.ibm.commerce.rules.blaze.BlazeRuleServiceConfiguration createBlazeRuleServiceConfiguration(RuleServiceConfiguration from) throws RulesSystemDataModelException
BlazeRuleServiceConfiguration
from
the specified RuleServiceConfigurationAccessBean
.public abstract void eachRuleServiceConfiguration(RuleServiceConfigurationBlock command) throws RulesSystemDataModelException
command
- A block of code to execute.RuleServiceConfigurationBlock
public abstract void eachRuleServiceConfigurationInServer(java.lang.String aServerName, RuleServiceConfigurationBlock command) throws RulesSystemDataModelException
ruleServerConfigurationExists(aServerName)
if you are unsure whether the rule server configuration exists
for your specified server.aServerName
- The name of a rule server.command
- A block of code to execute.RuleServiceConfigurationBlock
public static RulesSystemDataModel getInstance()
public abstract RuleServerConfiguration lookupRuleServerConfiguration(java.lang.String aServerName) throws RuleServerConfigurationNotFoundException, RulesSystemDataModelException
RuleServerConfigurationNotFoundException
- Indicates
that the rule server configuration does not exist.public abstract RuleServiceConfiguration lookupRuleServiceConfiguration(java.lang.String aServerName, RuleServiceKey aRuleServiceKey) throws RuleServerConfigurationNotFoundException, RuleServiceConfigurationNotFoundException, RulesSystemDataModelException
RuleServerConfigurationNotFoundException
- Indicates
that the rule server configuration does not exist.RuleServiceConfigurationNotFoundException
- Indicates
that the rule service configuration does not exist in the specified
rule server.public abstract RuleServiceStatus lookupRuleServiceStatus(java.lang.String aServerName, RuleServiceKey aServiceKey) throws RuleServerConfigurationNotFoundException, RuleServiceConfigurationNotFoundException, RulesSystemDataModelException
RuleServerConfigurationNotFoundException
- Indicates
that the rule server configuration does not exist.RuleServiceConfigurationNotFoundException
- Indicates
that the rule service configuration does not exist in the specified
rule server.public abstract void removeRuleServerConfiguration(java.lang.String aServerName) throws RulesSystemDataModelException
ruleServerConfigurationExists(aServerName)
first to
determine whether the rule server configuration already exists.public abstract void removeRuleServiceConfiguration(java.lang.String aServerName, RuleServiceKey aRuleServiceKey) throws RuleServerConfigurationNotFoundException, RuleServiceConfigurationNotFoundException, RulesSystemDataModelException
RuleServerConfigurationNotFoundException
- Indicates
that the rule server configuration does not exist.RuleServiceConfigurationNotFoundException
- Indicates
that the rule service configuration does not exist in the specified
rule server.public abstract void removeRuleServiceConfigurations(RuleServiceConfigurationFilter filter) throws RulesSystemDataModelException
For example, to remove all disabled rule service configurations, clients can write the following.
aRulesSystemDataModel.removeRuleServiceConfigurations(new RuleServiceConfigurationFilter() { // Return true to indicate that the rules system data model // should remove this rule service configuration. public boolean accept(RuleServiceConfiguration each) { return !each.isEnabled(); } });
public static void reset()
public boolean ruleServerConfigurationExists(RuleServerConfiguration aRuleServerConfiguration) throws RulesSystemDataModelException
public abstract boolean ruleServerConfigurationExists(java.lang.String aServerName) throws RulesSystemDataModelException
public abstract boolean ruleServiceConfigurationExists(java.lang.String aServerName, RuleServiceKey aServiceKey) throws RulesSystemDataModelException
public abstract boolean ruleServiceStatusExists(java.lang.String aServerName, RuleServiceKey aServiceKey) throws RulesSystemDataModelException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |