use of org.olat.modules.reminder.FilterRuleSPI in project openolat by klemens.
the class ReminderRuleEngine method filterByRules.
protected void filterByRules(RepositoryEntry entry, List<Identity> identities, List<ReminderRule> ruleList) {
List<ReminderRule> filterRules = new ArrayList<>(3);
for (Iterator<ReminderRule> ruleIt = ruleList.iterator(); ruleIt.hasNext(); ) {
ReminderRule rule = ruleIt.next();
RuleSPI ruleSpi = reminderModule.getRuleSPIByType(rule.getType());
if (ruleSpi instanceof FilterRuleSPI) {
filterRules.add(rule);
ruleIt.remove();
}
}
for (ReminderRule rule : filterRules) {
filterByRule(entry, identities, rule);
}
}
use of org.olat.modules.reminder.FilterRuleSPI in project OpenOLAT by OpenOLAT.
the class ReminderRuleEngine method filterByRules.
protected void filterByRules(RepositoryEntry entry, List<Identity> identities, List<ReminderRule> ruleList) {
List<ReminderRule> filterRules = new ArrayList<>(3);
for (Iterator<ReminderRule> ruleIt = ruleList.iterator(); ruleIt.hasNext(); ) {
ReminderRule rule = ruleIt.next();
RuleSPI ruleSpi = reminderModule.getRuleSPIByType(rule.getType());
if (ruleSpi instanceof FilterRuleSPI) {
filterRules.add(rule);
ruleIt.remove();
}
}
for (ReminderRule rule : filterRules) {
filterByRule(entry, identities, rule);
}
}
use of org.olat.modules.reminder.FilterRuleSPI in project OpenOLAT by OpenOLAT.
the class ReminderRuleEngine method filterByRule.
public void filterByRule(RepositoryEntry entry, List<Identity> identities, ReminderRule rule) {
try {
RuleSPI ruleSpi = reminderModule.getRuleSPIByType(rule.getType());
if (ruleSpi instanceof FilterRuleSPI) {
FilterRuleSPI filter = (FilterRuleSPI) ruleSpi;
filter.filter(entry, identities, rule);
}
} catch (Exception e) {
log.error("", e);
}
}
use of org.olat.modules.reminder.FilterRuleSPI in project openolat by klemens.
the class ReminderRuleEngine method filterByRule.
public void filterByRule(RepositoryEntry entry, List<Identity> identities, ReminderRule rule) {
try {
RuleSPI ruleSpi = reminderModule.getRuleSPIByType(rule.getType());
if (ruleSpi instanceof FilterRuleSPI) {
FilterRuleSPI filter = (FilterRuleSPI) ruleSpi;
filter.filter(entry, identities, rule);
}
} catch (Exception e) {
log.error("", e);
}
}
Aggregations