Oracle

com.compoze.domino
Class Appointment

java.lang.Object
  extended by com.compoze.domino.AbstractItem
      extended by com.compoze.domino.AbstractDocument
          extended by com.compoze.domino.Memo
              extended by com.compoze.domino.Appointment
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Notice

public class Appointment
extends Memo
implements java.io.Serializable

This class is a Domino appointment. Appointment instances are obtained from the Documents 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.DOCUMENT_ID and PropertyKey.DOCUMENT_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 an appointment.
 
Fields inherited from class com.compoze.domino.AbstractItem
m_props, m_session
 
Method Summary
 AppointmentType getAppointmentType()
          Gets the appointment type of the appointment.
 NameInfo getChair()
          Gets the chair for the appointment.
 java.util.Date getEndDateTime()
          Gets the end date time for this appointment.
 java.lang.String getEndDateTimeString(java.text.DateFormat dateFormat)
          Gets the end date time for this appointment formatted with the specified date format.
 InstanceType getInstanceType()
          Gets the instance type for this appointment.
 java.lang.String getLocation()
          Gets the location of the appointment.
 boolean getPreventCounter()
          Gets the prevent counter propose flag.
 boolean getPreventDelegate()
          Gets the prevent delegate flag.
 NameInfo getPrincipal()
          Gets the principal for the appointment.
 java.util.Date getStartDateTime()
          Gets the start date time for this appointment.
 java.lang.String getStartDateTimeString(java.text.DateFormat dateFormat)
          Gets the start date time for this appointment formatted with the specified date format.
 boolean isAllDayEvent()
          Checks if the appointment is an all day event.
 boolean isAnniversary()
          Checks if the appointment is an anniversary.
 boolean isBookFreeTime()
          Checks the book free time for the appointment.
 boolean isChair()
          Checks if this user is the chair.
 boolean isChair(UserInfo userInfo)
          Checks if the specified user is the chair.
 boolean isMarkPrivate()
          Checks the mark private flag for the appointment.
 boolean isRepeating()
          Checks if this appointment is repeating.
 void serverCancel(int iUpdateRule, java.lang.String sComment)
          Hits the server to cancel the appointment and alert any participants by sending a cancellation notice.
 void serverCancel(int iUpdateRule, java.lang.String sComment, java.lang.String sUseSubject)
          Hits the server to cancel the appointment and alert any participants by sending a cancellation notice.
 void serverCancel(java.lang.String sComment)
          Hits the server to cancel the appointment and alert any participants by sending a cancellation notice.
 void serverConfirm(java.lang.String sComment)
          Hits the server to confirm the appointment and alert any participants by sending a confirmation notice.
 void serverDelete()
          Hits the server to delete the appointment.
 void serverDelete(int iUpdateRule)
          Hits the server to delete the appointment.
 InstanceInfo[] serverGetInstanceInfoArray()
          Hits the server and gets an array of instance info for this appointment.
 RepeatPattern serverGetRepeatPattern()
          Hits the server and gets the repeat pattern for this appointment.
 MeetingResponse[] serverGetResponses()
          Hits the server to get the responses to this appointment.
 void serverSetRepeatPattern(RepeatPattern pattern)
          Hits the server and sets the repeat pattern on the appointment.
 void serverUpdate()
          Hits the server to update any changed properties.
 void serverUpdate(int iUpdateRule)
          Hits the server to update any changed properties.
 void serverUpdate(int iUpdateRule, boolean bSend)
          Hits the server to update any changed properties.
 void serverUpdate(Recipient[] recipients, boolean bSaveInSent)
          Hits the server to send the appointment to the specified recipients.
 void setBookFreeTime(boolean bFlag)
          Sets the book free time flag of the appointment.
 void setDateTimes(java.util.Date startDate, java.util.Date endDate)
          Sets the start and end date time for this appointment.
 void setLocation(java.lang.String sLocation)
          Sets the location of the appointment.
 void setMarkPrivate(boolean bFlag)
          Sets the mark private flag of the appointment.
 void setPreventCounter(boolean bFlag)
          Sets the prevent counter propose flag.
 void setPreventDelegate(boolean bFlag)
          Sets the prevent delegate flag.
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.domino.Memo
getBody, getBodyHtml, getBodyHtml, getBodyStoredFormHtml, getBodyStoredFormHtml, getDeliveredDate, getDeliveredDateString, getDeliveryPriority, getDeliveryReportLevel, getFollowUpDate, getFollowUpStatus, getFollowUpText, getImportance, getMemoDate, getMemoDateString, getNormalizedSubject, getPostedDate, getPostedDateString, getPreventCopy, getRecipientInfoArray, getReturnReceipt, getSenderInfo, getSenderName, getSubject, getSubject, getSubject, getSubject, getUnread, isEncrypted, serverForward, serverReply, serverSaveAsDraft, serverSaveAsDraft, serverSaveAsDraft, serverSaveAsDraft, setBody, setBodyHtml, setDeliveryPriority, setDeliveryReportLevel, setFollowUpDate, setFollowUpStatus, setFollowUpText, setImportance, setPreventCopy, setReturnReceipt, setSubject, setUnread
 
