com.aspose.network
Class Appointment

java.lang.Object
  extended by com.aspose.network.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()
           
 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)
           Loads Appointment from the 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)
           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)
           
 void setDescription(String value)
           
 void setEndDate(Date value)
           
 void setLocation(String value)
           
 void setOrganizer(MailAddress value)
           
 void setRecurrencePattern(CalendarRecurrencePattern value)
           
 void setStartDate(Date value)
           
 void setSummary(String value)
           
 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.


requestApointment

public AlternateView requestApointment()

Requests the apointment.


requestApointment

public AlternateView requestApointment(int sequenceId)

Requests the apointment.

Parameters:
sequenceId - The sequence id.

cancelAppointment

public AlternateView cancelAppointment()

Cancels the appointment.


cancelAppointment

public AlternateView cancelAppointment(int sequenceId)

Cancels the appointment.

Parameters:
sequenceId - The sequence id.

updateAppointment

public AlternateView updateAppointment()

Updates the appointment.


updateAppointment

public AlternateView updateAppointment(int sequenceId)

Updates the appointment.

Parameters:
sequenceId - The sequence id.

getAppointmentHtml

public String getAppointmentHtml()

Gets the calendar HTML.


getAppointmentText

public String getAppointmentText()

Gets the calendar text.


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:
ArgumentOutOfRangeException - 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:
ArgumentOutOfRangeException - filePath is null or empty
NotSupportedException - 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:
ArgumentOutOfRangeException - filePath is null or empty
com.aspose.ms.System.ArgumentNullException - saveOptions is null
NotSupportedException - The specified save options are not supported

save

public void save(OutputStream stream)

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

Parameters:
stream - A stream to save to
Throws:
com.aspose.ms.System.ArgumentNullException - stream is null
NotSupportedException - stream does not support writing

save

public void save(OutputStream stream,
                 int saveFormat)

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

Parameters:
stream - A stream to save to
saveFormat - A save format
Throws:
com.aspose.ms.System.ArgumentNullException - stream is null
NotSupportedException - The specified save options are not supported
NotSupportedException - stream does not support writing

save

public void save(OutputStream stream,
                 AppointmentSaveOptions saveOptions)

Saves appointment to the stream with specified save options

Parameters:
stream - A stream to save to
saveOptions - A save options
Throws:
com.aspose.ms.System.ArgumentNullException - saveOptions or stream is null
NotSupportedException - the specified save options are not supported
NotSupportedException - stream does not support writing

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.ArgumentException - filePath is null or empty

load

public static Appointment load(InputStream stream)

Loads Appointment from the stream

Parameters:
stream - A stream to load from
Returns:
A read Appointment
Throws:
com.aspose.ms.System.ArgumentNullException - stream is null
NotSupportedException - stream does not support reading


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