|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.custom.schedule.model.AbstractScheduleModel
org.apache.myfaces.custom.schedule.model.SimpleScheduleModel
public class SimpleScheduleModel
A simple implementation of the ScheduleModel, not backed by any kind of datasource: entries have to be added manually.
| Field Summary |
|---|
| Fields inherited from class org.apache.myfaces.custom.schedule.model.AbstractScheduleModel |
|---|
timeZone |
| Fields inherited from interface org.apache.myfaces.custom.schedule.model.ScheduleModel |
|---|
DAY, MONTH, WEEK, WORKWEEK |
| Constructor Summary | |
|---|---|
SimpleScheduleModel()
Creates a new SimpleScheduleModel object. |
|
| Method Summary | |
|---|---|
void |
addEntry(ScheduleEntry entry)
Add an entry to the model. |
protected void |
loadDayAttributes(Day day)
Load any attributes for this day: is it a working day or a holiday, and what is the name of the day (e.g. |
protected Collection |
loadEntries(Date startDate,
Date endDate)
Load the schedule entries that fall between the startDate and the endDate. |
void |
removeEntry(ScheduleEntry entry)
Remove an entry from the model. |
void |
removeSelectedEntry()
Remove the currently selected entry from this model. |
void |
setHoliday(Date date,
String holidayName)
Set the name of a holiday. |
| Methods inherited from class org.apache.myfaces.custom.schedule.model.AbstractScheduleModel |
|---|
add, clear, containsDate, containsRepeatedIntervals, get, getCalendarInstance, getDays, getMode, getSelectedDate, getSelectedEntry, getTimeZone, isEmpty, isEntrySelected, iterator, refresh, setDay, setMode, setMonth, setSelectedDate, setSelectedEntry, setWeek, setWorkWeek, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleScheduleModel()
| Method Detail |
|---|
public void setHoliday(Date date,
String holidayName)
date - the dateholidayName - the name of the holidaypublic void addEntry(ScheduleEntry entry)
addEntry in interface ScheduleModelentry - the entry to addpublic void removeEntry(ScheduleEntry entry)
removeEntry in interface ScheduleModelentry - the entry to removepublic void removeSelectedEntry()
ScheduleModel
removeSelectedEntry in interface ScheduleModelScheduleModel.removeSelectedEntry()
protected Collection loadEntries(Date startDate,
Date endDate)
AbstractScheduleModelLoad the schedule entries that fall between the startDate and the endDate.
loadEntries in class AbstractScheduleModelstartDate - 0 AM on the start dateendDate - 12 PM on the end dateAbstractScheduleModel.loadEntries(java.util.Date,
java.util.Date)protected void loadDayAttributes(Day day)
AbstractScheduleModelLoad any attributes for this day: is it a working day or a holiday, and what is the name of the day (e.g. "Christmas").
loadDayAttributes in class AbstractScheduleModelday - the day that should be loadedAbstractScheduleModel.loadDayAttributes(org.apache.myfaces.custom.schedule.model.Day)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||