Methods inherited from class com.compoze.domino.AbstractDocument
getAttachmentCount, getAttachmentInfo, getAttachmentInfoArray, getDateCreated, getDateCreatedString, getDateModified, getDateModifiedString, getDocumentType, getEmbeddedImageCount, getEmbeddedImageInfo, getEmbeddedImageInfoArray, getID, getParentID, getSize, getSizeInKilos, hasAttachment, serverAddAttachment, serverCopyTo, serverDeleteAttachment, serverMoveTo
 
Methods inherited from class com.compoze.domino.AbstractItem
get, getBoolean, getDate, getDateArray, getDouble, getInt, getPropertyKeys, getString, getStringArray, getUpdatedPropertyValues, set, setBoolean, setDate, setDouble, setInt, setString, setStringArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_PROPS

public static final PropertyKey[] ALL_PROPS
Contains an array of all of the properties available on an 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

isBookFreeTime

public boolean isBookFreeTime()
                       throws DominoException
Checks the book free time for the appointment. Book free time indicates whether the appointment is penciled in or not. Time will appear free to others.

Returns:
true for not penciled in; false for penciled in (time will appear free to others)
Throws:
DominoException
See Also:
PropertyKey.BOOK_FREE_TIME

setBookFreeTime

public void setBookFreeTime(boolean bFlag)
                     throws DominoException
Sets the book free time flag of the appointment.

Parameters:
bFlag - true for pencil in; false otherwise
Throws:
DominoException
See Also:
PropertyKey.BOOK_FREE_TIME

isMarkPrivate

public boolean isMarkPrivate()
                      throws DominoException
Checks the mark private flag for the appointment. Mark private indicates others cannot see details about this event.

Returns:
true for marked private; false otherwise
Throws:
DominoException
See Also:
PropertyKey.MARK_PRIVATE

setMarkPrivate

public void setMarkPrivate(boolean bFlag)
                    throws DominoException
Sets the mark private flag of the appointment.

Parameters:
bFlag - true to mark private; false otherwise
Throws:
DominoException
See Also:
PropertyKey.MARK_PRIVATE

getAppointmentType

public AppointmentType getAppointmentType()
                                   throws DominoException
Gets the appointment type of the appointment.

Returns:
the appointment type
Throws:
DominoException
See Also:
PropertyKey.APPOINTMENT_TYPE

setDateTimes

public void setDateTimes(java.util.Date startDate,
                         java.util.Date endDate)
                  throws DominoException
Sets the start and end date time for this appointment.

Note: the start date must be before the end date. If not, the dates are swapped.

Parameters:
startDate - the start date time (may not be null)
endDate - the end date time (may not be null)
Throws:
DominoException
See Also:
PropertyKey.START_DATE_TIME, PropertyKey.END_DATE_TIME

isAllDayEvent

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

Returns:
true if an all day event; false otherwise
Throws:
DominoException
See Also:
PropertyKey.APPOINTMENT_TYPE, getAppointmentType()

isAnniversary

public boolean isAnniversary()
                      throws DominoException
Checks if the appointment is an anniversary.

Returns:
true if an anniversary; false otherwise
Throws:
DominoException
See Also:
PropertyKey.APPOINTMENT_TYPE, getAppointmentType()

getLocation

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

Returns:
the location
Throws:
DominoException
See Also:
PropertyKey.LOCATION

setLocation

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

Parameters:
sLocation - the location
Throws:
DominoException
See Also:
PropertyKey.LOCATION

isRepeating

public boolean isRepeating()
                    throws DominoException
Checks if this appointment is repeating.

Returns:
true if the appointment is repeating; false otherwise
Throws:
DominoException
See Also:
PropertyKey.REPEATS

getChair

public NameInfo getChair()
                  throws DominoException
Gets the chair for the appointment.

Returns:
the chair for the appointment
Throws:
DominoException
See Also:
PropertyKey.CHAIR

getPrincipal

public NameInfo getPrincipal()
                      throws DominoException
Gets the principal for the appointment.

Returns:
the principal for the appointment
Throws:
DominoException
See Also:
PropertyKey.PRINCIPAL

isChair

public boolean isChair()
                throws DominoException
Checks if this user is the chair.

Returns:
true if the user is the chair; false otherwise
Throws:
DominoException
See Also:
PropertyKey.CHAIR

isChair

public boolean isChair(UserInfo userInfo)
                throws DominoException
Checks if the specified user is the chair.

Parameters:
userInfo - the user to check
Returns:
true if the user is the chair; false otherwise
Throws:
DominoException
See Also:
PropertyKey.CHAIR

getStartDateTime

public java.util.Date getStartDateTime()
                                throws DominoException
Gets the start date time for this appointment.

Returns:
the start date time
Throws:
DominoException
See Also:
PropertyKey.START_DATE_TIME

getStartDateTimeString

public java.lang.String getStartDateTimeString(java.text.DateFormat dateFormat)
                                        throws DominoException
Gets the start date time for this appointment formatted with the specified date format.

Parameters:
dateFormat - the date format (may not be null)
Returns:
the start date time or empty string if start date time property is null
Throws:
DominoException
See Also:
PropertyKey.START_DATE_TIME

getEndDateTime

public java.util.Date getEndDateTime()
                              throws DominoException
Gets the end date time for this appointment.

Returns:
the end date time
Throws:
DominoException
See Also:
PropertyKey.END_DATE_TIME

getEndDateTimeString

public java.lang.String getEndDateTimeString(java.text.DateFormat dateFormat)
                                      throws DominoException
Gets the end date time for this appointment formatted with the specified date format.

Parameters:
dateFormat - the date format (may not be null)
Returns:
the end date time or empty string if end date time property is null
Throws:
DominoException
See Also:
PropertyKey.END_DATE_TIME

subList

public static Appointment[] subList(Appointment[] apts,
                                    java.util.Date givenDate,
                                    java.util.Calendar cal)
                             throws DominoException
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
Throws:
DominoException
See Also:
PropertyKey.END_DATE_TIME, PropertyKey.START_DATE_TIME

subList

public static Appointment[] subList(Appointment[] apts,
                                    java.util.Date startDate,
                                    java.util.Date endDate,
                                    java.util.Calendar cal)
                             throws DominoException
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
Throws:
DominoException
See Also:
PropertyKey.END_DATE_TIME, PropertyKey.START_DATE_TIME

getInstanceType

public InstanceType getInstanceType()
                             throws DominoException
Gets the instance type for this appointment.

Returns:
the instance type
Throws:
DominoException
See Also:
PropertyKey.INSTANCE_TYPE

serverGetRepeatPattern

public RepeatPattern serverGetRepeatPattern()
                                     throws DominoException
Hits the server and gets the repeat pattern for this appointment. This method only works on appointment that are repeating; otherwise, this method does nothing.

Returns:
the repeat patten or null if this is not a repeating appointment
Throws:
DominoException
See Also:
isRepeating(), PropertyKey.REPEATS

serverGetInstanceInfoArray

public InstanceInfo[] serverGetInstanceInfoArray()
                                          throws DominoException
