Compoze Software, Inc.

portlets.compoze.groupware.calendar
Class Appointment

java.lang.Object
  extended byportlets.compoze.groupware.AbstractItem
      extended byportlets.compoze.groupware.calendar.Appointment
All Implemented Interfaces:
java.io.Serializable

public class Appointment
extends AbstractItem
implements java.io.Serializable

This class represents an appointment.

See Also:
Serialized Form

Constructor Summary
Appointment()
          Constructor.
Appointment(java.lang.String sID)
          Constructor.
 
Method Summary
 AppointmentType getAppointmentType()
          Gets the appointment type.
 BusyStatus getBusyStatus()
          Gets the busy status.
 java.util.Date getEndDate()
          Gets the end date for the appointment.
 java.lang.String getLocation()
          Gets the location of the appointment.
 java.lang.String getOrganizer()
          Gets the organizer of the appointment.
 boolean getPreventCounter()
          Checks if the counter is prevented.
 boolean getPreventDelegate()
          Checks if the delegate is prevented.
 RecipientInfo getRecipientInfo()
          Gets the reciepient info of the message.
 RepeatPattern getRepeatPattern()
          Gets the repeat pattern.
 Sensitivity getSensitivity()
          Gets the sensitivity of this appointment.
 java.util.Date getStartDate()
          Gets the start date for the appointment.
 java.util.Date getTimeReceived()
          Gets the time the appointment was received (if meeting request).
 java.lang.String getTimeReceivedString(java.util.Locale locale, java.util.TimeZone timeZone)
          Gets the formatted string for the time the appointment was received.
 java.lang.String[] getWhenArgs(java.util.Locale locale, java.util.TimeZone timeZone)
          Gets the i18n resource args for when the appointment occurs.
 java.lang.String getWhenKey()
          Gets the i18n key for when the appointment occurs.
static boolean hasAppointments(Appointment[] appointments, java.util.Date givenDate, java.util.Calendar cal)
          Checks if the array of appointments has any appointments that occur on the given date.
static boolean hasAppointments(Appointment[] appointments, java.util.Date startDate, java.util.Date endDate, java.util.Calendar cal)
          Checks if the array of appointments has any appointments that occur in the given date range.
 boolean isAllDayEvent()
          Checks if the appointment is an all day event.
 boolean isOrganizer()
          Checks if the user is the organizer.
 boolean isRepeating()
          Checks if the appointment is repeating.
 void setAllDayEvent(boolean bFlag)
          Sets the appointment as an all day event.
 void setAppointmentType(AppointmentType type)
          Sets the appointment type.
 void setBusyStatus(BusyStatus status)
          Sets the appointment busy status.
 void setEndDate(java.util.Date endDate)
          Sets the end date for the appointment.
 void setIsOrganizer(boolean bFlag)
          Sets the the is organizer flag.
 void setLocation(java.lang.String sLocation)
          Sets the location of the appointment.
 void setOrganizer(java.lang.String sOrganizer)
          Sets the organizer of the appointment.
 void setPreventCounter(boolean bPreventCounter)
          Sets the appointment prevent counter flag.
 void setPreventDelegate(boolean bPreventDelegate)
          Sets the appointment prevent delegate flag.
 void setRecipientInfo(RecipientInfo recipientInfo)
          Sets the reciepient info of the message.
 void setRepeating(boolean bFlag)
          Sets the appointment repeating flag.
 void setRepeatPattern(RepeatPattern repeatPattern)
          Sets the repeat pattern.
 void setSensitivity(Sensitivity sensitivity)
          Sets the sensitivity of the appointment.
 void setStartDate(java.util.Date startDate)
          Sets the start date for the appointment.
 void setTimeReceived(java.util.Date timeReceived)
          Sets the time the appointment was received (if meeting request).
static Appointment[] subList(Appointment[] appointments, java.util.Date givenDate, java.util.Calendar cal)
          Gets an array of appointments from the specified list occuring on the given date.
static Appointment[] subList(Appointment[] appointments, java.util.Date startDate, java.util.Date endDate, java.util.Calendar cal)
          Gets an array of appointments from the specified list occuring within the given start and end dates.
 
Methods inherited from class portlets.compoze.groupware.AbstractItem
getAttachmentCount, getAttachmentInfoArray, getBodyHtml, getBodyText, getBodyTextAsHtml, getDateCreated, getID, getImportance, getIndex, getItemType, getSize, getSizeInKilobytes, getSubject, getSubject, hasAttachment, prettyTruncate, setAttachmentCount, setAttachmentInfoArray, setBodyHtml, setBodyText, setDateCreated, setHasAttachment, setID, setImportance, setIndex, setItemType, setSize, setSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Appointment

public Appointment()
Constructor.


Appointment

public Appointment(java.lang.String sID)
Constructor.

Parameters:
sID - the appointment id
Method Detail

getWhenKey

public java.lang.String getWhenKey()
Gets the i18n key for when the appointment occurs.

Returns:
the i18n resource key
See Also:
#getWhenArgs()

getWhenArgs

public java.lang.String[] getWhenArgs(java.util.Locale locale,
                                      java.util.TimeZone timeZone)
Gets the i18n resource args for when the appointment occurs.

Parameters:
locale - the locale
timeZone - the time zone
Returns:
an array of args

getRecipientInfo

public RecipientInfo getRecipientInfo()
Gets the reciepient info of the message.

Returns:
the recipient info

setRecipientInfo

public void setRecipientInfo(RecipientInfo recipientInfo)
Sets the reciepient info of the message.

Parameters:
recipientInfo - the recipient info (may not be null)

getTimeReceived

public java.util.Date getTimeReceived()
Gets the time the appointment was received (if meeting request).

Returns:
the time received or null for none

setTimeReceived

