Compoze Software, Inc.

com.compoze.exchange
Class Appointment


java.lang.Object

  |

  +--com.compoze.exchange.AbstractItem

        |

        +--com.compoze.exchange.Message

              |

              +--com.compoze.exchange.Appointment

All Implemented Interfaces:
java.io.Serializable

public class Appointment
extends Message
implements java.io.Serializable

This class is an Exchange appointment. Appointment instances are obtained from the Appointments class. Methods that access properites on the class require that the properties were loaded beforehand, when the message was initially retrieved. Any methods in this class that begin with the string server make a query to the server, and require that the PropertyKey.MESSAGE_ID and PropertyKey.MESSAGE_TYPE properties to be loaded beforehand. Any additional property requirements are indicated on each individual method.

See Also:
Serialized Form

Field Summary
static PropertyKey[] ALL_PROPS
          Contains an array of all of the properties available on a appointment.
 
Fields inherited from class com.compoze.exchange.AbstractItem
m_props, m_session
 
Method Summary
 java.lang.String getBillingInfo()
          Gets the billing info of the appointment.
 BusyStatus getBusyStatus()
          Gets the busy status of the appointment.
 java.lang.String[] getContactNames()
          Gets the contact names of the appointment.
 int getDuration()
          Gets the duration property of the appointment.
 java.util.Date getEndTime()
          Gets the end time of the appointment.
 java.lang.String getLocation()
          Gets the physical location of the appointment.
 MeetingResponseStatus getMeetingResponseStatus()
          Gets the meeting response status of the appointment.
 MeetingStatus getMeetingStatus()
          Gets the overall meeting status of the appointment.
 java.lang.String getMileage()
          Gets the mileage of the appointment.
 AddressEntryInfo getOrganizer()
          Gets the organizer that initiated the meeting request for the appointment.
 RecurrencePattern getRecurrencePattern()
          Gets the recurrence pattern for the appointment, which describes all of the parameters for a recurring event.
 int getReminderMinutesBeforeStart()
          Gets the number of minutes before an event for the reminder.
 java.util.Date getReplyTime()
          Gets the reply time of the appointment.
 java.lang.String getSeriesID()
          Gets the ID of the series (if it is a recurring appointment).
 java.util.Date getStartTime()
          Gets the start time of the appointment.
 boolean isAllDayEvent()
          Checks if the appointment is an all day event.
 boolean isOrganizer()
          Checks if the current user is the organizer of the appointment.
 boolean isRecurring()
          Gets the recurring property of the appointment.
 boolean isReminderSet()
          Checks if the appointment reminder is set.
 boolean isResponseRequested()
          Checks if the appointment requests a response.
 boolean isSpanning()
          Checks if the appointment spans over the period of at least 1 day.
 void serverCancelMeeting(boolean bSeries, boolean bSend, boolean bSaveInSent)
          Cancels the meeting.
 void serverCancelMeeting(boolean bSeries, boolean bSend, boolean bSaveInSent, boolean bDelete)
          Deprecated. bDelete must always be true since cancelling a meeting and then not removing it can have unpredictable results. Since version 3.1.25
 void serverDelete(boolean bDeletedItems, boolean bDeleteSeries)
          Hits the server to delete the appointment.
 UnresolvedRecipient[] serverResolveRecipients(boolean bRemove, boolean bSeries)
          Hits the server to resolve recipients for the message.
 void serverRespond(ResponseStatus status, PropertyValue[] values, Recipient[] recipients, boolean bSeries, boolean bSaveInSent)
          Send a response to a meeting that is already established.
 void serverUpdate(Recipient[] recipients, boolean bSeries, boolean bSend, boolean bSaveInSent)
          Hits the server to update any changed properties.
 void setAllDayEvent(boolean bAllDayEvent)
          Sets the all day event property of the appointment.
 void setBillingInfo(java.lang.String sBillingInfo)
          Sets the billing info of the appointment.
 void setBusyStatus(BusyStatus status)
          Sets the busy status of the appointment.
 void setContactNames(java.lang.String[] contactNames)
          Sets the contact names of the appointment.
 void setDates(java.util.Date startDate, java.util.Date endDate)
          Sets the start and end time of the appointment.
 void setLocation(java.lang.String sLocation)
          Sets the physical location of the appointment.
 void setMeetingResponseStatus(MeetingResponseStatus status)
          Sets the meeting response status of the appointment.
 void setMeetingStatus(MeetingStatus status)
          Sets the overall meeting status of the appointment.
 void setMileage(java.lang.String sMileage)
          Sets the mileage of the appointment.
 void setRecurrencePattern(RecurrencePattern pattern)
          Sets the recurrence pattern for the appointment, which describes all of the parameters for a recurring event.
 void setReminderMinutesBeforeStart(int iReminderMinutes)
          Sets the number of minutes before an event for the reminder.
 void setReminderSet(boolean bReminderSet)
          Sets the reminder set property of the appointment.
 void setReplyTime(java.util.Date replyTime)
          Sets the reply time of the appointment.
 void setResponseRequested(boolean bResponseRequested)
          Sets the response requested property of the appointment.
 void setSender(AddressEntry addressEntry)
          Sets the sender.
static Appointment[] subList(Appointment[] apts, java.util.Date givenDate, java.util.Calendar cal)
          Returns an array of appointments from the specified list occuring on the given date.
static Appointment[] subList(Appointment[] apts, java.util.Date startDate, java.util.Date endDate, java.util.Calendar cal)
          Returns an array of appointments from the specified list occuring within the given start and end dates.
 
Methods inherited from class com.compoze.exchange.Message
getActionStatus, getAttachmentCount, getAttachmentInfo, getAttachmentInfoArray, getCategories, getConversationIndex, getConversationTopic, getDeliveryReceipt, getEncrypted, getFlagStatus, getFlagText, getFolderID, getFolderName, getHtml, getHtml, getID, getImportance, getMessageType, getNormalizedSubject, getReadReceipt, getRecipientInfo, getRecipientInfoArray, getRichTextFormat, getRichTextFormatAsHtml, getRichTextFormatAsHtml, getRichTextFormatAsPlain, getSender, getSenderName, getSensitivity, getSent, getSigned, getSize, getStoreID, getSubject, getSubject, getSubmitted, getText, getTimeCreated, getTimeExpired, getTimeLastModified, getTimeReceived, getTimeReceivedString, getTimeSent, getUnread, hasAttachment, serverAddAttachment, serverCopyTo, serverDelete, serverDelete, serverDeleteAttachment, serverGetAttachment, serverGetAttachments, serverMoveTo, serverMoveTo, serverResolveRecipients, serverUpdate, serverUpdate, serverUpdate, setActionStatus, setCategories, setConversationIndex, setConversationTopic, setDeliveryReceipt, setEncrypted, setFlagStatus, setFlagText, setFlagText, setHtml, setImportance, setMessageType, setReadReceipt, setRichTextFormat, setSensitivity, setSent, setSigned, setSubject, setSubmitted, setText, setTimeExpired, setTimeReceived, setTimeSent, setUnread, toString
 
Methods inherited from class com.compoze.exchange.AbstractItem
get, getBoolean, getByteArray, getDate, getDouble, getInt, getInvalidPropertyValues, getPropertyKeys, getString, getStringArray, getUpdatedPropertyValues, set, setBoolean, setByteArray, setDate, setDouble, setInt, setString, setStringArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_PROPS


public static final PropertyKey[] ALL_PROPS
Contains an array of all of the properties available on a appointment. Although this can be used when specifying property keys to retrieve, it's preferable to only specify the keys that are required as the number of properties that are pulled back from the server has a direct impact on performance.
Method Detail

getBusyStatus


public BusyStatus getBusyStatus()
                         throws ExchangeException
Gets the busy status of the appointment.
Returns:
the busy status of the appointment
See Also:
PropertyKey.APPOINTMENT_BUSY_STATUS

setBusyStatus


public void setBusyStatus(BusyStatus status)
                   throws ExchangeException
Sets the busy status of the appointment.
Parameters:
status - the busy status of the appointment
See Also:
PropertyKey.APPOINTMENT_BUSY_STATUS

getBillingInfo


public java.lang.String getBillingInfo()
                                throws ExchangeException
Gets the billing info of the appointment.
Returns:
the billing info of the appointment
See Also:
PropertyKey.BILLING_INFO

setBillingInfo


public void setBillingInfo(java.lang.String sBillingInfo)
                    throws ExchangeException
Sets the billing info of the appointment.
Parameters:
sBillingInfo - the billing info of the appointment
See Also:
PropertyKey.BILLING_INFO

getMileage


public java.lang.String getMileage()
                            throws ExchangeException
Gets the mileage of the appointment.
Returns:
the mileage of the appointment
See Also:
PropertyKey.MILEAGE

setMileage


public void setMileage(java.lang.String sMileage)
                throws ExchangeException
Sets the mileage of the appointment.
Parameters:
sBillingInfo - the mileage of the appointment
See Also:
PropertyKey.MILEAGE

getContactNames


public java.lang.String[] getContactNames()
                                   throws ExchangeException
Gets the contact names of the appointment.
Returns:
the contact names of the appointment
See Also:
PropertyKey.CONTACT_NAMES

setContactNames


public void setContactNames(java.lang.String[] contactNames)
                     throws ExchangeException
Sets the contact names of the appointment.
Parameters:
contactNames - the contact names of the appointment
See Also:
PropertyKey.CONTACT_NAMES

getStartTime


public java.util.Date getStartTime()
                            throws ExchangeException
Gets the start time of the appointment.
Returns:
the start time of the appointment
See Also:
PropertyKey.APPOINTMENT_START_TIME

setDates


public void setDates(java.util.Date startDate,
                     java.util.Date endDate)
              throws ExchangeException
Sets the start and end time of the appointment.
Parameters:
startDate - the start time of the appointment
endDate - the end time of the appointment
See Also:
PropertyKey.APPOINTMENT_END_TIME

isAllDayEvent


public boolean isAllDayEvent()
                      throws ExchangeException
Checks if the appointment is an all day event.
Returns:
true if the appointment is an all day event
See Also:
PropertyKey.APPOINTMENT_ALL_DAY_EVENT

isSpanning


public boolean isSpanning()
                   throws ExchangeException
Checks if the appointment spans over the period of at least 1 day. All Day Events are always spanning, but appointments that span at least 1 day are not necessarily All Day Events
Returns:
true if the appointment is longer than 24 hours
See Also:
PropertyKey.APPOINTMENT_IS_SPANNING

isOrganizer


public boolean isOrganizer()
                    throws ExchangeException
Checks if the current user is the organizer of the appointment. The user is made the organizer of an appointment when they first create it. If the appointment came from a meeting request from another user, then the user is not the organizer.
Returns:
true if the user is the organizer of the appointment
See Also:
PropertyKey.APPOINTMENT_IS_ORGANIZER

setAllDayEvent


public void setAllDayEvent(boolean bAllDayEvent)
                    throws ExchangeException
Sets the all day event property of the appointment. If the all day event property is being set to true, the appointment dates are eventually modified to be on 24 hour boundaries from midnight to midnight.
Parameters:
bAllDayEvent - the all day event property of the appointment
See Also:
PropertyKey.APPOINTMENT_ALL_DAY_EVENT

getDuration


public int getDuration()
                throws ExchangeException
Gets the duration property of the appointment.
Returns:
the duration of the appointment (in minutes)
See Also:
PropertyKey.APPOINTMENT_DURATION

getEndTime


public java.util.Date getEndTime()
                          throws ExchangeException
Gets the end time of the appointment.
Returns:
the end time of the appointment
See Also:
PropertyKey.APPOINTMENT_END_TIME

isRecurring


public boolean isRecurring()
                    throws ExchangeException
Gets the recurring property of the appointment.
Returns:
true if the appointment is recurring
See Also:
PropertyKey.APPOINTMENT_IS_RECURRING

getLocation


public java.lang.String getLocation()
                             throws ExchangeException
Gets the physical location of the appointment.
Returns:
the location of the appointment
See Also:
PropertyKey.APPOINTMENT_LOCATION

getSeriesID


public java.lang.String getSeriesID()
                             throws ExchangeException
Gets the ID of the series (if it is a recurring appointment).
Returns:
the ID of the series
See Also:
PropertyKey.APPOINTMENT_SERIES_ID

setLocation


public void setLocation(java.lang.String sLocation)
                 throws ExchangeException
Sets the physical location of the appointment.
Parameters:
sLocation - the location of the appointment
See Also:
PropertyKey.APPOINTMENT_LOCATION

getMeetingResponseStatus


public MeetingResponseStatus getMeetingResponseStatus()
                                               throws ExchangeException
Gets the meeting response status of the appointment.
Returns:
the meeting response status
See Also:
PropertyKey.APPOINTMENT_MEETING_RESPONSE_STATUS

setMeetingResponseStatus


public void setMeetingResponseStatus(MeetingResponseStatus status)
                              throws ExchangeException
Sets the meeting response status of the appointment.
Parameters:
status - the meeting response status of the appointment
See Also:
PropertyKey.APPOINTMENT_MEETING_RESPONSE_STATUS

getMeetingStatus


public MeetingStatus getMeetingStatus()
                               throws ExchangeException
Gets the overall meeting status of the appointment.
Returns:
the meeting status
See Also:
PropertyKey.APPOINTMENT_MEETING_STATUS

setMeetingStatus


public void setMeetingStatus(MeetingStatus status)
                      throws ExchangeException
Sets the overall meeting status of the appointment.
Parameters:
status - the meeting status of the appointment
See Also:
PropertyKey.APPOINTMENT_MEETING_STATUS

getOrganizer


public AddressEntryInfo getOrganizer()
                              throws ExchangeException
Gets the organizer that initiated the meeting request for the appointment.
Returns:
the organizer, or null if the appointment has no organizer
See Also:
PropertyKey.APPOINTMENT_ORGANIZER

setSender


public void setSender(AddressEntry addressEntry)
               throws ExchangeException
Sets the sender. This method throws an ExchangeException
Overrides:
setSender in class Message
Following copied from class: com.compoze.exchange.Message
Parameters:
addressEntry - the address entry of the sender
Throws:
ExchangeException - the address entry id must be available

getReminderMinutesBeforeStart


public int getReminderMinutesBeforeStart()
                                  throws ExchangeException
Gets the number of minutes before an event for the reminder.
Returns:
the number of minutes before the event that the reminder will occur
See Also:
PropertyKey.APPOINTMENT_REMINDER_MINUTES_BEFORE_START

setReminderMinutesBeforeStart


public void setReminderMinutesBeforeStart(int iReminderMinutes)
                                   throws ExchangeException
Sets the number of minutes before an event for the reminder.
Parameters:
iReminderMinutes - the number of minutes before an event for the reminder
See Also:
PropertyKey.APPOINTMENT_REMINDER_MINUTES_BEFORE_START

isReminderSet


public boolean isReminderSet()
                      throws ExchangeException
Checks if the appointment reminder is set.
Returns:
true if a reminder is set for the appointment
See Also:
PropertyKey.APPOINTMENT_REMINDER_SET

setReminderSet


public void setReminderSet(boolean bReminderSet)
                    throws ExchangeException
Sets the reminder set property of the appointment.
Parameters:
bIsReminderSet - true if a reminder should be set for the appointment
See Also:
PropertyKey.APPOINTMENT_REMINDER_SET

getReplyTime


public java.util.Date getReplyTime()
                            throws ExchangeException
Gets the reply time of the appointment.
Returns:
the reply time of the appointment
See Also:
PropertyKey.APPOINTMENT_REPLY_TIME

setReplyTime


public void setReplyTime(java.util.Date replyTime)
                  throws ExchangeException
Sets the reply time of the appointment.
Parameters:
replyTime - the reply time of the appointment
See Also:
PropertyKey.APPOINTMENT_REPLY_TIME

isResponseRequested


public boolean isResponseRequested()
                            throws ExchangeException
Checks if the appointment requests a response.
Returns:
true if a response is requested for meeting requests created for the appointment
See Also:
PropertyKey.APPOINTMENT_RESPONSE_REQUESTED

setResponseRequested


public void setResponseRequested(boolean bResponseRequested)
                          throws ExchangeException
Sets the response requested property of the appointment.
Parameters:
bResponseRequested - true if a response is requested for meeting requests for the appointment
See Also:
PropertyKey.APPOINTMENT_RESPONSE_REQUESTED

subList


public static Appointment[] subList(Appointment[] apts,
                                    java.util.Date givenDate,
                                    java.util.Calendar cal)
                             throws ExchangeException
Returns an array of appointments from the specified list occuring on the given date.
Parameters:
apts - 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
See Also:
PropertyKey.APPOINTMENT_ALL_DAY_EVENT, PropertyKey.APPOINTMENT_END_TIME, PropertyKey.APPOINTMENT_START_TIME

subList


public static Appointment[] subList(Appointment[] apts,
                                    java.util.Date startDate,
                                    java.util.Date endDate,
                                    java.util.Calendar cal)
                             throws ExchangeException
Returns an array of appointments from the specified list occuring within the given start and end dates.
Parameters:
apts - 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
See Also:
PropertyKey.APPOINTMENT_ALL_DAY_EVENT, PropertyKey.APPOINTMENT_END_TIME, PropertyKey.APPOINTMENT_START_TIME

getRecurrencePattern


public RecurrencePattern getRecurrencePattern()
                                       throws ExchangeException
Gets the recurrence pattern for the appointment, which describes all of the parameters for a recurring event.
Returns:
the recurrence pattern
See Also:
PropertyKey.APPOINTMENT_RECURRENCE_PATTERN

setRecurrencePattern


public void setRecurrencePattern(RecurrencePattern pattern)
                          throws ExchangeException
Sets the recurrence pattern for the appointment, which describes all of the parameters for a recurring event. NOTE: This method only sets the recurrence pattern to be updated on the server. It does not affect the result of a call to getRecurrencePattern until the appointment has been retrieved from the server. NOTE: Setting the recurrence pattern on an existing series will cause all exceptions to that series to be lost.
Parameters:
pattern - the recurrence pattern
See Also:
PropertyKey.APPOINTMENT_RECURRENCE_PATTERN

serverDelete


public void serverDelete(boolean bDeletedItems,
                         boolean bDeleteSeries)
                  throws ExchangeException
Hits the server to delete the appointment.
Parameters:
bDeletedItems - if true, move the appointment into deleted items
bDeleteSeries - if true and the appointment is recurring, delete all instances of the recurring appointment

serverUpdate


public void serverUpdate(Recipient[] recipients,
                         boolean bSeries,
                         boolean bSend,
                         boolean bSaveInSent)
                  throws ExchangeException
Hits the server to update any changed properties.
Parameters:
recipients - the recipients to add to the message (or null for no recipients to add)
bSeries - if true, update the series rather then the instance (recurrence pattern may not be changed on the instance)
bSend - if true, send the message
bSaveInSent - if true and sending the message, save the message in the Sent Items folder

serverResolveRecipients


public UnresolvedRecipient[] serverResolveRecipients(boolean bRemove,
                                                     boolean bSeries)
                                              throws ExchangeException
Hits the server to resolve recipients for the message. Recipients with an SMTP address resolve properly.
Parameters:
bRemove - if true, remove recipients if they do not resolve.
bSeries - if true, use the series
Returns:
an array of Recipient objects of unresolved recipients, or an array of zero length if all recipients were resolved

serverRespond


public void serverRespond(ResponseStatus status,
                          PropertyValue[] values,
                          Recipient[] recipients,
                          boolean bSeries,
                          boolean bSaveInSent)
                   throws ExchangeException
Send a response to a meeting that is already established.
Parameters:
bSeries - apply change to the series
bSend - true to send the response
bSaveInSent - save a copy in the sent items folder

serverCancelMeeting


public void serverCancelMeeting(boolean bSeries,
                                boolean bSend,
                                boolean bSaveInSent)
                         throws ExchangeException
Cancels the meeting. This method will automatically set the meeting status to 'Canceled.' Cancelling a meeting automatically deletes the appointment from the calendar.
Parameters:
bSeries - true to cancel the series
bSend - true to send a cancellation notice
bSaveInSent - true to save to 'Sent Items'
Throws:
ExchangeException - if there is a problem interacting with Exchange or the Appointment MeetingStatus is not MeetingStatus.MEETING

serverCancelMeeting


public void serverCancelMeeting(boolean bSeries,
                                boolean bSend,
                                boolean bSaveInSent,
                                boolean bDelete)
                         throws ExchangeException
Deprecated. bDelete must always be true since cancelling a meeting and then not removing it can have unpredictable results. Since version 3.1.25

Cancels the meeting. This method will automatically set the meeting status to 'Canceled.'
Parameters:
bSeries - true to cancel the series
bSend - true to send a cancellation notice
bSaveInSent - true to save to 'Sent Items'
bDelete - true to delete the appointment; this will occur after sending cancellations (if specified)
Throws:
ExchangeException - if there is a problem interacting with Exchange or the Appointment MeetingStatus is not MeetingStatus.MEETING

Compoze Software, Inc.

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