com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class 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 Detail

      • Appointment

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

        Initialize a new instance of the Appointment class.

        Parameters:
        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.
      • Appointment

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

        Initialize a new instance of the Appointment class.

        Parameters:
        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.
      • Appointment

        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.

        Parameters:
        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.
      • Appointment

        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.

        Parameters:
        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.
      • Appointment

        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.

        Parameters:
        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.
    • Method Detail

      • getLocation

        public String getLocation()

        Gets or sets the location.

      • setLocation

        public void setLocation(String value)

        Gets or sets the location.

      • getMicrosoftBusyStatus

        public int getMicrosoftBusyStatus()

        Specifies the BUSY status of an appointment.

      • setMicrosoftBusyStatus

        public void setMicrosoftBusyStatus(int value)

        Specifies the BUSY status of an appointment.

      • getMicrosoftIntendedStatus

        public int getMicrosoftIntendedStatus()

        Specifies the INTENDED status of an appointment.

      • setMicrosoftIntendedStatus

        public void setMicrosoftIntendedStatus(int value)

        Specifies the INTENDED status of an appointment.

      • getTransparency

        public int getTransparency()

        Specifies whether or not this appointment is intended to be visible in availability searches.

      • setTransparency

        public void setTransparency(int value)

        Specifies whether or not this appointment is intended to be visible in availability searches.

      • getStatus

        public int getStatus()

        Gets or sets the overall status or confirmation for the object.

      • setStatus

        public void setStatus(int value)

        Gets or sets the overall status or confirmation for the object.

      • getSummary

        public String getSummary()

        Gets or sets the summary.

      • setSummary

        public void setSummary(String value)

        Gets or sets the summary.

      • getDescription

        public String getDescription()

        Gets or sets the description.

      • setDescription

        public void setDescription(String value)

        Gets or sets the description.

      • getStartDate

        public Date getStartDate()

        Gets or sets the start date.

      • setStartDate

        public void setStartDate(Date value)

        Gets or sets the start date.

      • getEndDate

        public Date getEndDate()

        Gets or sets the end date.

      • setEndDate

        public void setEndDate(Date value)

        Gets or sets the end date.

      • 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)

        Gets or sets the organizer.

      • getRecurrence

        public RecurrencePattern getRecurrence()

        Gets or sets the recurrence pattern.

        Value: The recurrence pattern.
      • setRecurrence

        public void setRecurrence(RecurrencePattern value)

        Gets or sets the recurrence pattern.

        Value: The recurrence pattern.
      • 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)

        Gets or sets appointment flags.

      • getMethod

        public int getMethod()

        Gets or sets the iCalendar object method type associated with the calendar object.

      • setMethod

        public void setMethod(int value)

        Gets or sets the iCalendar object method type associated with the calendar object.

      • getAttachments

        public AttachmentCollection getAttachments()

        Gets the collection of attachments of appointment.

      • getStartTimeZone

        public String getStartTimeZone()

        Start time zone

      • setStartTimeZone

        public void setStartTimeZone(String value)

        Start time zone

      • getEndTimeZone

        public String getEndTimeZone()

        End time zone

      • setEndTimeZone

        public void setEndTimeZone(String value)

        End time zone

      • resetTimeZone

        public void resetTimeZone()

        Set local time zone

      • 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:
        AlternateViewAlternateView that represents the format to view an email message.
      • requestApointment

        public AlternateView requestApointment(int seqId)

        Requests the apointment.

        Parameters:
        seqId - The sequence id.
        Returns:
        AlternateViewAlternateView that represents the format to view an email message.
      • cancelAppointment

        public AlternateView cancelAppointment()

        Cancels the appointment.

        Returns:
        AlternateViewAlternateView that represents the format to view an email message.
      • cancelAppointment

        public AlternateView cancelAppointment(int seqId)

        Cancels the appointment.

        Parameters:
        seqId - The sequence id.
        Returns:
        AlternateViewAlternateView that represents the format to view an email message.
      • updateAppointment

        public AlternateView updateAppointment()

        Updates the appointment.

        Returns:
        AlternateViewAlternateView that represents the format to view an email message.
      • updateAppointment

        public AlternateView updateAppointment(int seqId)

        Updates the appointment.

        Parameters:
        seqId - The sequence id.
        Returns:
        AlternateViewAlternateView that represents the format to view an email message.
      • getAppointmentHtml

        public String getAppointmentHtml()

        Gets the calendar HTML.

        Returns:
        String value of calendar as HTML.
      • getAppointmentText

        public String getAppointmentText()

        Gets the calendar text.

        Returns:
        String value of calendar as plain text.
      • getAppointmentText

        public String getAppointmentText(AppointmentFormattingOptions formattingOptions)

        Gets the calendar text.

        Parameters:
        formattingOptions - AppointmentFormattingOptions that represents appointment formatting options.
        Returns:
        The text representation of appointment.
        Throws:
        com.aspose.ms.System.ArgumentNullException - throws when formattingOptions is null.
      • 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
        com.aspose.ms.System.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
        com.aspose.ms.System.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
        com.aspose.ms.System.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
        com.aspose.ms.System.NotSupportedException - The specified save options are not supported
        com.aspose.ms.System.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
        com.aspose.ms.System.NotSupportedException - the specified save options are not supported
        com.aspose.ms.System.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(String filePath,
                       AppointmentLoadOptions options)

        Loads Appointment from the file. Supported file formats: iCalendar

        Parameters:
        filePath - A file path.
        options - Represents appointment load optionsAppointmentLoadOptions.
        Returns:
        A read Appointment.
      • 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
        com.aspose.ms.System.NotSupportedException - stream does not support reading
      • load

        public static Appointment load(InputStream stream,
                       boolean applyLocalTimeZone)

        Loads Appointment from the stream

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

        public static Appointment load(InputStream stream,
                       AppointmentLoadOptions options)

        Loads Appointment from the stream

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

        public 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.
      • setUniqueId

        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.