public void setTimeReceived(java.util.Date timeReceived)
Sets the time the appointment was received (if meeting request).

Parameters:
timeReceived - the time appointment was received

getTimeReceivedString

public java.lang.String getTimeReceivedString(java.util.Locale locale,
                                              java.util.TimeZone timeZone)
Gets the formatted string for the time the appointment was received.

Parameters:
locale - the locale
timeZone - the time zone
Returns:
the time appointment was received

getSensitivity

public Sensitivity getSensitivity()
Gets the sensitivity of this appointment.

Returns:
the sensitivity

setSensitivity

public void setSensitivity(Sensitivity sensitivity)
Sets the sensitivity of the appointment.

Parameters:
sensitivity - the appointment sensitivity (may not be null)

getAppointmentType

public AppointmentType getAppointmentType()
Gets the appointment type.

Returns:
the appointment type

setAppointmentType

public void setAppointmentType(AppointmentType type)
Sets the appointment type.

Parameters:
type - the appointment type (may not be null

getRepeatPattern

public RepeatPattern getRepeatPattern()
Gets the repeat pattern.

Returns:
the repeat pattern or null if not set

setRepeatPattern

public void setRepeatPattern(RepeatPattern repeatPattern)
Sets the repeat pattern.

Parameters:
repeatPattern - the repeat pattern

setBusyStatus

public void setBusyStatus(BusyStatus status)
Sets the appointment busy status.


getBusyStatus

public BusyStatus getBusyStatus()
Gets the busy status.

Returns:
the busy status

isAllDayEvent

public boolean isAllDayEvent()
Checks if the appointment is an all day event.

Returns:
true if the appointment is an all day event; false otherwise

setAllDayEvent

public void setAllDayEvent(boolean bFlag)
Sets the appointment as an all day event.

Parameters:
bFlag - true if the appointment is an all day event; false otherwise

isOrganizer

public boolean isOrganizer()
Checks if the user is the organizer.

Returns:
true if user is the organizer; false otherwise

setIsOrganizer

public void setIsOrganizer(boolean bFlag)
Sets the the is organizer flag.

Parameters:
bFlag - true if user is the organizer; false otherwise

isRepeating

public boolean isRepeating()
Checks if the appointment is repeating.

Returns:
true if the appointment is repeating; false otherwise

setRepeating

public void setRepeating(boolean bFlag)
Sets the appointment repeating flag.

Parameters:
bFlag - true if the appointment is repeating; false otherwise

getStartDate

public java.util.Date getStartDate()
Gets the start date for the appointment.

Returns:
the start date

setStartDate

public void setStartDate(java.util.Date startDate)
Sets the start date for the appointment.

Parameters:
startDate - the start date

setEndDate

public void setEndDate(java.util.Date endDate)
Sets the end date for the appointment.

Parameters:
endDate - the end date

getEndDate

public java.util.Date getEndDate()
Gets the end date for the appointment.

Returns:
the end date

setLocation

public void setLocation(java.lang.String sLocation)
Sets the location of the appointment.

Parameters:
sLocation - the location of the appointment

getLocation

public java.lang.String getLocation()
Gets the location of the appointment.

Returns:
the location of the appointment

setOrganizer

public void setOrganizer(java.lang.String sOrganizer)
Sets the organizer of the appointment.

Parameters:
sOrganizer - the organizer of the appointment

getOrganizer

public java.lang.String getOrganizer()
Gets the organizer of the appointment.

Returns:
the organizer of the appointment

getPreventCounter

public boolean getPreventCounter()
Checks if the counter is prevented.

Returns:
true if counter is prevented; false otherwise

setPreventCounter

public void setPreventCounter(boolean bPreventCounter)
Sets the appointment prevent counter flag.

Parameters:
bPreventCounter - true if the counter is prevented; false otherwise

getPreventDelegate

public boolean getPreventDelegate()
Checks if the delegate is prevented.

Returns:
true if delegate is prevented; false otherwise

setPreventDelegate

public void setPreventDelegate(boolean bPreventDelegate)
Sets the appointment prevent delegate flag.

Parameters:
bPreventDelegate - true if the delegate is prevented; false otherwise

hasAppointments

public static boolean hasAppointments(Appointment[] appointments,
                                      java.util.Date givenDate,
                                      java.util.Calendar cal)
Checks if the array of appointments has any appointments that occur on the given date.

Parameters:
appointments - the array of appointments
givenDate - the date to check for
cal - the calendar
Returns:
true if the array has appointments on the given date; false otherwise

hasAppointments

public static boolean hasAppointments(Appointment[] appointments,
                                      java.util.Date startDate,
                                      java.util.Date endDate,
                                      java.util.Calendar cal)
Checks if the array of appointments has any appointments that occur in the given date range.

Parameters:
appointments - the array of appointments
startDate - the start date (inclusive)
endDate - the end date (inclusive)
cal - the calendar
Returns:
true if the array has appointments on the given date; false otherwise

subList

public static Appointment[] subList(Appointment[] appointments,
                                    java.util.Date givenDate,
                                    java.util.Calendar cal)
Gets an array of appointments from the specified list occuring on the given date.

Parameters:
appointments - the array of appointments
givenDate - the given date
cal - the calendar
Returns:
the array of appointments that occur on the given date or an empty array if no matching appointments

subList

public static Appointment[] subList(Appointment[] appointments,
                                    java.util.Date startDate,
                                    java.util.Date endDate,
                                    java.util.Calendar cal)
Gets an array of appointments from the specified list occuring within the given start and end dates.

Parameters:
appointments - the array of appointments
startDate - the start date (inclusive)
endDate - the end date (inclusive)
cal - the calendar
Returns:
the array of appointments that occur within the given start and end dates or an empty array if no matching appointments

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.