Search in sources :

Example 1 with RepositoryEntryRuleSPI

use of org.olat.modules.reminder.RepositoryEntryRuleSPI in project OpenOLAT by OpenOLAT.

the class ReminderRuleEngine method evaluateRepositoryEntryRule.

/**
 * @param reminder
 */
protected boolean evaluateRepositoryEntryRule(RepositoryEntry entry, List<ReminderRule> ruleList) {
    boolean allOk = true;
    for (Iterator<ReminderRule> ruleIt = ruleList.iterator(); ruleIt.hasNext(); ) {
        ReminderRule rule = ruleIt.next();
        RuleSPI ruleSpi = reminderModule.getRuleSPIByType(rule.getType());
        if (ruleSpi instanceof RepositoryEntryRuleSPI) {
            allOk &= ((RepositoryEntryRuleSPI) ruleSpi).evaluate(entry, rule);
            ruleIt.remove();
        }
    }
    return allOk;
}
Also used : ReminderRule(org.olat.modules.reminder.ReminderRule) RepositoryEntryRuleSPI(org.olat.modules.reminder.RepositoryEntryRuleSPI) FilterRuleSPI(org.olat.modules.reminder.FilterRuleSPI) RepositoryEntryRoleRuleSPI(org.olat.modules.reminder.rule.RepositoryEntryRoleRuleSPI) UserPropertyRuleSPI(org.olat.modules.reminder.rule.UserPropertyRuleSPI) IdentitiesProviderRuleSPI(org.olat.modules.reminder.IdentitiesProviderRuleSPI) RuleSPI(org.olat.modules.reminder.RuleSPI) RepositoryEntryRuleSPI(org.olat.modules.reminder.RepositoryEntryRuleSPI) BusinessGroupRoleRuleSPI(org.olat.modules.reminder.rule.BusinessGroupRoleRuleSPI) DateRuleSPI(org.olat.modules.reminder.rule.DateRuleSPI)

Example 2 with RepositoryEntryRuleSPI

use of org.olat.modules.reminder.RepositoryEntryRuleSPI in project openolat by klemens.

the class ReminderRuleEngine method evaluateRepositoryEntryRule.

/**
 * @param reminder
 */
protected boolean evaluateRepositoryEntryRule(RepositoryEntry entry, List<ReminderRule> ruleList) {
    boolean allOk = true;
    for (Iterator<ReminderRule> ruleIt = ruleList.iterator(); ruleIt.hasNext(); ) {
        ReminderRule rule = ruleIt.next();
        RuleSPI ruleSpi = reminderModule.getRuleSPIByType(rule.getType());
        if (ruleSpi instanceof RepositoryEntryRuleSPI) {
            allOk &= ((RepositoryEntryRuleSPI) ruleSpi).evaluate(entry, rule);
            ruleIt.remove();
        }
    }
    return allOk;
}
Also used : ReminderRule(org.olat.modules.reminder.ReminderRule) RepositoryEntryRuleSPI(org.olat.modules.reminder.RepositoryEntryRuleSPI) FilterRuleSPI(org.olat.modules.reminder.FilterRuleSPI) RepositoryEntryRoleRuleSPI(org.olat.modules.reminder.rule.RepositoryEntryRoleRuleSPI) UserPropertyRuleSPI(org.olat.modules.reminder.rule.UserPropertyRuleSPI) IdentitiesProviderRuleSPI(org.olat.modules.reminder.IdentitiesProviderRuleSPI) RuleSPI(org.olat.modules.reminder.RuleSPI) RepositoryEntryRuleSPI(org.olat.modules.reminder.RepositoryEntryRuleSPI) BusinessGroupRoleRuleSPI(org.olat.modules.reminder.rule.BusinessGroupRoleRuleSPI) DateRuleSPI(org.olat.modules.reminder.rule.DateRuleSPI)

Aggregations

FilterRuleSPI (org.olat.modules.reminder.FilterRuleSPI)2 IdentitiesProviderRuleSPI (org.olat.modules.reminder.IdentitiesProviderRuleSPI)2 ReminderRule (org.olat.modules.reminder.ReminderRule)2 RepositoryEntryRuleSPI (org.olat.modules.reminder.RepositoryEntryRuleSPI)2 RuleSPI (org.olat.modules.reminder.RuleSPI)2 BusinessGroupRoleRuleSPI (org.olat.modules.reminder.rule.BusinessGroupRoleRuleSPI)2 DateRuleSPI (org.olat.modules.reminder.rule.DateRuleSPI)2 RepositoryEntryRoleRuleSPI (org.olat.modules.reminder.rule.RepositoryEntryRoleRuleSPI)2 UserPropertyRuleSPI (org.olat.modules.reminder.rule.UserPropertyRuleSPI)2