Appointment

Inheritance: java.lang.Object

public class Appointment

Represents a calendar to an e-mail.


This example demonstrates how to add a calendar to an E-Mail message.

[Java]

MailMessage msg = new MailMessage();

     //attendees for the event
     MailAddressCollection attendees = new MailAddressCollection();
     attendees.add(new MailAddress("person1@domain.com"));
     attendees.add(new MailAddress("person2@domain.com"));
     attendees.add(new MailAddress("person3@domain.com"));

     //create appointment
     Appointment app = new Appointment("Room 112",
          new Date(2006,7,17,13,0,0), new Date(2006,7,17,14,0,0),
          new MailAddress("somebody@domain.com"),
          attendees );
     app.setSummary("Release Meetting");
     app.setDescription("Discuss for the next release");

     //add calendar to the message
     msg.addAlternateView(app.requestApointment());

Constructors

Constructor Description
Appointment(String location, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees) Initialize a new instance of the Appointment class.
Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees) Initialize a new instance of the Appointment class.
Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, String uid) Initialize a new instance of the Appointment class.
Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, RecurrencePattern recurrencePattern) Initialize a new instance of the Appointment class.
Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, String uid, RecurrencePattern recurrencePattern) Initialize a new instance of the Appointment class.

Methods

Method Description
cancelAppointment() Cancels the appointment.
cancelAppointment(int seqId) Cancels the appointment.
equals(Object arg0)
getAppointmentClass() Specifies the access classification for the appointment.
getAppointmentHtml() Gets the calendar HTML.
getAppointmentText() Gets the calendar text.
getAppointmentText(AppointmentFormattingOptions formattingOptions) Gets the calendar text.
getAttachments() Gets the collection of attachments of appointment.
getAttendees() Gets or sets the attendees.
getClass()
getCreatedDate() Gets or sets the date and time that calendar information was created.
getDateTimeStamp() Gets or sets date/time that the instance of the iCalendar object was created..
getDescription() Gets or sets the description.
getEndDate() Gets or sets the end date.
getEndTimeZone() End time zone
getFlags() Gets or sets appointment flags.
getHtmlDescription() Gets or sets html representation of description.
getLastModifiedDate() Gets or sets the date and time that calendar information was last revised.
getLocation() Gets or sets the location.
getMethodType() Gets or sets the iCalendar object method type associated with the calendar object.
getMicrosoftBusyStatus() Specifies the BUSY status of an appointment.
getMicrosoftImportance() Specifies the importance of an appointment.
getMicrosoftIntendedStatus() Specifies the INTENDED status of an appointment.
getOptionalAttendees() Gets the optional attendees.
getOrganizer() Gets or sets the organizer.
getRecurrence() Gets or sets the recurrence pattern.
getReminders() Contains collection of AppointmentReminder AppointmentReminder objects.
getSequenceId() Gets the sequence id.
getStartDate() Gets or sets the start date.
getStartTimeZone() Start time zone
getStatus() Gets or sets the overall status or confirmation for the object.
getSummary() Gets or sets the summary.
getTransparency() Specifies whether or not this appointment is intended to be visible in availability searches.
getUniqueId() Gets or sets a string value that contains the GUID for the calendar item.
hashCode()
isDescriptionHtml() Gets or sets value which indicates if description is in HTML format
load(InputStream stream) Loads Appointment from the stream
load(InputStream stream, boolean applyLocalTimeZone) Loads Appointment from the stream
load(InputStream stream, AppointmentLoadOptions options) Loads Appointment from the stream
load(String filePath) Loads Appointment from the file.
load(String filePath, AppointmentLoadOptions options) Loads Appointment from the file.
notify()
notifyAll()
requestApointment() Requests the apointment.
requestApointment(int seqId) Requests the apointment.
resetTimeZone() Set local time zone
save(OutputStream stream) Saves appointment to the file with iCalendar format using te default save options
save(OutputStream stream, AppointmentSaveOptions saveOptions) Saves appointment to the stream with specified save options
save(OutputStream stream, int saveFormat) Saves appointment to the stream with specified format using te default save options
save(String filePath) Saves appointment to the file with iCalendar format using te default save options
save(String filePath, AppointmentSaveOptions saveOptions) Saves appointment to the file with specified save options
save(String filePath, int saveFormat) Saves appointment to the file with specified format using te default save options
setAppointmentClass(int value) Specifies the access classification for the appointment.
setAttendees(MailAddressCollection value) Gets or sets the attendees.
setCreatedDate(Date value) Gets or sets the date and time that calendar information was created.
setDateTimeStamp(Date value) Gets or sets date/time that the instance of the iCalendar object was created..
setDescription(String value) Gets or sets the description.
setDescriptionHtml(boolean value) Gets or sets value which indicates if description is in HTML format
setEndDate(Date value) Gets or sets the end date.
setEndTimeZone(String value) End time zone
setFlags(int value) Gets or sets appointment flags.
setHtmlDescription(String value) Gets or sets html representation of description.
setLastModifiedDate(Date value) Gets or sets the date and time that calendar information was last revised.
setLocation(String value) Gets or sets the location.
setMethodType(int value) Gets or sets the iCalendar object method type associated with the calendar object.
setMicrosoftBusyStatus(int value) Specifies the BUSY status of an appointment.
setMicrosoftImportance(int value) Specifies the importance of an appointment.
setMicrosoftIntendedStatus(int value) Specifies the INTENDED status of an appointment.
setOrganizer(MailAddress value) Gets or sets the organizer.
setRecurrence(RecurrencePattern value) Gets or sets the recurrence pattern.
setStartDate(Date value) Gets or sets the start date.
setStartTimeZone(String value) Start time zone
setStatus(int value) Gets or sets the overall status or confirmation for the object.
setSummary(String value) Gets or sets the summary.
setTimeZone(String tzName) Set time zone
setTransparency(int value) Specifies whether or not this appointment is intended to be visible in availability searches.
setUniqueId(String value) Gets or sets a string value that contains the GUID for the calendar item.
toString()
updateAppointment() Updates the appointment.
updateAppointment(int seqId) Updates the appointment.
wait()
wait(long arg0)
wait(long arg0, int arg1)

Appointment(String location, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)

public Appointment(String location, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)

Initialize a new instance of the Appointment class.

Parameters:

Parameter Type Description
location java.lang.String The location of the calendar event.
startDate java.util.Date The start time of the calendar event.
endDate java.util.Date The end time of the calendar event.
organizer MailAddress The organizer of the calendar event.
attendees MailAddressCollection The attendees of th calendar event.

Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)

public Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)

Initialize a new instance of the Appointment class.

Parameters:

Parameter Type Description
location java.lang.String The location of the calendar event.
summary java.lang.String The summary of the calendar event.
description java.lang.String The description of the calendar event.
startDate java.util.Date The start time of the calendar event.
endDate java.util.Date The end time of the calendar event.
organizer MailAddress The organizer of the calendar event.
attendees MailAddressCollection The attendees of th calendar event.

Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, String uid)

public Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, String uid)

Initialize a new instance of the Appointment class.

Parameters:

Parameter Type Description
location java.lang.String The location of the calendar event.
summary java.lang.String The summary of the calendar event.
description java.lang.String The description of the calendar event.
startDate java.util.Date The start time of the calendar event.
endDate java.util.Date The end time of the calendar event.
organizer MailAddress The organizer of the calendar event.
attendees MailAddressCollection The attendees of th calendar event.
uid java.lang.String The unique identifier of th calendar event.

Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, RecurrencePattern recurrencePattern)

public Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, RecurrencePattern recurrencePattern)

Initialize a new instance of the Appointment class.

Parameters:

Parameter Type Description
location java.lang.String The location of the calendar event.
summary java.lang.String The summary of the calendar event.
description java.lang.String The description of the calendar event.
startDate java.util.Date The start time of the calendar event.
endDate java.util.Date The end time of the calendar event.
organizer MailAddress The organizer of the calendar event.
attendees MailAddressCollection The attendees of th calendar event.
recurrencePattern RecurrencePattern The recurrence pattern.

Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, String uid, RecurrencePattern recurrencePattern)

public Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, String uid, RecurrencePattern recurrencePattern)

Initialize a new instance of the Appointment class.

Parameters:

Parameter Type Description
location java.lang.String The location of the calendar event.
summary java.lang.String The summary of the calendar event.
description java.lang.String The description of the calendar event.
startDate java.util.Date The start time of the calendar event.
endDate java.util.Date The end time of the calendar event.
organizer MailAddress The organizer of the calendar event.
attendees MailAddressCollection The attendees of th calendar event.
uid java.lang.String The unique identifier of th calendar event.
recurrencePattern RecurrencePattern The recurrence pattern.

