Compoze Software, Inc.

com.compoze.exchange.webdav
Class Meeting


java.lang.Object

  |

  +--com.compoze.exchange.webdav.AbstractItem

        |

        +--com.compoze.exchange.webdav.AbstractMessage

              |

              +--com.compoze.exchange.webdav.Message

                    |

                    +--com.compoze.exchange.webdav.Meeting

All Implemented Interfaces:
java.lang.Cloneable, IItem, java.io.Serializable

public class Meeting
extends Message
implements java.io.Serializable, java.lang.Cloneable

This class extends Message to represent a message that contains an appointment (meeting request).
Below is an example of how to create a meeting request:

   //	Add appointment
   Calendar calendar = Calendar.getInstance();
   calendar.add(Calendar.MINUTE, 5);
   Date startDate = calendar.getTime();

   calendar.add(Calendar.MINUTE, 30);
   Date endDate = calendar.getTime();

   CalendarFolder calendarFolder = m_session.getCalendarFolder();
   Appointments appointments = calendarFolder.getAppointments(startDate, endDate);

   Appointment appt = new Appointment("New appointment",
	new DateRange(startDate, endDate), TimeZoneId.EASTERN);
   appt.setLocation("new appointment location");
   appt.setTextDescription("new appointment text");
   appt.setBusyStatus(BusyStatus.BUSY);
   appt.setPriority(Priority.URGENT);
   appt.setSensitivity(Sensitivity.CONFIDENTIAL);

   //  Meeting request needed setting
   appt.setOrganizer("myEmailAddress@myCompany.com");
   
   Linked required = new LinkedList();
   required.add("yourEmailAddress@yourCompany.com");
   recurAppt.setRequiredAttendees(required);

   appointments.add(appt);
   
   //  Create and send request
   Meeting mtgRequest = appointment.createRequest();
   mtgRequest.send();
 
Below is an example of how to accept a meeting request:
   MailFolder inboxFolder = m_session.getInbox();

   Messages messages = inboxFolder.getMessages(MeetingProperty.getProperties(), 
	null, null, RowRange.create(25));
   Iterator iterator = messages.iterator();
   if (iterator.hasNext())
	while (iterator.hasNext())
	    {
	    Message   message = (Message) iterator.next();

	    if (message instanceof Meeting)
	    	{
		if (((Meeting) message).getMeetingType() == Meeting.MEETING_TYPE_REQUEST)
		    {
		    ((Meeting) message).updateAssociatedAppointment();
		    Meeting accept = ((Meeting) message).respond(Meeting.MEETING_RESPONSE_ACCEPT);

		    //  Delete meeting request
		    message.delete();
		    }
	    	}
	    }
 

See Also:
Serialized Form

Field Summary
static int MEETING_RESPONSE_ACCEPT
          Represents an accepting meeting response
static int MEETING_RESPONSE_ACCEPT_TENTATIVE
          Represents a tentative meeting response
static int MEETING_RESPONSE_DECLINE
          Represents a declining meeting response.
static int MEETING_TYPE_CANCELLATION
          Represents a meeting cancellation
static int MEETING_TYPE_REQUEST
          Represents a meeting request
 
Fields inherited from class com.compoze.exchange.webdav.Message
FORWARD_PREFIX, REPLY_PREFIX
 
Constructor Summary
Meeting(Appointment appointment)
          Constructor.
 
Method Summary
 Meeting accept()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAccept()
 Meeting acceptTentative()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAcceptTentative()
 Appointment cancelAssociatedAppointment(CalendarFolder folder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCancelAssociatedAppointment(CalendarFolder)
 java.lang.Object clone()
          Creates and returns a copy of this object.
 Meeting decline()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDecline()
 Appointment getAssociatedAppointment()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetAssociatedAppointment()
 Appointment getAssociatedAppointment(CalendarFolder folder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetAssociatedAppointment(CalendarFolder)
static java.util.List getDefaultProperties()
          Gets a list of default properties pertaining to a meeting request.
 int getMeetingType()
          Gets the type of this meeting request.
static java.util.List getProperties()
          Gets a list of properties pertaining to a message.
 Meeting respond(ResponseStatus status)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverRespond(ResponseStatus)
 Meeting respond(ResponseStatus status, Folder folder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverRespond(ResponseStatus, Folder)
 Meeting serverAccept()
          Request the server to accept this meeting request and return a meeting response.
 Meeting serverAcceptTentative()
          Request the server to tentatively accept this meeting request and return a meeting response.
 Appointment serverCancelAssociatedAppointment(CalendarFolder folder)
          Requests the server to cancel the appointment associated with this calendar message from the specified calendar folder.
 Meeting serverDecline()
          Request the server to decline this meeting request and return a meeting response.
 Appointment serverGetAssociatedAppointment()
          Queries the server to get the appointment associated with this calendar message from the user's "Calendar" folder.
 Appointment serverGetAssociatedAppointment(CalendarFolder folder)
          Queries the server to get the appointment associated with this calendar message from the specified calendar folder.
 Meeting serverRespond(ResponseStatus status)
          Request the server to respond to this meeting request and return a meeting response.
 Meeting serverRespond(ResponseStatus status, Folder folder)
          Request the server to respond to this meeting request and return a meeting response.
 Meeting serverRespondDefaultFolder(ResponseStatus status)
          Request the server to respond to this appointment and store the appointment in the default calendar folder.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class com.compoze.exchange.webdav.Message
forward, forward, getComment, getContentBase, getContentDescription, getContentDisposition, getContentDispositionType, getContentId, getContentLanguage, getContentLocation, getContentMediaType, getContentTransferEncoding, getContentType, getDateSent, getDisplayCC, getDisplayTo, getDisposition, getDispositionNotificationAddress, getDistribution, getDistributionString, getExpires, getExpiryDate, getFollowupNewsgroups, getFollowupNewsgroupString, getHeaderImportance, getHTMLDescription, getImportance, getInReplyTo, getKeywords, getKeywordsString, getLines, getMessageFlag, getMessageId, getMimeVersion, getModerator, getNewsgroups, getNewsgroupsString, getOrganization, getOriginalRecipient, getPriority, getReceived, getReferences, getRelayVersion, getReplyBy, getReplyToAddresses, getReplyToAddressString, getReturnPath, getReturnReceiptTo, getSaveDestination, getSender, getSenderEmail, getSenderName, getSummary, getThreadIndex, getThreadTopic, getXMailer, isMeetingCancellation, isMeetingRequest, isMeetingResponse, isOutOfOfficeReply, isSaveInSent, isSubmitted, isUndeliverableMessage, reply, reply, replyAll, send, send, send, serverForward, serverForward, serverReply, serverReply, serverReplyAll, serverSend, serverSend, serverSend, serverUpdate, setComment, setContentBase, setContentDescription, setContentDisposition, setContentId, setContentLanguage, setContentLocation, setContentLocation, setContentTransferEncoding, setContentType, setDateSent, setDisposition, setDispositionNotificationAddress, setDistribution, setExpires, setExpiryDate, setFollowupNewsgroups, setHeaderImportance, setHTMLDescription, setImportance, setInReplyTo, setKeywords, setMessageFlag, setMessageId, setMimeVersion, setModerator, setNewsgroups, setOrganization, setOriginalRecipient, setPriority, setReferences, setRelayVersion, setReplyBy, setReplyToAddresses, setReturnPath, setReturnReceiptTo, setSaveDestination, setSaveDestination, setSaveInSent, setSender, setSenderName, setSubmitted, setSummary, setThreadIndex, setThreadTopic, setXMailer
 
Methods inherited from class com.compoze.exchange.webdav.AbstractMessage
addAttachment, createFilename, equals, getAttachments, getBccAddresses, getBccAddressesString, getBccRecipients, getBody, getCategories, getCcAddresses, getCcAddressesString, getCcRecipients, getContactNames, getDateReceived, getFrom, getFromAddresses, getFromAddressesString, getFromEmailAddress, getFromName, getNormalizedSubject, getSensitivity, getSize, getSubject, getTextDescription, getToAddresses, getToAddressesString, getToRecipients, getType, hasAttachment, isRead, serverDeleteAttachment, serverGetAttachments, setBccAddresses, setBccRecipients, setBccRecipients, setBody, setCategories, setCategories, setCcAddresses, setCcRecipients, setCcRecipients, setContactNames, setContactNames, setDateReceived, setFrom, setFrom, setFromAddress, setFromAddresses, setRead, setSensitivity, setSubject, setTextDescription, setToAddresses, setToRecipients, setToRecipients, setType
 
Methods inherited from class com.compoze.exchange.webdav.AbstractItem
copy, copy, copy, createFilename, delete, equals, getContentClass, getCreationDate, getDateLastModified, getDisplayName, getFile, getHRef, getID, getParentFolder, getPermanentURL, getUID, isFolder, isHidden, isReadOnly, isRoot, move, move, move, serverCopyTo, serverCopyTo, serverCopyTo, serverCopyTo, serverDelete, serverGetParentFolder, serverMoveTo, serverMoveTo, serverMoveTo, serverMoveTo, serverUpdate, setContentClass, setContentClass, setHidden, setReadOnly, setReleased, setType, setUID, update, update, validate
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MEETING_TYPE_REQUEST


public static final int MEETING_TYPE_REQUEST
Represents a meeting request

MEETING_TYPE_CANCELLATION


public static final int MEETING_TYPE_CANCELLATION
Represents a meeting cancellation

MEETING_RESPONSE_ACCEPT


public static final int MEETING_RESPONSE_ACCEPT
Represents an accepting meeting response

MEETING_RESPONSE_ACCEPT_TENTATIVE


public static final int MEETING_RESPONSE_ACCEPT_TENTATIVE
Represents a tentative meeting response

MEETING_RESPONSE_DECLINE


public static final int MEETING_RESPONSE_DECLINE
Represents a declining meeting response.
Constructor Detail

Meeting


public Meeting(Appointment appointment)
        throws ExchangeException
Constructor.
Parameters:
appointment - the associated appointment to this meeting request; must not be null or empty)
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server.
Method Detail

getMeetingType


public int getMeetingType()
Gets the type of this meeting request.
Returns:
the type of meeting request

getAssociatedAppointment


public Appointment getAssociatedAppointment()
                                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetAssociatedAppointment()

Gets the meeting associated with this calendar message from the user's "Calendar" folder.
Returns:
the associated appointment

serverGetAssociatedAppointment


public Appointment serverGetAssociatedAppointment()
                                           throws ExchangeException
Queries the server to get the appointment associated with this calendar message from the user's "Calendar" folder.

If the appointment exists, a request is made to retrieve the appointment and update with the calendar properties stored in this meeting request. If not found, a new Appointment object is created derived from the calendar properties stored in this meeting request.

AbstractItem.update() must be called for the updated properies to take affect.

Parameters:
folder - the calendar folder to search
Returns:
the associated appointment
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

getAssociatedAppointment


public Appointment getAssociatedAppointment(CalendarFolder folder)
                                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetAssociatedAppointment(CalendarFolder)

Gets the appointment associated with this calendar message from the specified calendar folder.
A request is made to the Exchange store to search for the meeting associated with this meeting request in the given folder.

If the appointment exists, a request is made to retrieve the appointment and update with the calendar properties stored in this meeting request. If not found, a new Appointment object is created derived from the calendar properties stored in this meeting request.

AbstractItem.update() must be called for the updated properies to take affect.

Parameters:
folder - the calendar folder to search
Returns:
the associated appointment

serverGetAssociatedAppointment


public Appointment serverGetAssociatedAppointment(CalendarFolder folder)
                                           throws ExchangeException
Queries the server to get the appointment associated with this calendar message from the specified calendar folder.

If the appointment exists, a request is made to retrieve the appointment and update with the calendar properties stored in this meeting request. If not found, a new Appointment object is created derived from the calendar properties stored in this meeting request.

AbstractItem.update() must be called for the updated properies to take affect.

Parameters:
folder - the calendar folder to search
Returns:
the associated appointment
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

cancelAssociatedAppointment


public Appointment cancelAssociatedAppointment(CalendarFolder folder)
                                        throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverCancelAssociatedAppointment(CalendarFolder)

Cancels the appointment associated with this calendar message from the specified calendar folder.

This calendar message must be a cancellation request (the result of calling AbstractMessage.getType() is IPM.Schedule.Meeting.Canceled) in order to update the associated appointment as cancelled.

Parameters:
folder - the calendar folder where the associated appointment of the meeting is found and updated
Returns:
the cancelled appointment, or null if not found
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

serverCancelAssociatedAppointment


public Appointment serverCancelAssociatedAppointment(CalendarFolder folder)
                                              throws ExchangeException
Requests the server to cancel the appointment associated with this calendar message from the specified calendar folder.

This calendar message must be a cancellation request (the result of calling AbstractMessage.getType() is IPM.Schedule.Meeting.Canceled) in order to update the associated appointment as cancelled.

Parameters:
folder - the calendar folder where the associated appointment of the meeting is found and updated
Returns:
the cancelled appointment, or null if not found
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

accept


public Meeting accept()
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAccept()

Accepts this meeting request and returns a new meeting item suitable for a response to this meeting request. The associated appointment to this meeting request is accepted to the user's default Calendar folder.
Returns:
meeting item suitable for an accept response to the meeting request.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server.

serverAccept


public Meeting serverAccept()
                     throws ExchangeException
Request the server to accept this meeting request and return a meeting response. The associated appointment to this meeting request is accepted to the user's "Calendar" folder.
Returns:
meeting response (accept)
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

acceptTentative


public Meeting acceptTentative()
                        throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAcceptTentative()

Accepts this meeting request tentatively and returns a new meeting item suitable for a response to this meeting request. The associated appointment to this meeting request is tentatively accepted to the user's default Calendar folder.
Returns:
meeting item suitable for a tentative response to the meeting request.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server.

serverAcceptTentative


public Meeting serverAcceptTentative()
                              throws ExchangeException
Request the server to tentatively accept this meeting request and return a meeting response. The associated appointment to this meeting request is tentatively accepted to the user's "Calendar" folder.
Returns:
meeting response (accept tentative)
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

decline


public Meeting decline()
                throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDecline()

Declines this meeting request tentatively and returns a new meeting item suitable for a response to this meeting request. The associated appointment to this meeting request is removed from the user's default Calendar folder (if need be).
Returns:
meeting item suitable for a decline response to the meeting request.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server.

serverDecline


public Meeting serverDecline()
                      throws ExchangeException
Request the server to decline this meeting request and return a meeting response. The associated appointment to this meeting request is removed from the the user's "Calendar" folder.
Returns:
meeting response (decline)
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

respond


public Meeting respond(ResponseStatus status)
                throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverRespond(ResponseStatus)

Creates a new meeting item suitable for a response to this meeting request. The associated appointment to this meeting request is either accepted to or removed from the user's default Calendar folder.
Parameters:
status - the response status: only ResponseStatus.TENTATIVE, ResponseStatus.ACCEPTED, ResponseStatus.DECLINED.
Returns:
meeting item suitable for a response to the meeting request.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server.

serverRespond


public Meeting serverRespond(ResponseStatus status)
                      throws ExchangeException
Request the server to respond to this meeting request and return a meeting response. The asscoiated appointment to this meeting request is accepted to or removed from the user's "Calendar" folder.
Parameters:
status - the response status: only ResponseStatus.TENTATIVE, ResponseStatus.ACCEPTED, ResponseStatus.DECLINED
Returns:
meeting response
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

serverRespondDefaultFolder


public Meeting serverRespondDefaultFolder(ResponseStatus status)
                                   throws ExchangeException
Request the server to respond to this appointment and store the appointment in the default calendar folder. This method has the advantage over serverRespond that the organizer gets set properly (useful for subsequent updates to the response status), but the disadvantage that the default calendar folder must be used.

This method does not use pure WebDAV to do its work. It uses an HTTP request to simulate a browser GET with parameters that would be made when a user is using OWA.

Parameters:
status - the response status: only ResponseStatus.TENTATIVE, ResponseStatus.ACCEPTED, ResponseStatus.DECLINED
Returns:
meeting item suitable for a response to the meeting request.
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

respond


public Meeting respond(ResponseStatus status,
                       Folder folder)
                throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverRespond(ResponseStatus, Folder)

Creates a new meeting item suitable for a response to this appointment.
Parameters:
status - the response status: only ResponseStatus.TENTATIVE, ResponseStatus.ACCEPTED, ResponseStatus.DECLINED.
folder - the folder (Caledendar) to save/remove the associated appointment. Must not be null.
Returns:
meeting item suitable for a response to the meeting request.
Throws:
ExchangeException - if a problem occurred while connecting to or interacting with Exchange Server.

serverRespond


public Meeting serverRespond(ResponseStatus status,
                             Folder folder)
                      throws ExchangeException
Request the server to respond to this meeting request and return a meeting response.
Parameters:
status - the response status: only ResponseStatus.TENTATIVE, ResponseStatus.ACCEPTED, ResponseStatus.DECLINED
folder - the calendar folder
Returns:
meeting response
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used

clone


public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.
Overrides:
clone in class Message
Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface.

toString


public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class Message
Returns:
the string representation of the object.

getDefaultProperties


public static java.util.List getDefaultProperties()
Gets a list of default properties pertaining to a meeting request.
Following is the list of properties returned:
Returns:
a list (unmodifiable) of properties.
See Also:
Message.getDefaultProperties()

getProperties


public static java.util.List getProperties()
Gets a list of properties pertaining to a message.
Returns:
a list (unmodifiable) of properties.
See Also:
Message.getProperties()

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.