Interface RuleService
-
- All Known Implementing Classes:
RuleServiceImpl
public interface RuleService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RuleDTOaddRule(RuleDTO ruleDTO)Add Rule to DBvoiddeleteRule(Long id)delete rule with specific idList<RuleDTO>findAllRules()Get all Rules from DBList<RuleDTO>findEnabledRulesByEvent(String ruleTitle)Find enable RuleEntity by titleRuleDTOfindEnableRuleByTitle(String ruleTitle)Find enable RuleEntity by titleRuleDTOfindRuleByEventAndDomain(String ruleTitle, String domain)Find a RuleEntity by titleRuleDTOfindRuleById(Long id)Get RuleEntity by idRuleDTOfindRuleByTitle(String ruleTitle)Find a RuleEntity by titleList<RuleDTO>getActiveRules()Get all active Rules from DBList<RuleDTO>getAllAutomaticRules()Get all Automatic Rules from DBList<String>getAllEvents()Get all Events from rulesList<RuleDTO>getAllRulesByDomain(String domain)Get all Rules by Domain from DB * @param domain : rule's domain paramList<RuleDTO>getAllRulesWithNullDomain()Get all Rules by with null DomainDTO from DBList<String>getDomainListFromRules()Get all Domains from Rules from DBRuleDTOupdateRule(RuleDTO ruleDTO)Update Rule to DB
-
-
-
Method Detail
-
findEnableRuleByTitle
RuleDTO findEnableRuleByTitle(String ruleTitle) throws IllegalArgumentException
Find enable RuleEntity by title- Parameters:
ruleTitle- : rule's title param- Returns:
- an instance of RuleDTO
- Throws:
IllegalArgumentException
-
findRuleById
RuleDTO findRuleById(Long id) throws IllegalArgumentException
Get RuleEntity by id- Parameters:
id- : rule's id param- Returns:
- an instance of RuleDTO
- Throws:
IllegalArgumentException
-
findEnabledRulesByEvent
List<RuleDTO> findEnabledRulesByEvent(String ruleTitle) throws IllegalArgumentException
Find enable RuleEntity by title- Parameters:
ruleTitle- : rule's title param- Returns:
- an instance of RuleDTO
- Throws:
IllegalArgumentException
-
findRuleByTitle
RuleDTO findRuleByTitle(String ruleTitle) throws IllegalArgumentException
Find a RuleEntity by title- Parameters:
ruleTitle- : rule's title param- Returns:
- an instance of RuleDTO
- Throws:
IllegalArgumentException
-
findRuleByEventAndDomain
RuleDTO findRuleByEventAndDomain(String ruleTitle, String domain) throws IllegalArgumentException
Find a RuleEntity by title- Parameters:
ruleTitle- : rule's title paramdomain- : rule's domain param- Returns:
- an instance of RuleDTO
- Throws:
IllegalArgumentException
-
getAllAutomaticRules
List<RuleDTO> getAllAutomaticRules()
Get all Automatic Rules from DB- Returns:
- RuleDTO list
-
getAllRulesByDomain
List<RuleDTO> getAllRulesByDomain(String domain) throws IllegalArgumentException
Get all Rules by Domain from DB * @param domain : rule's domain param- Returns:
- RuleDTO list
- Throws:
IllegalArgumentException
-
getAllRulesWithNullDomain
List<RuleDTO> getAllRulesWithNullDomain()
Get all Rules by with null DomainDTO from DB- Returns:
- RuleDTO list
-
getDomainListFromRules
List<String> getDomainListFromRules()
Get all Domains from Rules from DB- Returns:
- String list
-
deleteRule
void deleteRule(Long id) throws Exception
delete rule with specific id- Throws:
Exception
-
addRule
RuleDTO addRule(RuleDTO ruleDTO) throws Exception
Add Rule to DB- Parameters:
ruleDTO- : an object of type RuleDTO- Returns:
- RuleDTO object
- Throws:
Exception
-
-