cancelAppointment()

public final AlternateView cancelAppointment()

Cancels the appointment.

Returns: AlternateView - AlternateViewAlternateView that represents the format to view an email message.

cancelAppointment(int seqId)

public final AlternateView cancelAppointment(int seqId)

Cancels the appointment.

Parameters:

Parameter Type Description
seqId int The sequence id.

Returns: AlternateView - AlternateViewAlternateView that represents the format to view an email message.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

getAppointmentClass()

public final int getAppointmentClass()

Specifies the access classification for the appointment.

Returns: int

getAppointmentHtml()

public final String getAppointmentHtml()

Gets the calendar HTML.

Returns: java.lang.String - String value of calendar as HTML.

getAppointmentText()

public final String getAppointmentText()

Gets the calendar text.

Returns: java.lang.String - String value of calendar as plain text.

getAppointmentText(AppointmentFormattingOptions formattingOptions)

public final String getAppointmentText(AppointmentFormattingOptions formattingOptions)

Gets the calendar text.

Parameters:

Parameter Type Description
formattingOptions AppointmentFormattingOptions AppointmentFormattingOptions that represents appointment formatting options.

Returns: java.lang.String - The text representation of appointment.

getAttachments()

public final AttachmentCollection getAttachments()

Gets the collection of attachments of appointment.

Returns: AttachmentCollection

getAttendees()

public final MailAddressCollection getAttendees()

Gets or sets the attendees.

Returns: MailAddressCollection

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCreatedDate()

public final Date getCreatedDate()

Gets or sets the date and time that calendar information was created.

Value: The java.util.Date that represents creation date and time.

Returns: java.util.Date

getDateTimeStamp()

public final Date getDateTimeStamp()

Gets or sets date/time that the instance of the iCalendar object was created..

Returns: java.util.Date

getDescription()

public final String getDescription()

Gets or sets the description.

Returns: java.lang.String

getEndDate()

public final Date getEndDate()

Gets or sets the end date.

Returns: java.util.Date

getEndTimeZone()

public final String getEndTimeZone()

End time zone

Returns: java.lang.String

getFlags()

public final int getFlags()

Gets or sets appointment flags.

Returns: int

getHtmlDescription()

public final String getHtmlDescription()

Gets or sets html representation of description.

Returns: java.lang.String

getLastModifiedDate()

public final Date getLastModifiedDate()

Gets or sets the date and time that calendar information was last revised.

Value: The java.util.Date that represents modification date and time.

Returns: java.util.Date

getLocation()

public final String getLocation()

Gets or sets the location.

Returns: java.lang.String

getMethodType()

public final int getMethodType()

Gets or sets the iCalendar object method type associated with the calendar object.

Returns: int

getMicrosoftBusyStatus()

public final int getMicrosoftBusyStatus()

Specifies the BUSY status of an appointment.

Returns: int

getMicrosoftImportance()

public final int getMicrosoftImportance()

Specifies the importance of an appointment.

Returns: int

getMicrosoftIntendedStatus()

public final int getMicrosoftIntendedStatus()

Specifies the INTENDED status of an appointment.

Returns: int

getOptionalAttendees()

public final MailAddressCollection getOptionalAttendees()

Gets the optional attendees.

Value: The address collection of optional attendees.

Returns: MailAddressCollection

getOrganizer()

public final MailAddress getOrganizer()

Gets or sets the organizer.

Returns: MailAddress

getRecurrence()

public final RecurrencePattern getRecurrence()

Gets or sets the recurrence pattern.

Value: The recurrence pattern.

Returns: RecurrencePattern

getReminders()

public final AppointmentReminderCollection getReminders()

Contains collection of AppointmentReminder AppointmentReminder objects.

Returns: AppointmentReminderCollection

getSequenceId()

public final String getSequenceId()

Gets the sequence id.

Value: The sequence id.

Returns: java.lang.String

getStartDate()

public final Date getStartDate()

Gets or sets the start date.

Returns: java.util.Date

getStartTimeZone()

public final String getStartTimeZone()

Start time zone

Returns: java.lang.String

getStatus()

public final int getStatus()

Gets or sets the overall status or confirmation for the object.

Returns: int

getSummary()

public final String getSummary()

Gets or sets the summary.

Returns: java.lang.String

getTransparency()

public final int getTransparency()

Specifies whether or not this appointment is intended to be visible in availability searches.

