|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.domain.impl.AbstractEpDomainImpl com.elasticpath.domain.impl.AbstractPersistenceImpl com.elasticpath.domain.impl.AbstractEntityImpl com.elasticpath.domain.rules.impl.RuleSetImpl
public class RuleSetImpl
Represents a set of rules. This currently represents a set of promotion rules. When another rule set is introduced, this class should implement an abstract rule set and subclasses will implement specific rule sets such as promotion rule sets. Note that this rule set is specific to a particular collection of rules because of the import statements that those rules need.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial version id. |
Constructor Summary | |
---|---|
RuleSetImpl()
|
Method Summary | |
---|---|
void |
addRule(Rule rule)
Adds a rule to the rule set. |
java.util.Set |
getImports()
Get the names of classes imported by this rule set. |
java.util.Date |
getLastModifiedDate()
Returns the date when the rule set was last modified. |
java.lang.String |
getName()
Get the name of this rule set. |
java.lang.String |
getRuleCode()
Returns the Drools code corresponding to this rule set. |
java.util.Set |
getRules()
Get the rules in this rule set. |
int |
getScenario()
Get the id of the scenario that this rule set applies to. |
void |
setLastModifiedDate(java.util.Date lastModifiedDate)
Set the date when the rule set was last modified. |
void |
setName(java.lang.String name)
Set the name of this rule set. |
void |
setRules(java.util.Set rules)
Set the rules in this rule set. |
void |
setScenario(int scenarioId)
Set the scenario that this rule set applies to. |
void |
validate()
Checks that the rule set domain model is well formed. |
Methods inherited from class com.elasticpath.domain.impl.AbstractEntityImpl |
---|
convertAttributeGroupAttributes, getGuid, setDefaultValues, setGuid |
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl |
---|
executeBeforePersistAction, getUidPk, isPersistent, setUidPk |
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.domain.Entity |
---|
getGuid, setGuid |
Methods inherited from interface com.elasticpath.domain.Persistence |
---|
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public RuleSetImpl()
Method Detail |
---|
public void addRule(Rule rule)
addRule
in interface RuleSet
rule
- the rule to addpublic java.util.Set getImports()
getImports
in interface RuleSet
addImport
public java.util.Date getLastModifiedDate()
getLastModifiedDate
in interface RuleSet
public java.lang.String getName()
getName
in interface RuleSet
public java.lang.String getRuleCode() throws EpDomainException
getRuleCode
in interface RuleSet
EpDomainException
- if the rule set is not well formedpublic java.util.Set getRules()
getRules
in interface RuleSet
public int getScenario()
getScenario
in interface RuleSet
(constant in RuleScenarios)
public void setLastModifiedDate(java.util.Date lastModifiedDate)
setLastModifiedDate
in interface RuleSet
lastModifiedDate
- the date when the rule set was last modifiedpublic void setName(java.lang.String name)
setName
in interface RuleSet
name
- the name of this rule setpublic void setRules(java.util.Set rules)
setRules
in interface RuleSet
rules
- a set of Rule
objectspublic void setScenario(int scenarioId)
setScenario
in interface RuleSet
scenarioId
- a constant in RuleScenarios
.public void validate() throws EpDomainException
validate
in interface RuleSet
EpDomainException
- if the structure is not correct.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |