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 final String getLocation()

        Gets or sets the location.

      • setLocation

        public final void setLocation(String value)

        Gets or sets the location.

      • getMicrosoftBusyStatus

        public final int getMicrosoftBusyStatus()

        Specifies the BUSY status of an appointment.

      • setMicrosoftBusyStatus

        public final void setMicrosoftBusyStatus(int value)

        Specifies the BUSY status of an appointment.

      • getMicrosoftIntendedStatus

        public final int getMicrosoftIntendedStatus()

        Specifies the INTENDED status of an appointment.

      • setMicrosoftIntendedStatus

        public final void setMicrosoftIntendedStatus(int value)

        Specifies the INTENDED status of an appointment.

      • getTransparency

        public final int getTransparency()

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

      • setTransparency

        public final void setTransparency(int value)

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

      • getStatus

        public final int getStatus()

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

      • setStatus

        public final void setStatus(int value)

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

      • getSummary

        public final String getSummary()

        Gets or sets the summary.

      • setSummary

        public final void setSummary(String value)

        Gets or sets the summary.

      • getDescription

        public final String getDescription()

        Gets or sets the description.

      • setDescription

        public final void setDescription(String value)

        Gets or sets the description.

      • isDescriptionHtml

        public final boolean isDescriptionHtml()

        Gets or sets value which indicates if description is in HTML format

      • setDescriptionHtml

        public final void setDescriptionHtml(boolean value)

        Gets or sets value which indicates if description is in HTML format

      • getStartDate

        public final Date getStartDate()

        Gets or sets the start date.

      • setStartDate

        public final void setStartDate(Date value)

        Gets or sets the start date.

      • getEndDate

        public final Date getEndDate()

        Gets or sets the end date.

      • setEndDate

        public final void setEndDate(Date value)

        Gets or sets the end date.

      • getCreatedDate

        public final Date getCreatedDate()

        Gets or sets the date and time that calendar information was created.

        Value: The Date that represents creation date and time.
      • setCreatedDate

        public final void setCreatedDate(Date value)

        Gets or sets the date and time that calendar information was created.

        Value: The Date that represents creation date and time.
      • getLastModifiedDate

        public final Date getLastModifiedDate()

        Gets or sets the date and time that calendar information was last revised.

        Value: The Date that represents modification date and time.
      • setLastModifiedDate

        public final void setLastModifiedDate(Date value)

        Gets or sets the date and time that calendar information was last revised.

        Value: The Date that represents modification date and time.
      • setAttendees

        public final void setAttendees(MailAddressCollection value)

        Gets or sets the attendees.

      • getOptionalAttendees

        public final MailAddressCollection getOptionalAttendees()

        Gets the optional attendees.

        Value: The address collection of optional attendees.
      • getOrganizer

        public final MailAddress getOrganizer()

        Gets or sets the organizer.

      • setOrganizer

        public final void setOrganizer(MailAddress value)

        Gets or sets the organizer.

      • getRecurrence

        public final RecurrencePattern getRecurrence()

        Gets or sets the recurrence pattern.

        Value: The recurrence pattern.
      • setRecurrence

        public final void setRecurrence(RecurrencePattern value)

        Gets or sets the recurrence pattern.

        Value: The recurrence pattern.
      • getSequenceId

        public final String getSequenceId()

        Gets the sequence id.

        Value: The sequence id.
      • getFlags

        public final int getFlags()

        Gets or sets appointment flags.

      • setFlags

        public final void setFlags(int value)

        Gets or sets appointment flags.

      • getMethodType

        public final int getMethodType()

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

      • setMethodType

        public final void setMethodType(int value)

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

      • getAttachments

        public final AttachmentCollection getAttachments()

        Gets the collection of attachments of appointment.

      • getStartTimeZone

        public final String getStartTimeZone()

        Start time zone

      • setStartTimeZone

        public final void setStartTimeZone(String value)

        Start time zone

      • getEndTimeZone

        public final String getEndTimeZone()

        End time zone

      • setEndTimeZone

        public final void setEndTimeZone(String value)

        End time zone

      • resetTimeZone

        public final void resetTimeZone()

        Set local time zone

      • setTimeZone

        public final void setTimeZone(String tzName)

        Set time zone

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

        public final AlternateView requestApointment()

        Requests the apointment.

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

        public final 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 final AlternateView cancelAppointment()

        Cancels the appointment.

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

        public final 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 final AlternateView updateAppointment()

        Updates the appointment.

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

        public final 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 final String getAppointmentHtml()

        Gets the calendar HTML.

        Returns:
        String value of calendar as HTML.
      • getAppointmentText

        public final String getAppointmentText()

        Gets the calendar text.

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

        public final 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 final 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 final 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 final 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 final 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 final 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 final 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(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 final 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 final 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.