public class Appointment extends Object
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());
Constructor and 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,
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)
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. |
Modifier and Type | Method and Description |
---|---|
AlternateView |
cancelAppointment()
Cancels the appointment.
|
AlternateView |
cancelAppointment(int seqId)
Cancels the appointment.
|
String |
getAppointmentHtml()
Gets the calendar HTML.
|
String |
getAppointmentText()
Gets the calendar text.
|
String |
getAppointmentText(AppointmentFormattingOptions formattingOptions)
Gets the calendar text.
|
AttachmentCollection |
getAttachments()
Gets the collection of attachments of appointment.
|
MailAddressCollection |
getAttendees()
Gets or sets the attendees.
|
Date |
getCreatedDate()
Gets or sets the date and time that calendar information was created.
|
String |
getDescription()
Gets or sets the description.
|
Date |
getEndDate()
Gets or sets the end date.
|
String |
getEndTimeZone()
End time zone
|
int |
getFlags()
Gets or sets appointment flags.
|
Date |
getLastModifiedDate()
Gets or sets the date and time that calendar information was last revised.
|
String |
getLocation()
Gets or sets the location.
|
int |
getMethodType()
Gets or sets the iCalendar object method type associated
with the calendar object.
|
int |
getMicrosoftBusyStatus()
Specifies the BUSY status of an appointment.
|
int |
getMicrosoftIntendedStatus()
Specifies the INTENDED status of an appointment.
|
MailAddressCollection |
getOptionalAttendees()
Gets the optional attendees.
|
MailAddress |
getOrganizer()
Gets or sets the organizer.
|
RecurrencePattern |
getRecurrence()
Gets or sets the recurrence pattern.
|
AppointmentReminderCollection |
getReminders()
Contains collection of AppointmentReminder
AppointmentReminder objects. |
String |
getSequenceId()
Gets the sequence id.
|
Date |
getStartDate()
Gets or sets the start date.
|
String |
getStartTimeZone()
Start time zone
|
int |
getStatus()
Gets or sets the overall status or confirmation for the object.
|
String |
getSummary()
Gets or sets the summary.
|
int |
getTransparency()
Specifies whether or not this appointment is intended to be visible in availability searches.
|
String |
getUniqueId()
Gets or sets a string value that contains the GUID for the calendar item.
|
boolean |
isDescriptionHtml()
Gets or sets value which indicates if description is in HTML format
|
static Appointment |
load(InputStream stream)
Loads
Appointment from the stream |
static Appointment |
load(InputStream stream,
AppointmentLoadOptions options)
Loads
Appointment from the stream |
static Appointment |
load(InputStream stream,
boolean applyLocalTimeZone)
Loads
Appointment from the stream |
static Appointment |
load(String filePath)
Loads
Appointment from the file. |
static Appointment |
load(String filePath,
AppointmentLoadOptions options)
Loads
Appointment from the file. |
AlternateView |
requestApointment()
Requests the apointment.
|
AlternateView |
requestApointment(int seqId)
Requests the apointment.
|
void |
resetTimeZone()
Set local time zone
|
void |
save(OutputStream stream)
Saves appointment to the file with iCalendar format using te default save options
|
void |
save(OutputStream stream,
AppointmentSaveOptions saveOptions)
Saves appointment to the stream with specified save options
|
void |
save(OutputStream stream,
int saveFormat)
Saves appointment to the stream with specified format using te default save options
|
void |
save(String filePath)
Saves appointment to the file with iCalendar format using te default save options
|
void |
save(String filePath,
AppointmentSaveOptions saveOptions)
Saves appointment to the file with specified save options
|
void |
save(String filePath,
int saveFormat)
Saves appointment to the file with specified format using te default save options
|
void |
setAttendees(MailAddressCollection value)
Gets or sets the attendees.
|
void |
setCreatedDate(Date value)
Gets or sets the date and time that calendar information was created.
|
void |
setDescription(String value)
Gets or sets the description.
|
void |
setDescriptionHtml(boolean value)
Gets or sets value which indicates if description is in HTML format
|
void |
setEndDate(Date value)
Gets or sets the end date.
|
void |
setEndTimeZone(String value)
End time zone
|
void |
setFlags(int value)
Gets or sets appointment flags.
|
void |
setLastModifiedDate(Date value)
Gets or sets the date and time that calendar information was last revised.
|
void |
setLocation(String value)
Gets or sets the location.
|
void |
setMethodType(int value)
Gets or sets the iCalendar object method type associated
with the calendar object.
|
void |
setMicrosoftBusyStatus(int value)
Specifies the BUSY status of an appointment.
|
void |
setMicrosoftIntendedStatus(int value)
Specifies the INTENDED status of an appointment.
|
void |
setOrganizer(MailAddress value)
Gets or sets the organizer.
|
void |
setRecurrence(RecurrencePattern value)
Gets or sets the recurrence pattern.
|
void |
setStartDate(Date value)
Gets or sets the start date.
|
void |
setStartTimeZone(String value)
Start time zone
|
void |
setStatus(int value)
Gets or sets the overall status or confirmation for the object.
|
void |
setSummary(String value)
Gets or sets the summary.
|
void |
setTimeZone(String tzName)
Set time zone
|
void |
setTransparency(int value)
Specifies whether or not this appointment is intended to be visible in availability searches.
|
void |
setUniqueId(String value)
Gets or sets a string value that contains the GUID for the calendar item.
|
AlternateView |
updateAppointment()
Updates the appointment.
|
AlternateView |
updateAppointment(int seqId)
Updates the appointment.
|
public Appointment(String location, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)
Initialize a new instance of the Appointment
class.
location
- The location of the calendar event.startDate
- The start time of the calendar event.endDate
- The end time of the calendar event.organizer
- The organizer of the calendar event.attendees
- The attendees of th calendar event.public Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)
Initialize a new instance of the Appointment
class.
location
- The location of the calendar event.summary
- The summary of the calendar event.description
- The description of the calendar event.startDate
- The start time of the calendar event.endDate
- The end time of the calendar event.organizer
- The organizer of the calendar event.attendees
- The attendees of th calendar event.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.
location
- The location of the calendar event.summary
- The summary of the calendar event.description
- The description of the calendar event.startDate
- The start time of the calendar event.endDate
- The end time of the calendar event.organizer
- The organizer of the calendar event.attendees
- The attendees of th calendar event.uid
- The unique identifier of th calendar event.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.
location
- The location of the calendar event.summary
- The summary of the calendar event.description
- The description of the calendar event.startDate
- The start time of the calendar event.endDate
- The end time of the calendar event.organizer
- The organizer of the calendar event.attendees
- The attendees of th calendar event.recurrencePattern
- The recurrence pattern.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.
location
- The location of the calendar event.summary
- The summary of the calendar event.description
- The description of the calendar event.startDate
- The start time of the calendar event.endDate
- The end time of the calendar event.organizer
- The organizer of the calendar event.attendees
- The attendees of th calendar event.uid
- The unique identifier of th calendar event.recurrencePattern
- The recurrence pattern.public final String getLocation()
Gets or sets the location.
public final void setLocation(String value)
Gets or sets the location.
public final int getMicrosoftBusyStatus()
Specifies the BUSY status of an appointment.
public final void setMicrosoftBusyStatus(int value)
Specifies the BUSY status of an appointment.
public final int getMicrosoftIntendedStatus()
Specifies the INTENDED status of an appointment.
public final void setMicrosoftIntendedStatus(int value)
Specifies the INTENDED status of an appointment.
public final int getTransparency()
Specifies whether or not this appointment is intended to be visible in availability searches.
public final void setTransparency(int value)
Specifies whether or not this appointment is intended to be visible in availability searches.
public final int getStatus()
Gets or sets the overall status or confirmation for the object.
public final void setStatus(int value)
Gets or sets the overall status or confirmation for the object.
public final String getSummary()
Gets or sets the summary.
public final void setSummary(String value)
Gets or sets the summary.
public final String getDescription()
Gets or sets the description.
public final void setDescription(String value)
Gets or sets the description.
public final boolean isDescriptionHtml()
Gets or sets value which indicates if description is in HTML format
public final void setDescriptionHtml(boolean value)
Gets or sets value which indicates if description is in HTML format
public final Date getStartDate()
Gets or sets the start date.
public final void setStartDate(Date value)
Gets or sets the start date.
public final Date getEndDate()
Gets or sets the end date.
public final void setEndDate(Date value)
Gets or sets the end date.
public final Date getCreatedDate()
Gets or sets the date and time that calendar information was created.
Value: TheDate
that represents creation date and time.public final void setCreatedDate(Date value)
Gets or sets the date and time that calendar information was created.
Value: TheDate
that represents creation date and time.public final Date getLastModifiedDate()
Gets or sets the date and time that calendar information was last revised.
Value: TheDate
that represents modification date and time.public final void setLastModifiedDate(Date value)
Gets or sets the date and time that calendar information was last revised.
Value: TheDate
that represents modification date and time.public final MailAddressCollection getAttendees()
Gets or sets the attendees.
public final void setAttendees(MailAddressCollection value)
Gets or sets the attendees.
public final MailAddressCollection getOptionalAttendees()
Gets the optional attendees.
Value: The address collection of optional attendees.public final MailAddress getOrganizer()
Gets or sets the organizer.
public final void setOrganizer(MailAddress value)
Gets or sets the organizer.
public final RecurrencePattern getRecurrence()
Gets or sets the recurrence pattern.
Value: The recurrence pattern.public final void setRecurrence(RecurrencePattern value)
Gets or sets the recurrence pattern.
Value: The recurrence pattern.public final String getSequenceId()
Gets the sequence id.
Value: The sequence id.public final int getFlags()
Gets or sets appointment flags.
public final void setFlags(int value)
Gets or sets appointment flags.
public final int getMethodType()
Gets or sets the iCalendar object method type associated with the calendar object.
public final void setMethodType(int value)
Gets or sets the iCalendar object method type associated with the calendar object.
public final AppointmentReminderCollection getReminders()
Contains collection of AppointmentReminder AppointmentReminder
objects.
public final AttachmentCollection getAttachments()
Gets the collection of attachments of appointment.
public final String getStartTimeZone()
Start time zone
public final void setStartTimeZone(String value)
Start time zone
public final String getEndTimeZone()
End time zone
public final void setEndTimeZone(String value)
End time zone
public final void resetTimeZone()
Set local time zone
public final void setTimeZone(String tzName)
Set time zone
tzName
- The time zone name, for sample "America/New_York"public final AlternateView requestApointment()
Requests the apointment.
AlternateView
that represents the format to view an email message.public final AlternateView requestApointment(int seqId)
Requests the apointment.
seqId
- The sequence id.AlternateView
that represents the format to view an email message.public final AlternateView cancelAppointment()
Cancels the appointment.
AlternateView
that represents the format to view an email message.public final AlternateView cancelAppointment(int seqId)
Cancels the appointment.
seqId
- The sequence id.AlternateView
that represents the format to view an email message.public final AlternateView updateAppointment()
Updates the appointment.
AlternateView
that represents the format to view an email message.public final AlternateView updateAppointment(int seqId)
Updates the appointment.
seqId
- The sequence id.AlternateView
that represents the format to view an email message.public final String getAppointmentHtml()
Gets the calendar HTML.
public final String getAppointmentText()
Gets the calendar text.
public final String getAppointmentText(AppointmentFormattingOptions formattingOptions)
Gets the calendar text.
formattingOptions
- AppointmentFormattingOptions
that represents appointment formatting options.com.aspose.ms.System.ArgumentNullException
- throws when formattingOptions
is null
.public final void save(String filePath)
Saves appointment to the file with iCalendar format using te default save options
filePath
- A file pathArgumentOutOfRangeException
- filePath
is null
or empty
public final void save(String filePath, int saveFormat)
Saves appointment to the file with specified format using te default save options
filePath
- A file pathsaveFormat
- A save formatArgumentOutOfRangeException
- filePath
is null
or empty
com.aspose.ms.System.NotSupportedException
- The specified save options are not supportedpublic final void save(String filePath, AppointmentSaveOptions saveOptions)
Saves appointment to the file with specified save options
filePath
- A file pathsaveOptions
- A save optionsArgumentOutOfRangeException
- filePath
is null
or empty
com.aspose.ms.System.ArgumentNullException
- saveOptions
is null
com.aspose.ms.System.NotSupportedException
- The specified save options are not supportedpublic final void save(OutputStream stream)
Saves appointment to the file with iCalendar format using te default save options
stream
- A stream to save tocom.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream does not support writingpublic final void save(OutputStream stream, int saveFormat)
Saves appointment to the stream with specified format using te default save options
stream
- A stream to save tosaveFormat
- A save formatcom.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- The specified save options are not supportedcom.aspose.ms.System.NotSupportedException
- stream does not support writingpublic final void save(OutputStream stream, AppointmentSaveOptions saveOptions)
Saves appointment to the stream with specified save options
stream
- A stream to save tosaveOptions
- A save optionscom.aspose.ms.System.ArgumentNullException
- saveOptions
or stream
is null
com.aspose.ms.System.NotSupportedException
- the specified save options are not supportedcom.aspose.ms.System.NotSupportedException
- stream does not support writingpublic static Appointment load(String filePath)
Loads Appointment
from the file.
Supported file formats: iCalendar
filePath
- A file pathAppointment
com.aspose.ms.System.ArgumentException
- filePath
is null
or empty
public static Appointment load(String filePath, AppointmentLoadOptions options)
Loads Appointment
from the file.
Supported file formats: iCalendar
filePath
- A file path.options
- Represents appointment load optionsAppointmentLoadOptions
.Appointment
.public static Appointment load(InputStream stream)
Loads Appointment
from the stream
stream
- A stream to load fromAppointment
com.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support readingpublic static Appointment load(InputStream stream, boolean applyLocalTimeZone)
Loads Appointment
from the stream
stream
- A stream to load fromapplyLocalTimeZone
- Convert time to local timezoneAppointment
com.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support readingpublic static Appointment load(InputStream stream, AppointmentLoadOptions options)
Loads Appointment
from the stream
stream
- A stream to load fromoptions
- Represents appointment load optionsAppointment
com.aspose.ms.System.ArgumentNullException
- stream
is null
com.aspose.ms.System.NotSupportedException
- stream
does not support readingpublic 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.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.