Hits the server and gets an array of instance info for this appointment. Be sure to load hte parent document id property key.

Returns:
an array of instance info or an empty array for no instances
Throws:
DominoException
See Also:
getInstanceType(), InstanceType.PARENT, PropertyKey.PARENT_DOCUMENT_ID

serverSetRepeatPattern

public void serverSetRepeatPattern(RepeatPattern pattern)
                            throws DominoException
Hits the server and sets the repeat pattern on the appointment. This method only works on appointment that are of instance type SINGLE; otherwise, this method does nothing. This Appointment's Properties are updated to the first instance document.

Note: the repeat pattern is set immediately and cannot be undone. There is no need to call serverUpdate().

Note: the existing task start date will be set to the start date of the specified repeat pattern

Note: the start and end date time properties must be loaded prior to calling this method

Parameters:
pattern - the repeat patten (may not be null)
Throws:
DominoException
See Also:
getInstanceType(), PropertyKey.APPOINTMENT_TYPE, PropertyKey.INSTANCE_TYPE, PropertyKey.START_DATE_TIME, PropertyKey.END_DATE_TIME

serverDelete

public void serverDelete()
                  throws DominoException
Hits the server to delete the appointment. If this is a repeating appointment, all instances are deleted.

Throws:
DominoException

serverDelete

public void serverDelete(int iUpdateRule)
                  throws DominoException
Hits the server to delete the appointment.

Parameters:
iUpdateRule - the update rule (see RepeatPattern.UPDATE_ constants)
Throws:
DominoException
See Also:
PropertyKey.REPEATS, PropertyKey.START_DATE_TIME, PropertyKey.END_DATE_TIME

serverCancel

public void serverCancel(java.lang.String sComment)
                  throws DominoException
Hits the server to cancel the appointment and alert any participants by sending a cancellation notice.

Note: this appointment must be of type AppointmentType.MEETING and you must be the chair to cancel this appointment. An AppointmentCancellationException is thrown if you are not the chair or this is not an appointment type meeting.

Parameters:
sComment - the comment or null for none
Throws:
DominoException
See Also:
PropertyKey.CHAIR, PropertyKey.APPOINTMENT_TYPE, PropertyKey.SUBJECT, isChair(), getAppointmentType(), AppointmentCancellationException

serverCancel

public void serverCancel(int iUpdateRule,
                         java.lang.String sComment)
                  throws DominoException
Hits the server to cancel the appointment and alert any participants by sending a cancellation notice.

Note: this appointment must be of type AppointmentType.MEETING and you must be the chair to cancel this appointment. An AppointmentCancellationException is thrown if you are not the chair or this is not an appointment type meeting.

Parameters:
iUpdateRule - the update rule (see RepeatPattern.UPDATE_ constants)
sComment - the comment or null for none
Throws:
DominoException
See Also:
PropertyKey.CHAIR, PropertyKey.APPOINTMENT_TYPE, PropertyKey.SUBJECT, isChair(), getAppointmentType(), AppointmentCancellationException

serverCancel

public void serverCancel(int iUpdateRule,
                         java.lang.String sComment,
                         java.lang.String sUseSubject)
                  throws DominoException
Hits the server to cancel the appointment and alert any participants by sending a cancellation notice.

Note: this appointment must be of type AppointmentType.MEETING and you must be the chair to cancel this appointment. An AppointmentCancellationException is thrown if you are not the chair or this is not an appointment type meeting.

Parameters:
iUpdateRule - the update rule (see RepeatPattern.UPDATE_ constants)
sComment - the comment or null for none
sUseSubject - the subject to use or null for default
Throws:
DominoException
See Also:
PropertyKey.CHAIR, PropertyKey.APPOINTMENT_TYPE, PropertyKey.SUBJECT, PropertyKey.REPEATS, isChair(), getAppointmentType(), AppointmentCancellationException

serverGetResponses

public MeetingResponse[] serverGetResponses()
                                     throws DominoException
Hits the server to get the responses to this appointment.

