to.etc.domui.component.agenda
Interface ScheduleModel<T extends ScheduleItem>

All Known Implementing Classes:
BasicScheduleModel

public interface ScheduleModel<T extends ScheduleItem>

Model for the schedule component. Each schedule component must have a model which returns data when the schedule needs it. Important None of the calls here must buffer it's contents!! All controls that use this model will only ask for a given dataset once and cache the response locally. Only when a control's display format or date range changes will it re-query the contents of this model!!

Author:
Frits Jalvingh Created on Jun 27, 2007

Method Summary
 void addScheduleListener(ScheduleModelChangedListener<T> chl)
           
 java.util.List<ScheduleHoliday> getScheduleHolidays(java.util.Date start, java.util.Date end)
          Returns a list of holidays in the given period.
 java.util.List<T> getScheduleItems(java.util.Date start, java.util.Date end)
          Get schedule items in the specified period.
 java.util.List<ScheduleWorkHour> getScheduleWorkHours(java.util.Date start, java.util.Date end)
          Returns the work hours for the user on each day in the given period.
 void removeScheduleListener(ScheduleModelChangedListener<T> chl)
           
 

Method Detail

getScheduleItems

java.util.List<T> getScheduleItems(java.util.Date start,
                                   java.util.Date end)
                                                        throws java.lang.Exception
Get schedule items in the specified period. This gets called only once as long as the component's date range does not change. This means that this call should not cache it's response to this call.

Parameters:
start -
end -
Returns:
Throws:
java.lang.Exception

getScheduleHolidays

java.util.List<ScheduleHoliday> getScheduleHolidays(java.util.Date start,
                                                    java.util.Date end)
                                                    throws java.lang.Exception
Returns a list of holidays in the given period. Each holiday can be a single day only; the date it contains gets time-truncated. This gets called only once as long as the component's date range does not change. This means that this call should not cache it's response to this call.

Parameters:
start -
end -
Returns:
Throws:
java.lang.Exception

getScheduleWorkHours

java.util.List<ScheduleWorkHour> getScheduleWorkHours(java.util.Date start,
                                                      java.util.Date end)
                                                      throws java.lang.Exception
Returns the work hours for the user on each day in the given period. This call must return WorkHour's where each hour's start and end date is fully filled with an actual date range falling fully on a single day. To specify a lunch period return two WorkHour periods for a day. This call may just return an empty list if no work hour display logic is wanted.

Parameters:
start -
end -
Returns:
Throws:
java.lang.Exception

addScheduleListener

void addScheduleListener(ScheduleModelChangedListener<T> chl)

removeScheduleListener

void removeScheduleListener(ScheduleModelChangedListener<T> chl)