|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.exchange.webdav.AbstractItem | +--com.compoze.exchange.webdav.AbstractMessage | +--com.compoze.exchange.webdav.Message | +--com.compoze.exchange.webdav.Meeting
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(); } } }
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.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 |
public static final int MEETING_TYPE_REQUEST
public static final int MEETING_TYPE_CANCELLATION
public static final int MEETING_RESPONSE_ACCEPT
public static final int MEETING_RESPONSE_ACCEPT_TENTATIVE
public static final int MEETING_RESPONSE_DECLINE
Constructor Detail |
public Meeting(Appointment appointment) throws ExchangeException
appointment
- the associated appointment to this meeting request; must not be
null
or empty)ExchangeException
- if a problem occurred while connecting to or
interacting with Exchange Server.Method Detail |
public int getMeetingType()
public Appointment getAssociatedAppointment() throws ExchangeException
serverGetAssociatedAppointment()
public Appointment serverGetAssociatedAppointment() throws ExchangeException
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.
folder
- the calendar folder to searchExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Appointment getAssociatedAppointment(CalendarFolder folder) throws ExchangeException
serverGetAssociatedAppointment(CalendarFolder)
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.
folder
- the calendar folder to searchpublic Appointment serverGetAssociatedAppointment(CalendarFolder folder) throws ExchangeException
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.
folder
- the calendar folder to searchExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Appointment cancelAssociatedAppointment(CalendarFolder folder) throws ExchangeException
serverCancelAssociatedAppointment(CalendarFolder)
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.
folder
- the calendar folder where the associated appointment of the
meeting is found and updatednull
if not foundExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Appointment serverCancelAssociatedAppointment(CalendarFolder folder) throws ExchangeException
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.
folder
- the calendar folder where the associated appointment of the
meeting is found and updatednull
if not foundExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Meeting accept() throws ExchangeException
serverAccept()
ExchangeException
- if a problem occurred while connecting to or
interacting with Exchange Server.public Meeting serverAccept() throws ExchangeException
ExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Meeting acceptTentative() throws ExchangeException
serverAcceptTentative()
ExchangeException
- if a problem occurred while connecting to or
interacting with Exchange Server.public Meeting serverAcceptTentative() throws ExchangeException
ExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Meeting decline() throws ExchangeException
serverDecline()
ExchangeException
- if a problem occurred while connecting to or
interacting with Exchange Server.public Meeting serverDecline() throws ExchangeException
ExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Meeting respond(ResponseStatus status) throws ExchangeException
serverRespond(ResponseStatus)
status
- the response status: only ResponseStatus.TENTATIVE
,
ResponseStatus.ACCEPTED
, ResponseStatus.DECLINED
.ExchangeException
- if a problem occurred while connecting to or
interacting with Exchange Server.public Meeting serverRespond(ResponseStatus status) throws ExchangeException
status
- the response status: only ResponseStatus.TENTATIVE
,
ResponseStatus.ACCEPTED
, ResponseStatus.DECLINED
ExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Meeting serverRespondDefaultFolder(ResponseStatus status) throws ExchangeException
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.
status
- the response status: only ResponseStatus.TENTATIVE
,
ResponseStatus.ACCEPTED
, ResponseStatus.DECLINED
ExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Meeting respond(ResponseStatus status, Folder folder) throws ExchangeException
serverRespond(ResponseStatus, Folder)
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
.ExchangeException
- if a problem occurred while connecting to or
interacting with Exchange Server.public Meeting serverRespond(ResponseStatus status, Folder folder) throws ExchangeException
status
- the response status: only ResponseStatus.TENTATIVE
,
ResponseStatus.ACCEPTED
, ResponseStatus.DECLINED
folder
- the calendar folderExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class Message
java.lang.CloneNotSupportedException
- if the object's class does not support the Cloneable interface.public java.lang.String toString()
toString
in class Message
public static java.util.List getDefaultProperties()
CalendarProperty.ALLDAYEVENT
CalendarProperty.BUSY_STATUS
HttpMailProperty.SUBJECT
CalendarProperty.DATE_START
CalendarProperty.DATE_END
CalendarProperty.DURATION
CalendarProperty.TIME_ZONE
CalendarProperty.TIME_ZONE_ID
CalendarProperty.INSTANCE_TYPE
CalendarProperty.LOCATION
ExchangeProperty.SENSITIVITY
CalendarProperty.RECURRENCE_ID
CalendarProperty.RECURRENCE_RULE
CalendarProperty.REMINDER_OFFSET
CalendarProperty.EXCEPTION_DATE
CalendarProperty.APPOINTMENT_UID
Message.getDefaultProperties()
public static java.util.List getProperties()
Message.getProperties()
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |