for (HierarchicalConfiguration c : compMatcherConfs) {
String compName = c.getString("[@name]", null);
String matcherName = c.getString("[@match]", null);
String invertedMatcherName = c.getString("[@notmatch]", null);
Matcher matcher = null;
if (matcherName != null && invertedMatcherName != null) {
// if no matcher is configured throw an Exception
throw new ConfigurationException("Please configure only match or nomatch per mailet");
} else if (matcherName != null) {
matcher = matcherLoader.getMatcher(createMatcherConfig(matcherName));
if (matcher instanceof CompositeMatcher) {
CompositeMatcher compMatcher = (CompositeMatcher) matcher;
List<Matcher> childMatcher = loadCompositeMatchers(state, compMap, c.configurationsAt("matcher"));
for (Matcher aChildMatcher : childMatcher) {
compMatcher.add(aChildMatcher);
}
}
} else if (invertedMatcherName != null) {
Matcher m = matcherLoader.getMatcher(createMatcherConfig(invertedMatcherName));
if (m instanceof CompositeMatcher) {
CompositeMatcher compMatcher = (CompositeMatcher) m;
List<Matcher> childMatcher = loadCompositeMatchers(state, compMap, c.configurationsAt("matcher"));
for (Matcher aChildMatcher : childMatcher) {