caltool.caldb
Class CalendarDB

java.lang.Object
  extended by java.util.Observable
      extended by mvp.Model
          extended by caltool.caldb.CalendarDB
All Implemented Interfaces:
java.io.Serializable

public class CalendarDB
extends mvp.Model

The CalendarDB is the top-level data class for the Calendar Tool. It encapsulates the following structures: a list of references to the calendars for all registered users; the user, group, and room databases; a global options list containing the calendar options common by default for all users; the user workspace, which in turn contains the collection of active calendars upon which the current user is working.

See Also:
Serialized Form

Field Summary
protected  GlobalOptions globalOptions
          Set of calendar options common by default for all users, both registered and non-registered
protected  GroupDB groupDB
          User group data base
protected  RoomDB roomDB
          Room data base
protected  UserCalendars userCalendars
          List of UserCalendars for all registered users
protected  UserDB userDB
          Registered user data base
protected  UserWorkSpace workspace
          Active calendars upon which the current user is working.
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
CalendarDB()
          Construct this by constructing and initializing all components.
 
Method Summary
 UserCalendar getCurrentCalendar()
          Return the currently active calendar in the workspace.
 Date getSelectedDate()
          Get the currently selected date.
 void setSelectedDate(Date date)
          Set the currently selected date to the given date.
 
Methods inherited from class mvp.Model
dump, exit, getView, setView
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userCalendars

protected UserCalendars userCalendars
List of UserCalendars for all registered users


userDB

protected UserDB userDB
Registered user data base


groupDB

protected GroupDB groupDB
User group data base


roomDB

protected RoomDB roomDB
Room data base


globalOptions

protected GlobalOptions globalOptions
Set of calendar options common by default for all users, both registered and non-registered


workspace

protected UserWorkSpace workspace
Active calendars upon which the current user is working.

Constructor Detail

CalendarDB

public CalendarDB()
Construct this by constructing and initializing all components.

Method Detail

getCurrentCalendar

public UserCalendar getCurrentCalendar()
Return the currently active calendar in the workspace.


getSelectedDate

public Date getSelectedDate()
Get the currently selected date. If none, return today's date.


setSelectedDate

public void setSelectedDate(Date date)
Set the currently selected date to the given date.