use of org.olat.modules.reminder.ReminderRule in project OpenOLAT by OpenOLAT.
the class ReminderRuleEngineTest method getRules.
private List<ReminderRule> getRules(String propertyName, String value) {
ReminderRuleImpl rule = new ReminderRuleImpl();
rule.setType(UserPropertyRuleSPI.class.getSimpleName());
rule.setLeftOperand(propertyName);
rule.setOperator("=");
rule.setRightOperand(value);
List<ReminderRule> rules = new ArrayList<>(1);
rules.add(rule);
return rules;
}
use of org.olat.modules.reminder.ReminderRule in project OpenOLAT by OpenOLAT.
the class ReminderRuleEngineTest method getRules.
private List<ReminderRule> getRules(RepositoryEntryRoleRuleSPI.Roles option) {
ReminderRuleImpl rule = new ReminderRuleImpl();
rule.setType(RepositoryEntryRoleRuleSPI.class.getSimpleName());
rule.setOperator("=");
rule.setRightOperand(option.name());
List<ReminderRule> rules = new ArrayList<>(1);
rules.add(rule);
return rules;
}
use of org.olat.modules.reminder.ReminderRule in project OpenOLAT by OpenOLAT.
the class ReminderRuleEngineTest method getCourseEnrollmentDateRules.
private List<ReminderRule> getCourseEnrollmentDateRules(int amount, LaunchUnit unit) {
ReminderRuleImpl rule = new ReminderRuleImpl();
rule.setType(CourseEnrollmentDateRuleSPI.class.getSimpleName());
rule.setOperator(">");
rule.setRightOperand(Integer.toString(amount));
rule.setRightUnit(unit.name());
List<ReminderRule> rules = new ArrayList<>(1);
rules.add(rule);
return rules;
}
use of org.olat.modules.reminder.ReminderRule in project OpenOLAT by OpenOLAT.
the class ReminderRuleEngineTest method getInitialLaunchRules.
private List<ReminderRule> getInitialLaunchRules(int amount, LaunchUnit unit) {
ReminderRuleImpl rule = new ReminderRuleImpl();
rule.setType(InitialCourseLaunchRuleSPI.class.getSimpleName());
rule.setOperator(">");
rule.setRightOperand(Integer.toString(amount));
rule.setRightUnit(unit.name());
List<ReminderRule> rules = new ArrayList<>(1);
rules.add(rule);
return rules;
}
use of org.olat.modules.reminder.ReminderRule in project OpenOLAT by OpenOLAT.
the class ReminderRuleEngineTest method getScoreRules.
private List<ReminderRule> getScoreRules(String operator, float value, String nodeIdent) {
ReminderRuleImpl rule = new ReminderRuleImpl();
rule.setType(ScoreRuleSPI.class.getSimpleName());
rule.setLeftOperand(nodeIdent);
rule.setOperator(operator);
rule.setRightOperand(Float.toString(value));
List<ReminderRule> rules = new ArrayList<>(1);
rules.add(rule);
return rules;
}
Aggregations