Class DefaultClassificationService
- java.lang.Object
-
- org.opennms.netmgt.flows.classification.internal.DefaultClassificationService
-
- All Implemented Interfaces:
ClassificationService
public class DefaultClassificationService extends Object implements ClassificationService
-
-
Constructor Summary
Constructors Constructor Description DefaultClassificationService(ClassificationRuleDao classificationRuleDao, ClassificationGroupDao classificationGroupDao, ClassificationEngine classificationEngine, FilterService filterService, SessionUtils sessionUtils)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
classify(ClassificationRequest classificationRequest)
int
countMatchingGroups(Criteria criteria)
int
countMatchingRules(Criteria criteria)
void
deleteGroup(int groupId)
void
deleteRule(int ruleId)
void
deleteRules(int groupId)
String
exportRules(int groupId)
List<Group>
findMatchingGroups(Criteria criteria)
List<Rule>
findMatchingRules(Criteria criteria)
Group
getGroup(int groupId)
List<Rule>
getInvalidRules()
Rule
getRule(int ruleId)
void
importRules(int groupId, InputStream inputStream, boolean hasHeader, boolean deleteExistingRules)
Integer
saveGroup(Group group)
Integer
saveRule(Rule rule)
void
updateGroup(Group group)
void
updateRule(Rule rule)
void
validateRule(Rule validateMe)
-
-
-
Constructor Detail
-
DefaultClassificationService
public DefaultClassificationService(ClassificationRuleDao classificationRuleDao, ClassificationGroupDao classificationGroupDao, ClassificationEngine classificationEngine, FilterService filterService, SessionUtils sessionUtils)
-
-
Method Detail
-
findMatchingRules
public List<Rule> findMatchingRules(Criteria criteria)
- Specified by:
findMatchingRules
in interfaceClassificationService
-
countMatchingRules
public int countMatchingRules(Criteria criteria)
- Specified by:
countMatchingRules
in interfaceClassificationService
-
getRule
public Rule getRule(int ruleId)
- Specified by:
getRule
in interfaceClassificationService
-
saveRule
public Integer saveRule(Rule rule) throws InvalidRuleException
- Specified by:
saveRule
in interfaceClassificationService
- Throws:
InvalidRuleException
-
importRules
public void importRules(int groupId, InputStream inputStream, boolean hasHeader, boolean deleteExistingRules) throws CSVImportException
- Specified by:
importRules
in interfaceClassificationService
- Throws:
CSVImportException
-
exportRules
public String exportRules(int groupId)
- Specified by:
exportRules
in interfaceClassificationService
-
deleteRules
public void deleteRules(int groupId)
- Specified by:
deleteRules
in interfaceClassificationService
-
deleteRule
public void deleteRule(int ruleId)
- Specified by:
deleteRule
in interfaceClassificationService
-
updateRule
public void updateRule(Rule rule)
- Specified by:
updateRule
in interfaceClassificationService
-
classify
public String classify(ClassificationRequest classificationRequest)
- Specified by:
classify
in interfaceClassificationService
-
findMatchingGroups
public List<Group> findMatchingGroups(Criteria criteria)
- Specified by:
findMatchingGroups
in interfaceClassificationService
-
countMatchingGroups
public int countMatchingGroups(Criteria criteria)
- Specified by:
countMatchingGroups
in interfaceClassificationService
-
getGroup
public Group getGroup(int groupId)
- Specified by:
getGroup
in interfaceClassificationService
-
saveGroup
public Integer saveGroup(Group group)
- Specified by:
saveGroup
in interfaceClassificationService
-
deleteGroup
public void deleteGroup(int groupId)
- Specified by:
deleteGroup
in interfaceClassificationService
-
updateGroup
public void updateGroup(Group group)
- Specified by:
updateGroup
in interfaceClassificationService
-
getInvalidRules
public List<Rule> getInvalidRules()
- Specified by:
getInvalidRules
in interfaceClassificationService
-
validateRule
public void validateRule(Rule validateMe)
- Specified by:
validateRule
in interfaceClassificationService
-
-