Returns: int

getUniqueId()

public final String getUniqueId()

Gets or sets a string value that contains the GUID for the calendar item. In MS Exchange this is PidLidGlobalObjectId mapi property.

Value: The unique id.

Returns: java.lang.String

hashCode()

public native int hashCode()

Returns: int

isDescriptionHtml()

public final boolean isDescriptionHtml()

Gets or sets value which indicates if description is in HTML format

Returns: boolean

load(InputStream stream)

public static Appointment load(InputStream stream)

Loads Appointment from the stream

Parameters:

Parameter Type Description
stream java.io.InputStream A stream to load from

Returns: Appointment - A read Appointment

load(InputStream stream, boolean applyLocalTimeZone)

public static Appointment load(InputStream stream, boolean applyLocalTimeZone)

Loads Appointment from the stream

Parameters:

Parameter Type Description
stream java.io.InputStream A stream to load from
applyLocalTimeZone boolean Convert time to local timezone

Returns: Appointment - A read Appointment

load(InputStream stream, AppointmentLoadOptions options)

public static Appointment load(InputStream stream, AppointmentLoadOptions options)

Loads Appointment from the stream

Parameters:

Parameter Type Description
stream java.io.InputStream A stream to load from
options AppointmentLoadOptions Represents appointment load options

Returns: Appointment - A read Appointment

load(String filePath)

public static Appointment load(String filePath)

Loads Appointment from the file. Supported file formats: iCalendar

Parameters:

Parameter Type Description
filePath java.lang.String A file path

Returns: Appointment - A read Appointment

load(String filePath, AppointmentLoadOptions options)

public static Appointment load(String filePath, AppointmentLoadOptions options)

Loads Appointment from the file. Supported file formats: iCalendar

Parameters:

Parameter Type Description
filePath java.lang.String A file path.
options AppointmentLoadOptions Represents appointment load optionsAppointmentLoadOptions.

Returns: Appointment - A read Appointment.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

requestApointment()

public final AlternateView requestApointment()

Requests the apointment.

Returns: AlternateView - AlternateViewAlternateView that represents the format to view an email message.

requestApointment(int seqId)

public final AlternateView requestApointment(int seqId)

Requests the apointment.

Parameters:

Parameter Type Description
seqId int The sequence id.

Returns: AlternateView - AlternateViewAlternateView that represents the format to view an email message.

resetTimeZone()

public final void resetTimeZone()

Set local time zone

save(OutputStream stream)

public final void save(OutputStream stream)

Saves appointment to the file with iCalendar format using te default save options

Parameters:

Parameter Type Description
stream java.io.OutputStream A stream to save to

save(OutputStream stream, AppointmentSaveOptions saveOptions)

public final void save(OutputStream stream, AppointmentSaveOptions saveOptions)

Saves appointment to the stream with specified save options

Parameters:

Parameter Type Description
stream java.io.OutputStream A stream to save to
saveOptions AppointmentSaveOptions A save options

save(OutputStream stream, int saveFormat)

public final void save(OutputStream stream, int saveFormat)

Saves appointment to the stream with specified format using te default save options

Parameters:

Parameter Type Description
stream java.io.OutputStream A stream to save to
saveFormat int A save format

save(String filePath)

public final void save(String filePath)

Saves appointment to the file with iCalendar format using te default save options

Parameters:

Parameter Type Description
filePath java.lang.String A file path

save(String filePath, AppointmentSaveOptions saveOptions)

public final void save(String filePath, AppointmentSaveOptions saveOptions)

Saves appointment to the file with specified save options

Parameters:

Parameter Type Description
filePath java.lang.String A file path
saveOptions AppointmentSaveOptions A save options

save(String filePath, int saveFormat)

public final void save(String filePath, int saveFormat)

Saves appointment to the file with specified format using te default save options

Parameters:

Parameter Type Description
filePath java.lang.String A file path
saveFormat int A save format

setAppointmentClass(int value)

public final void setAppointmentClass(int value)

Specifies the access classification for the appointment.

Parameters:

Parameter Type Description
value int

setAttendees(MailAddressCollection value)

public final void setAttendees(MailAddressCollection value)

Gets or sets the attendees.

Parameters:

Parameter Type Description
value MailAddressCollection

setCreatedDate(Date value)

public final void setCreatedDate(Date value)

Gets or sets the date and time that calendar information was created.

