use of org.jaffa.modules.scheduler.services.Recurrence in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceForm method getRecurrence.
// *******************************************************
// **************** Recurrence properties ****************
// *******************************************************
/**
* Getter for property recurrence.
* @return Value of property recurrence.
*/
public String getRecurrence() {
RecurrenceEnum recurrence = null;
Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence();
if (r != null) {
if (r instanceof Recurrence.Often)
recurrence = RecurrenceEnum.OFTEN;
else if (r instanceof Recurrence.Daily)
recurrence = RecurrenceEnum.DAILY;
else if (r instanceof Recurrence.Weekly)
recurrence = RecurrenceEnum.WEEKLY;
else if (r instanceof Recurrence.Monthly)
recurrence = RecurrenceEnum.MONTHLY;
else if (r instanceof Recurrence.Yearly)
recurrence = RecurrenceEnum.YEARLY;
else if (r instanceof Recurrence.Custom)
recurrence = RecurrenceEnum.CUSTOM;
}
if (r == null)
recurrence = RecurrenceEnum.ONCE_ONLY;
return recurrence.toString();
}
use of org.jaffa.modules.scheduler.services.Recurrence in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceForm method getOftenHours.
/**
* Getter for property oftenHours.
* @return Value of property oftenHours.
*/
public Long getOftenHours() {
Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence();
Integer oftenHours = r != null && r instanceof Recurrence.Often ? ((Recurrence.Often) r).getHours() : null;
return oftenHours != null ? new Long(oftenHours) : null;
}
use of org.jaffa.modules.scheduler.services.Recurrence in project jaffa-framework by jaffa-projects.
the class TaskMaintenanceForm method getMonthlyWeekDay.
/**
* Getter for property monthlyWeekDay.
* @return Value of property monthlyWeekDay.
*/
public String getMonthlyWeekDay() {
Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence();
Recurrence.WeekDay monthlyWeekDay = r != null && r instanceof Recurrence.Monthly ? ((Recurrence.Monthly) r).getWeekDay() : null;
return monthlyWeekDay != null ? monthlyWeekDay.toString() : null;
}
Aggregations