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

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.

getLocation()

public final String getLocation()

Gets or sets the location.

Returns: java.lang.String

setLocation(String value)

public final void setLocation(String value)

Gets or sets the location.

Parameters:

Parameter Type Description
value java.lang.String

getAppointmentClass()

public final int getAppointmentClass()

Specifies the access classification for the appointment.

Returns: int

setAppointmentClass(int value)

public final void setAppointmentClass(int value)

Specifies the access classification for the appointment.

Parameters:

Parameter Type Description
value int

getMicrosoftImportance()

public final int getMicrosoftImportance()

Specifies the importance of an appointment.

Returns: int

setMicrosoftImportance(int value)

public final void setMicrosoftImportance(int value)

Specifies the importance of an appointment.

Parameters:

Parameter Type Description
value int

getMicrosoftBusyStatus()

public final int getMicrosoftBusyStatus()

Specifies the BUSY status of an appointment.

Returns: int

setMicrosoftBusyStatus(int value)

public final void setMicrosoftBusyStatus(int value)

Specifies the BUSY status of an appointment.

Parameters:

Parameter Type Description
value int

getMicrosoftIntendedStatus()

public final int getMicrosoftIntendedStatus()

Specifies the INTENDED status of an appointment.

Returns: int

setMicrosoftIntendedStatus(int value)

public final void setMicrosoftIntendedStatus(int value)

Specifies the INTENDED status of an appointment.

Parameters:

Parameter Type Description
value int

getTransparency()

public final int getTransparency()

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

Returns: int

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

getStatus()

public final int getStatus()

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

Returns: int

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

getSummary()

public final String getSummary()

Gets or sets the summary.

Returns: java.lang.String

setSummary(String value)

public final void setSummary(String value)

Gets or sets the summary.

Parameters:

Parameter Type Description
value java.lang.String

getDescription()

public final String getDescription()

Gets or sets the description.

Returns: java.lang.String

setDescription(String value)

public final void setDescription(String value)

Gets or sets the description.

Parameters:

Parameter Type Description
value java.lang.String

getHtmlDescription()

public final String getHtmlDescription()

Gets or sets html representation of description.

Returns: java.lang.String

setHtmlDescription(String value)

public final void setHtmlDescription(String value)

Gets or sets html representation of description.

Parameters:

Parameter Type Description
value java.lang.String

isDescriptionHtml()

public final boolean isDescriptionHtml()

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

Returns: boolean

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

getStartDate()

public final Date getStartDate()

Gets or sets the start date.

Returns: java.util.Date

setStartDate(Date value)

public final void setStartDate(Date value)

Gets or sets the start date.

Parameters:

Parameter Type Description
value java.util.Date

getEndDate()

public final Date getEndDate()

Gets or sets the end date.

Returns: java.util.Date

setEndDate(Date value)

public final void setEndDate(Date value)

Gets or sets the end date.

Parameters:

Parameter Type Description
value 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

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

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

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

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

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

getAttendees()

public final MailAddressCollection getAttendees()

Gets or sets the attendees.

Returns: MailAddressCollection

setAttendees(MailAddressCollection value)

public final void setAttendees(MailAddressCollection value)

Gets or sets the attendees.

Parameters:

Parameter Type Description
value MailAddressCollection

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

setOrganizer(MailAddress value)

public final void setOrganizer(MailAddress value)

Gets or sets the organizer.

Parameters:

Parameter Type Description
value MailAddress

getRecurrence()

public final RecurrencePattern getRecurrence()

Gets or sets the recurrence pattern.

Value: The recurrence pattern.

Returns: RecurrencePattern

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

getSequenceId()

public final String getSequenceId()

Gets the sequence id.

Value: The sequence id.

Returns: java.lang.String

getFlags()

public final int getFlags()

Gets or sets appointment flags.

Returns: int

setFlags(int value)

public final void setFlags(int value)

Gets or sets appointment flags.

Parameters:

Parameter Type Description
value int

getMethodType()

public final int getMethodType()

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

Returns: int

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

getReminders()

public final AppointmentReminderCollection getReminders()

Contains collection of AppointmentReminder AppointmentReminder objects.

Returns: AppointmentReminderCollection

getAttachments()

public final AttachmentCollection getAttachments()

Gets the collection of attachments of appointment.

Returns: AttachmentCollection

getStartTimeZone()

public final String getStartTimeZone()

Start time zone

Returns: java.lang.String

setStartTimeZone(String value)

public final void setStartTimeZone(String value)

Start time zone

Parameters:

Parameter Type Description
value java.lang.String

getEndTimeZone()

public final String getEndTimeZone()

End time zone

Returns: java.lang.String

setEndTimeZone(String value)

public final void setEndTimeZone(String value)

End time zone

Parameters:

Parameter Type Description
value java.lang.String

resetTimeZone()

public final void resetTimeZone()

Set local time zone

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”

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.

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.

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.

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.

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, 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

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(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, 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(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

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.

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

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

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