|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.service.impl.AbstractEpServiceImpl com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl com.elasticpath.service.rules.impl.RuleServiceImpl
public class RuleServiceImpl
Provides Rule Engine related services.
Constructor Summary | |
---|---|
RuleServiceImpl()
|
Method Summary | |
---|---|
Rule |
add(Rule rule)
Adds the given rule. |
Rule |
get(long ruleUid)
Get the rule with the given UID. |
java.util.Map |
getAllActionsMap()
Get all the available actions configured in the system. |
java.util.Map |
getAllConditionsMap()
Get all the available conditions configured in the system. |
java.util.Map |
getAllEligibilitiesMap()
Get all the available eligibility conditions configured in the system. |
java.util.Map |
getAllExceptionsMap()
Get all the avaiable exceptions configured in the system. |
java.lang.Object |
getObject(long uid)
Generic get method for all persistable domain models. |
Rule |
load(long ruleUid)
Load the rule with the given UID. |
void |
remove(Rule rule)
Delete the rule. |
void |
setAllActions(java.util.List actions)
Set all the avaiable actions configured in the system. |
void |
setAllConditions(java.util.List conditions)
Set all the avaiable conditions configured in the system. |
void |
setAllEligibilities(java.util.List eligibilities)
Set all the avaiable eligibility conditions configured in the system. |
void |
setAllExceptions(java.util.List exceptions)
Set all the avaiable exceptions configured in the system. |
void |
setRuleSetService(RuleSetService ruleSetService)
Set the rule set service. |
void |
update(Rule rule)
Updates the given rule. |
Methods inherited from class com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl |
---|
getPersistenceEngine, setPersistenceEngine |
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.service.EpPersistenceService |
---|
getPersistenceEngine, setPersistenceEngine |
Methods inherited from interface com.elasticpath.service.EpService |
---|
getElasticPath, setElasticPath |
Constructor Detail |
---|
public RuleServiceImpl()
Method Detail |
---|
public Rule add(Rule rule) throws DuplicateNameException, DuplicatePromoCodeException
add
in interface RuleService
rule
- the rule to add
DuplicateNameException
- - if the specified promoCode is already in use.
DuplicatePromoCodeException
- - if the specified promoCode is already in use.public Rule get(long ruleUid) throws EpServiceException
get
in interface RuleService
ruleUid
- the rule UID
EpServiceException
- - in case of any errorspublic java.util.Map getAllActionsMap()
getAllActionsMap
in interface RuleService
public java.util.Map getAllConditionsMap()
getAllConditionsMap
in interface RuleService
public java.util.Map getAllEligibilitiesMap()
getAllEligibilitiesMap
in interface RuleService
public java.util.Map getAllExceptionsMap()
getAllExceptionsMap
in interface RuleService
public java.lang.Object getObject(long uid) throws EpServiceException
getObject
in interface EpPersistenceService
uid
- the persisted instance uid
EpServiceException
- - in case of any errorspublic Rule load(long ruleUid) throws EpServiceException
load
in interface RuleService
ruleUid
- the rule UID
EpServiceException
- - in case of any errorspublic void remove(Rule rule) throws EpServiceException
remove
in interface RuleService
rule
- the rule to remove
EpServiceException
- - in case of any errorspublic void setAllActions(java.util.List actions)
setAllActions
in interface RuleService
actions
- all the avaiable actions.public void setAllConditions(java.util.List conditions)
setAllConditions
in interface RuleService
conditions
- all the avaiable conditions.public void setAllEligibilities(java.util.List eligibilities)
setAllEligibilities
in interface RuleService
eligibilities
- all the avaiable eligibility conditions.public void setAllExceptions(java.util.List exceptions)
setAllExceptions
in interface RuleService
exceptions
- all the avaiable actions.public void setRuleSetService(RuleSetService ruleSetService)
setRuleSetService
in interface RuleService
ruleSetService
- the rule set service.public void update(Rule rule) throws DuplicateNameException, DuplicatePromoCodeException
update
in interface RuleService
rule
- the rule to update]
DuplicateNameException
- - if the specified promoCode is already in use.
DuplicatePromoCodeException
- - if the specified promoCode is already in use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |