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.
|
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.
|
String |
getLocation()
Gets or sets the location.
|
int |
getMethod()
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.
|
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 |
setDescription(String value)
Gets or sets the description.
|
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 |
setLocation(String value)
Gets or sets the location.
|
void |
setMethod(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 String getLocation()
Gets or sets the location.
public void setLocation(String value)
Gets or sets the location.
public int getMicrosoftBusyStatus()
Specifies the BUSY status of an appointment.
public void setMicrosoftBusyStatus(int value)
Specifies the BUSY status of an appointment.
public int getMicrosoftIntendedStatus()
Specifies the INTENDED status of an appointment.
public void setMicrosoftIntendedStatus(int value)
Specifies the INTENDED status of an appointment.
public int getTransparency()
Specifies whether or not this appointment is intended to be visible in availability searches.
public void setTransparency(int value)
Specifies whether or not this appointment is intended to be visible in availability searches.
public int getStatus()
Gets or sets the overall status or confirmation for the object.
public void setStatus(int value)
Gets or sets the overall status or confirmation for the object.
public String getSummary()
Gets or sets the summary.
public void setSummary(String value)
Gets or sets the summary.
public String getDescription()
Gets or sets the description.
public void setDescription(String value)
Gets or sets the description.
public Date getStartDate()
Gets or sets the start date.
public void setStartDate(Date value)
Gets or sets the start date.
public Date getEndDate()
Gets or sets the end date.
public void setEndDate(Date value)
Gets or sets the end date.
public MailAddressCollection getAttendees()
Gets or sets the attendees.
public void setAttendees(MailAddressCollection value)
Gets or sets the attendees.
public MailAddressCollection getOptionalAttendees()
Gets the optional attendees.
Value: The address collection of optional attendees.public MailAddress getOrganizer()
Gets or sets the organizer.
public void setOrganizer(MailAddress value)
Gets or sets the organizer.
public RecurrencePattern getRecurrence()
Gets or sets the recurrence pattern.
Value: The recurrence pattern.public void setRecurrence(RecurrencePattern value)
Gets or sets the recurrence pattern.
Value: The recurrence pattern.public String getSequenceId()
Gets the sequence id.
Value: The sequence id.public int getFlags()
Gets or sets appointment flags.
public void setFlags(int value)
Gets or sets appointment flags.
public int getMethod()
Gets or sets the iCalendar object method type associated with the calendar object.
public void setMethod(int value)
Gets or sets the iCalendar object method type associated with the calendar object.
public AppointmentReminderCollection getReminders()
Contains collection of AppointmentReminder AppointmentReminder
objects.
public AttachmentCollection getAttachments()
Gets the collection of attachments of appointment.
public String getStartTimeZone()
Start time zone
public void setStartTimeZone(String value)
Start time zone
public String getEndTimeZone()
End time zone
public void setEndTimeZone(String value)
End time zone
public void resetTimeZone()
Set local time zone
public void setTimeZone(String tzName)
Set time zone
tzName
- The time zone name, for sample "America/New_York"public AlternateView requestApointment()
Requests the apointment.
AlternateView
that represents the format to view an email message.public AlternateView requestApointment(int seqId)
Requests the apointment.
seqId
- The sequence id.AlternateView
that represents the format to view an email message.public AlternateView cancelAppointment()
Cancels the appointment.
AlternateView
that represents the format to view an email message.public AlternateView cancelAppointment(int seqId)
Cancels the appointment.
seqId
- The sequence id.AlternateView
that represents the format to view an email message.public AlternateView updateAppointment()
Updates the appointment.
AlternateView
that represents the format to view an email message.public AlternateView updateAppointment(int seqId)
Updates the appointment.
seqId
- The sequence id.AlternateView
that represents the format to view an email message.public String getAppointmentHtml()
Gets the calendar HTML.
public String getAppointmentText()
Gets the calendar text.
public 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 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 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 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 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 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 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 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 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.Copyright (c) 2008-2017 Aspose Pty Ltd. All Rights Reserved.