Note: this appointment must be of type AppointmentType.MEETING and you must be the chair to cancel this appointment. A DominoException is thrown if you are not the chair or this is not an appointment type meeting.

Throws:
DominoException
See Also:
PropertyKey.CHAIR, PropertyKey.APPOINTMENT_TYPE, isChair(), getAppointmentType()

serverConfirm

public void serverConfirm(java.lang.String sComment)
                   throws DominoException
Hits the server to confirm the appointment and alert any participants by sending a confirmation notice.

Note: this appointment must be of type AppointmentType.MEETING and you must be the chair to confirm this appointment. An AppointmentConfirmationException is thrown if you are not the chair or this is not an appointment type meeting.

Parameters:
sComment - the comment or null for none
Throws:
DominoException
See Also:
PropertyKey.CHAIR, PropertyKey.APPOINTMENT_TYPE, PropertyKey.SUBJECT, isChair(), getAppointmentType(), AppointmentConfirmationException

serverUpdate

public void serverUpdate()
                  throws DominoException
Hits the server to update any changed properties. If this is a repeating appointment, all instances of the appointment are updated.

Overrides:
serverUpdate in class Memo
Throws:
DominoException

serverUpdate

public void serverUpdate(int iUpdateRule)
                  throws DominoException
Hits the server to update any changed properties.

Parameters:
iUpdateRule - the update rule (see RepeatPattern.UPDATE_ constants)
Throws:
DominoException
See Also:
PropertyKey.REPEATS, PropertyKey.START_DATE_TIME, PropertyKey.END_DATE_TIME

serverUpdate

public void serverUpdate(int iUpdateRule,
                         boolean bSend)
                  throws DominoException
Hits the server to update any changed properties.

Parameters:
iUpdateRule - the update rule (see RepeatPattern.UPDATE_ constants)
bSend - true to send an update to existing attendees
Throws:
DominoException
See Also:
PropertyKey.REPEATS, PropertyKey.START_DATE_TIME, PropertyKey.END_DATE_TIME

serverUpdate

public void serverUpdate(Recipient[] recipients,
                         boolean bSaveInSent)
                  throws DominoException
Hits the server to send the appointment to the specified recipients. A meeting invitation is sent to the recipients.

Note: If an attempt is made to include a recipient that is the chair of this appointment, a ChairNotPermittedException is thrown.

Note: this method does not update the appointment for modified properties. Use one of the other serverUpdate() methods.

Overrides:
serverUpdate in class Memo
Parameters:
recipients - the recipients to send the appointment to (may not be null)
bSaveInSent - true to save a copy of this in the sent folder; false otherwise
Throws:
DominoException
See Also:
serverUpdate(), serverUpdate(int), PropertyKey.SUBJECT, ChairNotPermittedException

getPreventCounter

public boolean getPreventCounter()
                          throws DominoException
Gets the prevent counter propose flag. If this flag is set, you cannot propose a new time for this meeting (i.e. counter).

Returns:
true to prevent counter propose; false otherwise
Throws:
DominoException
See Also:
PropertyKey.PREVENT_COUNTER

setPreventCounter

public void setPreventCounter(boolean bFlag)
                       throws DominoException
Sets the prevent counter propose flag. If this flag is set, you cannot propose a new time for this meeting (i.e. counter).

Parameters:
bFlag - true to prevent counter propose; false otherwise
Throws:
DominoException
See Also:
PropertyKey.PREVENT_COUNTER

getPreventDelegate

public boolean getPreventDelegate()
                           throws DominoException
Gets the prevent delegate flag. If this flag is set, you cannot delegate this meeting to another person.

Returns:
true to prevent delegating; false otherwise
Throws:
DominoException
See Also:
PropertyKey.PREVENT_DELEGATE

setPreventDelegate

public void setPreventDelegate(boolean bFlag)
                        throws DominoException
Sets the prevent delegate flag. If this flag is set, you cannot delegate this meeting to another person.

Parameters:
bFlag - true to prevent delegating; false otherwise
Throws:
DominoException
See Also:
PropertyKey.PREVENT_DELEGATE

Oracle

Copyright ©1999-2008 Oracle All rights reserved.