caltool.schedule
Class Appointment

java.lang.Object
  extended by java.util.Observable
      extended by mvp.Model
          extended by caltool.schedule.ScheduledItem
              extended by caltool.schedule.Appointment
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Meeting

public class Appointment
extends ScheduledItem

Class Appointment adds a number of components to a generic ScheduledItem. The StartTime and Duration indicate when the appointment starts and how long it lasts. The RecurringInfo defines if and how an appointment recurs. The Location is where it is held. The Security indicates who can see that the appointment is scheduled. Priority is how important the appointment is. RemindInfo indicates if and how the user is reminded of the appointment. Details are free form text describing any specific appointment details.

See Also:
Serialized Form

Field Summary
protected  java.lang.String details
          Free-form text describing any specific appointment details
protected  Duration duration
          How long the appointment lasts
protected  ItemKey itemKey
          The uniqe key for storing this in the UserCalendar items list
protected  java.lang.String location
          Where the appointment is held
protected  Priority priority
          How important the appointment is
protected  RecurringInfo recurringInfo
          Defines if and how an appointment recurs
protected  RemindInfo remindInfo
          Indicates if and how user is reminded
protected  Security security
          Indicates who can see that the appointment is scheduled
protected  Time startTime
          Starting time of the appointment
 
Fields inherited from class caltool.schedule.ScheduledItem
category, endDate, startOrDueDate, title
 
Fields inherited from class mvp.Model
view
 
Constructor Summary
Appointment()
          Construct an empty appointment.
Appointment(java.lang.String title, Date startOrDueDate, Date endDate, Time startTime, Duration duration, RecurringInfo recurringInfo, Category category, java.lang.String location, Security security, Priority priority, RemindInfo remindInfo, java.lang.String details)
          Construct an appointment with the given field values.
 
Method Summary
 java.lang.String getDetails()
          Return the details.
 Duration getDuration()
          Return the duration.
 Date getEndDate()
          Return the end date.
 ItemKey getKey()
          Return the unique key for this, consisting of date, time, duration, and title.
 java.lang.String getLocation()
          Return the location.
 Priority getPriority()
          Return the priority.
 RecurringInfo getRecurringInfo()
          Return the recurring info.
 RemindInfo getRemindInfo()
          Return the remind info.
 Security getSecurity()
          Return the security.
 Date getStartDate()
          Return the start date.
 Time getStartTime()
          Return the start time.
 
Methods inherited from class caltool.schedule.ScheduledItem
getCategory, getDate, getTitle
 
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

startTime

protected Time startTime
Starting time of the appointment


duration

protected Duration duration
How long the appointment lasts


recurringInfo

protected RecurringInfo recurringInfo
Defines if and how an appointment recurs


location

protected java.lang.String location
Where the appointment is held


security

protected Security security
Indicates who can see that the appointment is scheduled


priority

protected Priority priority
How important the appointment is


remindInfo

protected RemindInfo remindInfo
Indicates if and how user is reminded


details

protected java.lang.String details
Free-form text describing any specific appointment details


itemKey

protected ItemKey itemKey
The uniqe key for storing this in the UserCalendar items list

Constructor Detail

Appointment

public Appointment()
Construct an empty appointment.


Appointment

public Appointment(java.lang.String title,
                   Date startOrDueDate,
                   Date endDate,
                   Time startTime,
                   Duration duration,
                   RecurringInfo recurringInfo,
                   Category category,
                   java.lang.String location,
                   Security security,
                   Priority priority,
                   RemindInfo remindInfo,
                   java.lang.String details)
Construct an appointment with the given field values. Generate and store the unique key for this appointment.

Method Detail

getStartDate

public Date getStartDate()
Return the start date.


getEndDate

public Date getEndDate()
Return the end date.

Overrides:
getEndDate in class ScheduledItem

getStartTime

public Time getStartTime()
Return the start time.


getDuration

public Duration getDuration()
Return the duration.


getRecurringInfo

public RecurringInfo getRecurringInfo()
Return the recurring info.


getLocation

public java.lang.String getLocation()
Return the location.


getSecurity

public Security getSecurity()
Return the security.


getPriority

public Priority getPriority()
Return the priority.


getRemindInfo

public RemindInfo getRemindInfo()
Return the remind info.


getDetails

public java.lang.String getDetails()
Return the details.


getKey

public ItemKey getKey()
Return the unique key for this, consisting of date, time, duration, and title. Priority is unused at 0. Note that this method need not be specialized in Meeting, since apppointments and meetings have the same key formats.

Specified by:
getKey in class ScheduledItem