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,
CalendarRecurrencePattern recurrencePattern)
Deprecated.
|
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,
CalendarRecurrencePattern recurrencePattern)
Deprecated.
|
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 sequenceId)
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.
|
CalendarRecurrencePattern |
getRecurrencePattern()
Deprecated.
|
AppointmentReminderCollection |
getReminders()
Contains collection of AppointmentReminder
Aspose.Email.Mail.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 the unique id.
|
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 applyLocalTZ)
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 sequenceId)
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 |
setRecurrencePattern(CalendarRecurrencePattern value)
Deprecated.
|
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 the unique id.
|
AlternateView |
updateAppointment()
Updates the appointment.
|
AlternateView |
updateAppointment(int sequenceId)
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.@Deprecated public Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, CalendarRecurrencePattern 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, 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.@Deprecated public Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, String uid, CalendarRecurrencePattern 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 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 void setLocation(String value)
Gets or sets the location.
value
- a String
object.public int getMicrosoftBusyStatus()
Specifies the BUSY status of an appointment.
public void setMicrosoftBusyStatus(int value)
Specifies the BUSY status of an appointment.
value
- a int.public int getMicrosoftIntendedStatus()
Specifies the INTENDED status of an appointment.
public void setMicrosoftIntendedStatus(int value)
Specifies the INTENDED status of an appointment.
value
- a int.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.
value
- a int.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.
value
- a int.public void setSummary(String value)
Gets or sets the summary.
value
- a String
object.public String getDescription()
Gets or sets the description.
String
object.public void setDescription(String value)
Gets or sets the description.
value
- a String
object.public Date getStartDate()
Gets or sets the start date.
public void setStartDate(Date value)
Gets or sets the start date.
value
- a Date
object.public Date getEndDate()
Gets or sets the end date.
public void setEndDate(Date value)
Gets or sets the end date.
value
- the end date.public MailAddressCollection getAttendees()
Gets or sets the attendees.
MailAddressCollection
object.public void setAttendees(MailAddressCollection value)
Gets or sets the attendees.
value
- a MailAddressCollection
object.public MailAddressCollection getOptionalAttendees()
Gets the optional attendees.
Value: The address collection of optional attendees.MailAddressCollection
object.public MailAddress getOrganizer()
Gets or sets the organizer.
MailAddress
object.public void setOrganizer(MailAddress value)
Gets or sets the organizer.
value
- a MailAddress
object.@Deprecated public CalendarRecurrencePattern getRecurrencePattern()
Gets or sets the recurrence pattern.
Value: The recurrence pattern.CalendarRecurrencePattern
object.@Deprecated public void setRecurrencePattern(CalendarRecurrencePattern value)
Gets or sets the recurrence pattern.
Value: The recurrence pattern.value
- a CalendarRecurrencePattern
object.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 getUniqueId()
Gets or sets the unique id.
Value: The unique id.String
object.public void setUniqueId(String value)
Gets or sets the unique id.
Value: The unique id.value
- a String
object.public String getSequenceId()
Gets the sequence id.
Value: The sequence id.String
object.public int getFlags()
Gets or sets appointment flags.
public void setFlags(int value)
Gets or sets appointment flags.
value
- a int.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.
value
- a int.public AppointmentReminderCollection getReminders()
Contains collection of AppointmentReminder Aspose.Email.Mail.AppointmentReminder
objects.
AppointmentReminderCollection
object.public AttachmentCollection getAttachments()
Gets the collection of attachments of appointment.
AttachmentCollection
object.public void setStartTimeZone(String value)
Start time zone
value
- a String
object.public void setEndTimeZone(String value)
End time zone
value
- a String
object.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.
Aspose.Email.Mail.AlternateView
that represents the format to view an email message.public AlternateView requestApointment(int sequenceId)
Requests the apointment.
sequenceId
- The sequence id.Aspose.Email.Mail.AlternateView
that represents the format to view an email message.public AlternateView cancelAppointment()
Cancels the appointment.
Aspose.Email.Mail.AlternateView
that represents the format to view an email message.public AlternateView cancelAppointment(int sequenceId)
Cancels the appointment.
sequenceId
- The sequence id.Aspose.Email.Mail.AlternateView
that represents the format to view an email message.public AlternateView updateAppointment()
Updates the appointment.
Aspose.Email.Mail.AlternateView
that represents the format to view an email message.public AlternateView updateAppointment(int sequenceId)
Updates the appointment.
sequenceId
- The sequence id.Aspose.Email.Mail.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 applyLocalTZ)
Loads Appointment
from the stream
stream
- A stream to load fromapplyLocalTZ
- 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 readingCopyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.