Inheritance diagram for edu.cmu.hcii.calo.manager.ScheduleManager:
Public Member Functions | |
void | addItem (ScheduleItem o) |
Adds a ScheduleItem to the schedule. | |
int | countItems () |
Returns the number of items currently in the schedule. | |
ScheduleItem | earliestItem () |
Retrieves the ScheduleItem with the earliest start time. | |
boolean | hasScheduleItem (ScheduleItem o) |
Checks whether the given ScheduleItem is currently being managed by this manager. | |
ScheduleItem | latestItem () |
Retrieves the ScheduleItem with the latest start time. | |
void | noteItemChanged (ScheduleItem item) |
Called by a ScheduleItem when its state has generically changed so that the manager can notify all interested parties of the change. | |
void | noteItemEndTimeChanged (ScheduleItem item, Calendar oldEndTime, Calendar newEndTime) |
Called by a ScheduleItem when its end time is changed so that the manager can notify all interested parties of the change. | |
void | noteItemHasReminderChanged (ScheduleItem item, boolean oldHasReminder, boolean newHasReminder) |
Called by a ScheduleItem when its reminder status is changed so that the manager can notify all interested parties of the change. | |
void | noteItemNameChanged (ScheduleItem item, String oldName, String name) |
Called by a ScheduledItem when its due date is changed so that the manager can notify all interested parties of the change. | |
void | noteItemProjectChanged (ScheduleItem item, Project oldProject, Project newProject) |
Called by a ScheduleItem when its project is changed so that the manager can notify all interested parties of the change. | |
void | noteItemStartTimeChanged (ScheduleItem item, Calendar oldStartTime, Calendar newStartTime) |
Called by a ScheduleItem when its start time is changed so that the manager can notify all interested parties of the change. | |
void | removeItem (ScheduleItem o) |
Removes a ScheduleItem from the schedule. | |
void | reset () |
Resets this manager back to the way it was when it was first created. | |
Iterator< ScheduleItem > | scheduleIterator () |
Retrieves an iterator over all the ScheduleItems in the schedule. | |
Static Public Member Functions | |
static ScheduleManager | getManager () |
Returns the singleton instance of this manager. | |
Private Member Functions | |
ScheduleManager () | |
Constructs a new ScheduleManager. | |
void | readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException |
Reads in a serialized manager. | |
void | writeObject (java.io.ObjectOutputStream out) throws IOException |
Writes this manager to stream. | |
Private Attributes | |
MutableSortedSet< ScheduleItem > | scheduledItems |
The items managed by this schedule manager. | |
Static Private Attributes | |
static final long | serialVersionUID = 8963616139767956524L |
Prevents serialization collisions. | |
static ScheduleManager | uniqueInstance = null |
The singleton instance of the notification manager. |
edu.cmu.hcii.calo.manager.ScheduleManager.ScheduleManager | ( | ) | [private] |
Constructs a new ScheduleManager.
Private because this is a singleton.
static ScheduleManager edu.cmu.hcii.calo.manager.ScheduleManager.getManager | ( | ) | [static] |
Returns the singleton instance of this manager.
void edu.cmu.hcii.calo.manager.ScheduleManager.addItem | ( | ScheduleItem | o | ) |
Adds a ScheduleItem to the schedule.
o | the item to add |
int edu.cmu.hcii.calo.manager.ScheduleManager.countItems | ( | ) |
Returns the number of items currently in the schedule.
ScheduleItem edu.cmu.hcii.calo.manager.ScheduleManager.earliestItem | ( | ) |
Retrieves the ScheduleItem with the earliest start time.
boolean edu.cmu.hcii.calo.manager.ScheduleManager.hasScheduleItem | ( | ScheduleItem | o | ) |
Checks whether the given ScheduleItem is currently being managed by this manager.
o | the ScheduleItem to check for |
true
if the item exists, false
otherwise ScheduleItem edu.cmu.hcii.calo.manager.ScheduleManager.latestItem | ( | ) |
Retrieves the ScheduleItem with the latest start time.
void edu.cmu.hcii.calo.manager.ScheduleManager.noteItemChanged | ( | ScheduleItem | item | ) |
Called by a ScheduleItem when its state has generically changed so that the manager can notify all interested parties of the change.
item | the ScheduleItem that has been altered |
void edu.cmu.hcii.calo.manager.ScheduleManager.noteItemEndTimeChanged | ( | ScheduleItem | item, | |
Calendar | oldEndTime, | |||
Calendar | newEndTime | |||
) |
Called by a ScheduleItem when its end time is changed so that the manager can notify all interested parties of the change.
item | the ScheduleItem that has been altered | |
oldEndTime | the former end time of this ScheduleItem | |
newEndTime | the new end time of this ScheduleItem |
void edu.cmu.hcii.calo.manager.ScheduleManager.noteItemHasReminderChanged | ( | ScheduleItem | item, | |
boolean | oldHasReminder, | |||
boolean | newHasReminder | |||
) |
Called by a ScheduleItem when its reminder status is changed so that the manager can notify all interested parties of the change.
item | the ScheduleItem that has been altered | |
oldHasReminder | the former reminder status of this ScheduleItem | |
newHasReminder | the new reminder status of this ScheduleItem |
void edu.cmu.hcii.calo.manager.ScheduleManager.noteItemNameChanged | ( | ScheduleItem | item, | |
String | oldName, | |||
String | name | |||
) |
Called by a ScheduledItem when its due date is changed so that the manager can notify all interested parties of the change.
item | the item that has been altered | |
oldName | the former name of this item | |
name | the new name of this item |
void edu.cmu.hcii.calo.manager.ScheduleManager.noteItemProjectChanged | ( | ScheduleItem | item, | |
Project | oldProject, | |||
Project | newProject | |||
) |
Called by a ScheduleItem when its project is changed so that the manager can notify all interested parties of the change.
item | the ScheduleItem that has been altered | |
oldProject | the former project of this ScheduleItem | |
newProject | the new project of this ScheduleItem |
void edu.cmu.hcii.calo.manager.ScheduleManager.noteItemStartTimeChanged | ( | ScheduleItem | item, | |
Calendar | oldStartTime, | |||
Calendar | newStartTime | |||
) |
Called by a ScheduleItem when its start time is changed so that the manager can notify all interested parties of the change.
item | the ScheduleItem that has been altered | |
oldStartTime | the former start time of this ScheduleItem | |
newStartTime | the new start time of this ScheduleItem |
void edu.cmu.hcii.calo.manager.ScheduleManager.removeItem | ( | ScheduleItem | o | ) |
Removes a ScheduleItem from the schedule.
o | the ScheduleItem to remove |
void edu.cmu.hcii.calo.manager.ScheduleManager.reset | ( | ) |
Resets this manager back to the way it was when it was first created.
Iterator<ScheduleItem> edu.cmu.hcii.calo.manager.ScheduleManager.scheduleIterator | ( | ) |
Retrieves an iterator over all the ScheduleItems in the schedule.
The iterator will return schedule items in order from earliest to latest start times.
void edu.cmu.hcii.calo.manager.ScheduleManager.readObject | ( | java.io.ObjectInputStream | in | ) | throws IOException, ClassNotFoundException [private] |
Reads in a serialized manager.
Just checks against the serialVersionUID.
in | the input stream to read from |
IOException | ||
ClassNotFoundException |
void edu.cmu.hcii.calo.manager.ScheduleManager.writeObject | ( | java.io.ObjectOutputStream | out | ) | throws IOException [private] |
Writes this manager to stream.
Since I don't want to deal with everything below this manager being serialized and it is a singleton, I just write the ID for error checking.
out | the output stream to write to |
IOException |
final long edu.cmu.hcii.calo.manager.ScheduleManager.serialVersionUID = 8963616139767956524L [static, private] |
ScheduleManager edu.cmu.hcii.calo.manager.ScheduleManager.uniqueInstance = null [static, private] |
The singleton instance of the notification manager.
MutableSortedSet<ScheduleItem> edu.cmu.hcii.calo.manager.ScheduleManager.scheduledItems [private] |
The items managed by this schedule manager.