Package cdc.issues.rules
Class CompositeRulesCatalog
- java.lang.Object
-
- cdc.issues.rules.CompositeRulesCatalog
-
- All Implemented Interfaces:
RulesCatalog
public class CompositeRulesCatalog extends Object implements RulesCatalog
Implementation ofRulesCatalogthat aggregates delegates catalogs.This implementation does not cache any data.
- Author:
- Damien Carbonne
-
-
Constructor Summary
Constructors Constructor Description CompositeRulesCatalog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeRulesCatalogadd(RulesCatalog catalog)Adds a new delegate catalog.<T> IssuesDetector.Descriptor<T>getDescriptorOrNull(Rule rule, Class<T> dataClass)Returns theIssuesDetector.Descriptorassociated to a Rule and a Class, ornull.Set<IssuesDetector.Descriptor<?>>getDescriptors()<T> Set<IssuesDetector.Descriptor<T>>getDescriptors(Class<T> dataClass)Returns a set of all Descriptors registered for a data class.Set<String>getDomains()Set<Rule>getRules()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cdc.issues.rules.RulesCatalog
apply, apply, apply, createIssuesDetector, getDescriptor, getRules, hasDescriptor, hasDomain, hasRule
-
-
-
-
Method Detail
-
add
public CompositeRulesCatalog add(RulesCatalog catalog)
Adds a new delegate catalog.- Parameters:
catalog- The catalog to add.- Returns:
- This catalog.
-
getDomains
public Set<String> getDomains()
- Specified by:
getDomainsin interfaceRulesCatalog- Returns:
- A set of all known domains.
-
getRules
public Set<Rule> getRules()
- Specified by:
getRulesin interfaceRulesCatalog- Returns:
- A set of all known
Rules.
-
getDescriptors
public Set<IssuesDetector.Descriptor<?>> getDescriptors()
- Specified by:
getDescriptorsin interfaceRulesCatalog- Returns:
- A set of all known
IssuesDetector.Descriptors.
-
getDescriptors
public <T> Set<IssuesDetector.Descriptor<T>> getDescriptors(Class<T> dataClass)
Description copied from interface:RulesCatalogReturns a set of all Descriptors registered for a data class.- Specified by:
getDescriptorsin interfaceRulesCatalog- Type Parameters:
T- The data type.- Parameters:
dataClass- The data class.- Returns:
- A set of all Descriptors registered for
dataClass.
-
getDescriptorOrNull
public <T> IssuesDetector.Descriptor<T> getDescriptorOrNull(Rule rule, Class<T> dataClass)
Description copied from interface:RulesCatalogReturns theIssuesDetector.Descriptorassociated to a Rule and a Class, ornull.- Specified by:
getDescriptorOrNullin interfaceRulesCatalog- Type Parameters:
T- The data type.- Parameters:
rule- The rule.dataClass- The data class.- Returns:
- The
IssuesDetector.Descriptorassociated toruleanddataClass, ornull.
-
-