com.aspose.email
Class Appointment

java.lang.Object
  extended by com.aspose.email.Appointment

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 Summary
Appointment(String location, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)
           
Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees)
           
Appointment(String location, String summary, String description, Date startDate, Date endDate, MailAddress organizer, MailAddressCollection attendees, CalendarRecurrencePattern recurrencePattern)
           
 
Method Summary
 AlternateView cancelAppointment()
           Cancels the appointment.
 AlternateView cancelAppointment(int sequenceId)
           Cancels the appointment.
 String getAppointmentHtml()
           Gets the calendar HTML.
 String getAppointmentText()
           Gets the calendar text.
 MailAddressCollection getAttendees()
           Gets or sets the attendees.
 String getDescription()
           Gets or sets the description.
 Date getEndDate()
           
 int getFlags()
           Gets or sets appointment flags.
 String getLocation()
           Gets or sets the location.
 MailAddressCollection getOptionalAttendees()
           Gets the optional attendees.
 MailAddress getOrganizer()
           Gets or sets the organizer.
 CalendarRecurrencePattern getRecurrencePattern()
           Gets or sets the recurrence pattern.
 String getSequenceId()
           Gets the sequence id.
 Date getStartDate()
           
 String getSummary()
           Gets or sets the summary.
 String getUniqueId()
           Gets or sets the unique id.
static Appointment load(InputStream stream)
           
static Appointment load(String filePath)
           Loads Appointment from the file.
 AlternateView requestApointment()
           Requests the apointment.
 AlternateView requestApointment(int sequenceId)
           Requests the apointment.
 void save(OutputStream stream)
           
 void save(OutputStream stream, AppointmentSaveOptions saveOptions)
           
 void save(OutputStream stream, int saveFormat)
           
 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)
           
 void setDescription(String value)
           
 void setEndDate(Date value)
           
 void setFlags(int value)
           
 void setLocation(String value)
           
 void setOrganizer(MailAddress value)
           
 void setRecurrencePattern(CalendarRecurrencePattern value)
           
 void setStartDate(Date value)
           
 void setSummary(String value)
           
 void setTimeZone(String tzName)
           Set time zone
 void setUniqueId(String value)
           
 AlternateView updateAppointment()
           Updates the appointment.
 AlternateView updateAppointment(int sequenceId)
           Updates the appointment.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Appointment

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

Appointment

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

Appointment

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

getLocation

public String getLocation()

Gets or sets the location.


setLocation

public void setLocation(String value)

getSummary

public String getSummary()

Gets or sets the summary.


setSummary

public void setSummary(String value)

getDescription

public String getDescription()

Gets or sets the description.


setDescription

public void setDescription(String value)

getStartDate

public Date getStartDate()

setStartDate

public void setStartDate(Date value)

getEndDate

public Date getEndDate()

setEndDate

public void setEndDate(Date value)

getAttendees

public MailAddressCollection getAttendees()

Gets or sets the attendees.


setAttendees

public void setAttendees(MailAddressCollection value)

getOptionalAttendees

public MailAddressCollection getOptionalAttendees()

Gets the optional attendees.

Value: The address collection of optional attendees.


getOrganizer

public MailAddress getOrganizer()

Gets or sets the organizer.


setOrganizer

public void setOrganizer(MailAddress value)

getRecurrencePattern

public CalendarRecurrencePattern getRecurrencePattern()

Gets or sets the recurrence pattern.

Value: The recurrence pattern.


setRecurrencePattern

public void setRecurrencePattern(CalendarRecurrencePattern value)

getUniqueId

public String getUniqueId()

Gets or sets the unique id.

Value: The unique id.


setUniqueId

public void setUniqueId(String value)

getSequenceId

public String getSequenceId()

Gets the sequence id.

Value: The sequence id.


getFlags

public int getFlags()

Gets or sets appointment flags.


setFlags

public void setFlags(int value)

setTimeZone

public void setTimeZone(String tzName)

Set time zone

Parameters:
tzName - The time zone name, for sample "America/New_York"

requestApointment

public AlternateView requestApointment()

Requests the apointment.

Returns:

requestApointment

public AlternateView requestApointment(int sequenceId)

Requests the apointment.

Parameters:
sequenceId - The sequence id.
Returns:

cancelAppointment

public AlternateView cancelAppointment()

Cancels the appointment.

Returns:

cancelAppointment

public AlternateView cancelAppointment(int sequenceId)

Cancels the appointment.

Parameters:
sequenceId - The sequence id.
Returns:

updateAppointment

public AlternateView updateAppointment()

Updates the appointment.

Returns:

updateAppointment

public AlternateView updateAppointment(int sequenceId)

Updates the appointment.

Parameters:
sequenceId - The sequence id.
Returns:

getAppointmentHtml

public String getAppointmentHtml()

Gets the calendar HTML.

Returns:

getAppointmentText

public String getAppointmentText()

Gets the calendar text.

Returns:

save

public void save(String filePath)

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

Parameters:
filePath - A file path
Throws:
com.aspose.ms.System.IllegalArgumentException - filePath is null or empty

save

public void save(String filePath,
                 int saveFormat)

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

Parameters:
filePath - A file path
saveFormat - A save format
Throws:
com.aspose.ms.System.IllegalArgumentException - filePath is null or empty
UnsupportedOperationException - The specified save options are not supported

save

public void save(String filePath,
                 AppointmentSaveOptions saveOptions)

Saves appointment to the file with specified save options

Parameters:
filePath - A file path
saveOptions - A save options
Throws:
com.aspose.ms.System.IllegalArgumentException - filePath is null or empty
com.aspose.ms.System.IllegalArgumentException - saveOptions is null
UnsupportedOperationException - The specified save options are not supported

save

public void save(OutputStream stream)

save

public void save(OutputStream stream,
                 int saveFormat)

save

public void save(OutputStream stream,
                 AppointmentSaveOptions saveOptions)

load

public static Appointment load(String filePath)

Loads Appointment from the file. Supported file formats: iCalendar

Parameters:
filePath - A file path
Returns:
A read Appointment
Throws:
com.aspose.ms.System.IllegalArgumentException - filePath is null or empty

load

public static Appointment load(InputStream stream)


Copyright (c) 2002-2012 Aspose Pty Ltd. All Rights Reserved.