Value: The java.util.Date that represents creation date and time.

Parameters:

Parameter Type Description
value java.util.Date

setDateTimeStamp(Date value)

public final void setDateTimeStamp(Date value)

Gets or sets date/time that the instance of the iCalendar object was created..

Parameters:

Parameter Type Description
value java.util.Date

setDescription(String value)

public final void setDescription(String value)

Gets or sets the description.

Parameters:

Parameter Type Description
value java.lang.String

setDescriptionHtml(boolean value)

public final void setDescriptionHtml(boolean value)

Gets or sets value which indicates if description is in HTML format

Parameters:

Parameter Type Description
value boolean

setEndDate(Date value)

public final void setEndDate(Date value)

Gets or sets the end date.

Parameters:

Parameter Type Description
value java.util.Date

setEndTimeZone(String value)

public final void setEndTimeZone(String value)

End time zone

Parameters:

Parameter Type Description
value java.lang.String

setFlags(int value)

public final void setFlags(int value)

Gets or sets appointment flags.

Parameters:

Parameter Type Description
value int

setHtmlDescription(String value)

public final void setHtmlDescription(String value)

Gets or sets html representation of description.

Parameters:

Parameter Type Description
value java.lang.String

setLastModifiedDate(Date value)

public final void setLastModifiedDate(Date value)

Gets or sets the date and time that calendar information was last revised.

Value: The java.util.Date that represents modification date and time.

Parameters:

Parameter Type Description
value java.util.Date

setLocation(String value)

public final void setLocation(String value)

Gets or sets the location.

Parameters:

Parameter Type Description
value java.lang.String

setMethodType(int value)

public final void setMethodType(int value)

Gets or sets the iCalendar object method type associated with the calendar object.

Parameters:

Parameter Type Description
value int

setMicrosoftBusyStatus(int value)

public final void setMicrosoftBusyStatus(int value)

Specifies the BUSY status of an appointment.

Parameters:

Parameter Type Description
value int

setMicrosoftImportance(int value)

public final void setMicrosoftImportance(int value)

Specifies the importance of an appointment.

Parameters:

Parameter Type Description
value int

setMicrosoftIntendedStatus(int value)

public final void setMicrosoftIntendedStatus(int value)

Specifies the INTENDED status of an appointment.

Parameters:

Parameter Type Description
value int

setOrganizer(MailAddress value)

public final void setOrganizer(MailAddress value)

Gets or sets the organizer.

Parameters:

Parameter Type Description
value MailAddress

setRecurrence(RecurrencePattern value)

public final void setRecurrence(RecurrencePattern value)

Gets or sets the recurrence pattern.

Value: The recurrence pattern.

Parameters:

Parameter Type Description
value RecurrencePattern

setStartDate(Date value)

public final void setStartDate(Date value)

Gets or sets the start date.

Parameters:

Parameter Type Description
value java.util.Date

setStartTimeZone(String value)

public final void setStartTimeZone(String value)

Start time zone

Parameters:

Parameter Type Description
value java.lang.String

setStatus(int value)

public final void setStatus(int value)

Gets or sets the overall status or confirmation for the object.

Parameters:

Parameter Type Description
value int

setSummary(String value)

public final void setSummary(String value)

Gets or sets the summary.

Parameters:

Parameter Type Description
value java.lang.String

setTimeZone(String tzName)

public final void setTimeZone(String tzName)

Set time zone

Parameters:

Parameter Type Description
tzName java.lang.String The time zone name, for sample “America/New_York”

setTransparency(int value)

public final void setTransparency(int value)

Specifies whether or not this appointment is intended to be visible in availability searches.

Parameters:

Parameter Type Description
value int

setUniqueId(String value)

public final void setUniqueId(String value)

Gets or sets a string value that contains the GUID for the calendar item. In MS Exchange this is PidLidGlobalObjectId mapi property.

Value: The unique id.

Parameters:

Parameter Type Description
value java.lang.String

toString()

public String toString()

Returns: java.lang.String

updateAppointment()

public final AlternateView updateAppointment()

Updates the appointment.

Returns: AlternateView - AlternateViewAlternateView that represents the format to view an email message.

updateAppointment(int seqId)

public final AlternateView updateAppointment(int seqId)

Updates the appointment.

Parameters:

Parameter Type Description
seqId int The sequence id.

Returns: AlternateView - AlternateViewAlternateView that represents the format to view an email message.

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int