|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is used for Domino specific appointments. The groupware
appointment is extended to add the Domino specific
RepeatPattern
as well as the concept of
an appointment type.
The Domino repeat pattern provides the capability for repeating
appointments. Domino handles repeating appointments by maintaining an
exhaustive list of dates that the appointment recurs. The API's
RepeatPattern
class is used to
manipulate this date list.
Collab Key | Domino Concept |
Is All Day (ICalendarItem.IS_ALL_DAY )
| Appointment Type (Label 1, AppointmentTypeEnum.ALL_DAY_EVENT )
|
Start Time (ICalendarItem.START_TIME )
| Start Date Time (Label 1, DominoKey.START_DATE_TIME )
|
End Time (ICalendarItem.END_TIME )
| End Date Time (Label 1, DominoKey.END_DATE_TIME )
|
Is Recurring (ICalendarItem.IS_RECURRING )
| Repeats (Label 1, DominoKey.REPEATS )
|
Duration (ICalendarItem.DURATION )
| No Mapping |
Location (ICalendarItem.LOCATION )
| No Mapping |
Busy Status (ICalendarItem.BUSY_STATUS )
| No Mapping |
An example of creating a Domino appointment follows
Sample code:
/** * The <code>createAppointment</code> method demonstrates how to create an * appointment with the Domino provider. * * @throws CollaborationException if the session factory could not instantiate * a session with the given parameters, or if there was an error * retrieving folders, setting properties, or sending a message. */ public void createAppointment ( ) throws CollaborationException { HashMap props = new HashMap (); props.put (ISession.PROP_PROVIDER, IDominoSession.INTERNAL_NAME); props.put (IDominoSession.PROP_SERVICE_URL, "server"); props.put (IDominoSession.PROP_USER_USERNAME, "username"); props.put (IDominoSession.PROP_USER_PASSWORD, "password"); IDominoSession session = (IDominoSession) SessionFactory.createSession ( props); session.login (); ICalendarContainer calCt = (ICalendarContainer) session.getDefaultContainer ( DefaultContainerClassEnum.CALENDAR); IDominoAppointment apt = (IDominoAppointment) calCt.add (); // subject, body, importance apt.setSubject ("apt subject"); apt.setBody ("apt body"); apt.setImportance (ImportanceEnum.MEDIUM); apt.setLocation ("apt location"); //apt.setBusyStatus (BusyStatusEnum.BUSY); // start and end time Calendar cal = session.getCalendar (); cal.set (Calendar.HOUR_OF_DAY, 10); cal.set (Calendar.MINUTE, 0); cal.set (Calendar.SECOND, 0); cal.set (Calendar.MILLISECOND, 0); Date startDate = cal.getTime (); cal.set (Calendar.HOUR_OF_DAY, 11); Date endDate = cal.getTime(); apt.setDates (startDate, endDate); apt.commit (); boolean bRecurring = true; // can switch for no recurrence if (bRecurring) { int iInterval = 1; // every week int[] daysOfWeek = new int[7]; daysOfWeek[0] = Calendar.SUNDAY; daysOfWeek[1] = Calendar.MONDAY; daysOfWeek[2] = Calendar.TUESDAY; daysOfWeek[3] = Calendar.WEDNESDAY; daysOfWeek[4] = Calendar.THURSDAY; daysOfWeek[5] = Calendar.FRIDAY; daysOfWeek[6] = Calendar.SATURDAY; cal.add (Calendar.DATE, 21); // three weeks cal.set (Calendar.HOUR_OF_DAY, 0); Date untilDate = cal.getTime (); RepeatPattern pattern = RepeatPattern.createWeekly (session, startDate, iInterval, daysOfWeek, RepeatWeekendsEnum.DONT_MOVE, untilDate); apt.setRepeatPattern (pattern); } session.close (); }
Field Summary | |
static Key |
APPOINTMENT_TYPE
Key that represents the appointment type. |
static Key |
BOOK_FREE_TIME
Key that represents the appointment book free time flag. |
static Key |
CHAIR
Key that represents the Domino appointment chair. |
static ItemClass |
CLASS
The item class of IExchangeAddressEntry . |
static Key |
END_TIMES
Key that represents the Domino end times array. |
static Key |
INSTANCE_TYPE
Key that represents the instance type. |
static int |
KEYID_APPOINTMENT_TYPE
The int ID for the APPOINTMENT_TYPE key. |
static int |
KEYID_BOOK_FREE_TIME
The int ID for the BOOK_FREE_TIME key. |
static int |
KEYID_CHAIR
The int ID for the CHAIR key. |
static int |
KEYID_END_TIMES
The int ID for the END_TIMES key. |
static int |
KEYID_INSTANCE_TYPE
The int ID for the INSTANCE_TYPE key. |
static int |
KEYID_MARK_PRIVATE
The int ID for the MARK_PRIVATE key. |
static int |
KEYID_PREVENT_COUNTER
The int ID for the PREVENT_COUNTER key. |
static int |
KEYID_PREVENT_DELEGATE
The int ID for the PREVENT_DELEGATE key. |
static int |
KEYID_PRINCIPAL
The int ID for the PRINCIPAL key. |
static int |
KEYID_SEQUENCE_NUM
The int ID for the SEQUENCE_NUM key. |
static int |
KEYID_START_TIMES
The int ID for the START_TIMES key. |
static int |
KEYID_UPDATE_SEQUENCE
The int ID for the UPDATE_SEQUENCE key. |
static Key |
MARK_PRIVATE
Key that represents the mark private flag. |
static Key |
PREVENT_COUNTER
Key that represents the prevent counter flag. |
static Key |
PREVENT_DELEGATE
Key that represents the prevent delegate flag. |
static Key |
PRINCIPAL
Key that represents the Domino principal. |
static Key |
SEQUENCE_NUM
Key that represents the Domino sequence number. |
static Key |
START_TIMES
Key that represents the Domino start times array. |
static Key |
UPDATE_SEQUENCE
Key that represents the Domino increment sequence number. |
Fields inherited from interface com.compoze.collab.groupware.IMailMessage |
DELIVERY_DATE, DISPLAY_BCC, DISPLAY_CC, DISPLAY_FROM, DISPLAY_TO, ENCRYPTED, KEYID_DELIVERY_DATE, KEYID_DISPLAY_BCC, KEYID_DISPLAY_CC, KEYID_DISPLAY_FROM, KEYID_DISPLAY_TO, KEYID_ENCRYPTED, KEYID_READ_RECEIPT_REQUESTED, KEYID_SENDER_ADDRESS, KEYID_SENDER_NAME, KEYID_SENT_DATE, KEYID_SIGNED, KEYID_UNREAD, READ_RECEIPT_REQUESTED, SENDER_ADDRESS, SENDER_NAME, SENT_DATE, SIGNED, UNREAD |
Fields inherited from interface com.compoze.collab.messaging.IMessage |
KEYID_RECIPIENTS, RECIPIENTS |
Fields inherited from interface com.compoze.collab.messaging.IMessagingItem |
BODY, BODY_HTML, KEYID_BODY, KEYID_BODY_HTML |
Fields inherited from interface com.compoze.collab.IItem |
ID, ITEM_CLASS, KEYID_ID, KEYID_ITEM_CLASS, KEYID_PARENT_ID, MINIMUM_ITEM_KEYS, PARENT_ID |
Fields inherited from interface com.compoze.collab.groupware.IGroupwareItem |
CATEGORIES, DATE_CREATED, DATE_LAST_MODIFIED, IMPORTANCE, KEYID_CATEGORIES, KEYID_DATE_CREATED, KEYID_DATE_LAST_MODIFIED, KEYID_IMPORTANCE, KEYID_SIZE, KEYID_SUBJECT, SIZE, SUBJECT |
Fields inherited from interface com.compoze.collab.groupware.ICalendarItem |
BUSY_STATUS, DURATION, END_TIME, IS_ALL_DAY, IS_RECURRING, KEYID_BUSY_STATUS, KEYID_DURATION, KEYID_END_TIME, KEYID_IS_ALL_DAY, KEYID_IS_RECURRING, KEYID_LOCATION, KEYID_START_TIME, LOCATION, START_TIME |
Fields inherited from interface com.compoze.collab.domino.IDocument |
DOCUMENT_TYPE, EMBEDDED_IMAGE_COUNT, KEYID_DOCUMENT_TYPE, KEYID_EMBEDDED_IMAGE_COUNT, KEYID_PARENT_DOCUMENT_ID, PARENT_DOCUMENT_ID |
Fields inherited from interface com.compoze.collab.IAttachmentSupport |
ATTACHMENTS, HAS_ATTACHMENT, KEYID_ATTACHMENTS, KEYID_HAS_ATTACHMENT |
Method Summary | |
void |
cancel(int iUpdateRule,
java.lang.String sComment,
java.lang.String sSubject)
Hits the server to cancel the appointment and alert any participants by sending a cancellation notice. |
void |
commit(int iUpdateRule)
Hits the server to update any changed properties. |
void |
commit(int iUpdateRule,
boolean bSend)
Hits the server to update any changed properties. |
void |
delete(int iUpdateRule)
Deletes the appointment and handles repeat pattern updates. |
AppointmentType |
getAppointmentType()
Gets the appointment type of the appointment. |
NameInfo |
getChair()
Gets the chair for the appointment. |
java.util.Date[] |
getEndTimes()
Gets the Domino end time array for this appointment. |
InstanceInfo[] |
getInstanceInfo()
Hits the server and gets an array of instance info for this appointment. |
InstanceType |
getInstanceType()
Gets the instance type for this appointment. |
MeetingResponse[] |
getMeetingResponses()
Hits the server to get the responses to this appointment. |
boolean |
getPreventCounter()
Gets the prevent counter propose flag. |
boolean |
getPreventDelegate()
Gets the prevent delegate flag. |
NameInfo |
getPrincipal()
Gets the principal for the appointment. |
RepeatPattern |
getRepeatPattern()
Hits the server and gets the repeat pattern for this appointment. |
int |
getSequence()
Gets the sequence number for the appointment. |
java.util.Date[] |
getStartTimes()
Gets the Domino start time array for this appointment. |
boolean |
isAnniversary()
Checks if the appointment is an anniversary. |
boolean |
isBookFreeTime()
Checks the book free time for the appointment. |
boolean |
isChair()
Checks if this user is the chair. |
boolean |
isChair(UserInfo userInfo)
Checks if the specified user is the chair. |
boolean |
isMarkPrivate()
Checks the mark private flag for the appointment. |
void |
send()
Sends the appointment as a meeting request. |
void |
setAppointmentType(AppointmentType type)
Sets the appointment type of the appointment. |
void |
setBookFreeTime(boolean bFlag)
Sets the book free time flag of the appointment. |
void |
setMarkPrivate(boolean bFlag)
Sets the mark private flag of the appointment. |
void |
setPreventCounter(boolean bFlag)
Sets the prevent counter propose flag. |
void |
setPreventDelegate(boolean bFlag)
Sets the prevent delegate flag. |
void |
setRepeatPattern(RepeatPattern pattern)
Hits the server and sets the repeat pattern on the appointment. |
Methods inherited from interface com.compoze.collab.groupware.IMailMessage |
addEmbeddedAttachment, addRecipient, addRecipient, forward, forward, getBccAddresses, getBccRecipients, getCcAddresses, getCcRecipients, getDateDelivered, getDateSent, getFromAddresses, getRecipientsByType, getSender, getToAddresses, getToRecipients, isEncrypted, isReadReceiptRequested, isSigned, isUnread, removeRecipient, removeRecipient, removeRecipient, reply, reply, send, send, setEncrypted, setReadReceiptRequested, setSigned, setUnread |
Methods inherited from interface com.compoze.collab.messaging.IMessage |
addRecipient, getRecipients, setRecipients |
Methods inherited from interface com.compoze.collab.messaging.IMessagingItem |
getBody, getBodyHtml, setBody, setBodyHtml |
Methods inherited from interface com.compoze.collab.IItem |
commit, containsKey, containsKey, copyProperties, copyTo, delete, fetchProperties, getAttribute, getEnum, getID, getInputStream, getItemClass, getOutputStream, getParent, getParent, getParentID, getProperties, getProperties, getProperties, getProperty, getProperty, getProperty, getReader, getRootContainer, getSession, getWriter, isMissing, moveTo, removeAttribute, removeProperty, setAttribute, setProperties, setProperty, setProperty, setProperty |
Methods inherited from interface com.compoze.collab.groupware.IGroupwareItem |
getBodyHtml, getBodyHtml, getCategories, getDateCreated, getDateLastModified, getImportance, getNormalizedSubject, getSize, getSubject, getSubject, getSubjectPrefix, setBodyHtml, setCategories, setImportance, setSubject |
Methods inherited from interface com.compoze.collab.groupware.IAppointment |
cancel, setAllDayEvent, setAllDayEvent, setBusyStatus, setDates, setLocation |
Methods inherited from interface com.compoze.collab.groupware.ICalendarItem |
getBusyStatus, getDuration, getEndTime, getLocation, getStartTime, isAllDayEvent, isRecurring |
Methods inherited from interface com.compoze.collab.domino.IDocument |
getDocumentType, getEmbeddedImageCount, getParentDocumentID |
Methods inherited from interface com.compoze.collab.IAttachmentSupport |
addAttachment, getAttachment, getAttachmentCount, getAttachments, hasAttachment |
Field Detail |
public static final int KEYID_BOOK_FREE_TIME
int
ID for the BOOK_FREE_TIME
key.public static final int KEYID_MARK_PRIVATE
int
ID for the MARK_PRIVATE
key.public static final int KEYID_APPOINTMENT_TYPE
int
ID for the APPOINTMENT_TYPE
key.public static final int KEYID_INSTANCE_TYPE
int
ID for the INSTANCE_TYPE
key.public static final int KEYID_PREVENT_DELEGATE
int
ID for the PREVENT_DELEGATE
key.public static final int KEYID_PREVENT_COUNTER
int
ID for the PREVENT_COUNTER
key.public static final int KEYID_START_TIMES
int
ID for the START_TIMES
key.public static final int KEYID_END_TIMES
int
ID for the END_TIMES
key.public static final int KEYID_CHAIR
int
ID for the CHAIR
key.public static final int KEYID_PRINCIPAL
int
ID for the PRINCIPAL
key.public static final int KEYID_SEQUENCE_NUM
int
ID for the SEQUENCE_NUM
key.public static final int KEYID_UPDATE_SEQUENCE
int
ID for the UPDATE_SEQUENCE
key.public static final Key BOOK_FREE_TIME
public static final Key MARK_PRIVATE
public static final Key APPOINTMENT_TYPE
public static final Key INSTANCE_TYPE
public static final Key PREVENT_DELEGATE
public static final Key PREVENT_COUNTER
public static final Key START_TIMES
public static final Key END_TIMES
public static final Key CHAIR
public static final Key PRINCIPAL
public static final Key SEQUENCE_NUM
public static final Key UPDATE_SEQUENCE
public static final ItemClass CLASS
IExchangeAddressEntry
.Method Detail |
public java.util.Date[] getStartTimes() throws CollaborationException
START_TIMES
public java.util.Date[] getEndTimes() throws CollaborationException
END_TIMES
public boolean isBookFreeTime() throws CollaborationException
true
for not penciled in; false
for
penciled in (time will appear free to others)BOOK_FREE_TIME
public void setBookFreeTime(boolean bFlag) throws CollaborationException
bFlag
- true
for pencil in;
false
otherwiseBOOK_FREE_TIME
public boolean isMarkPrivate() throws CollaborationException
true
for marked private;
false
otherwiseMARK_PRIVATE
public void setMarkPrivate(boolean bFlag) throws CollaborationException
bFlag
- true
to mark private;
false
otherwiseMARK_PRIVATE
public AppointmentType getAppointmentType() throws CollaborationException
null
)APPOINTMENT_TYPE
public void setAppointmentType(AppointmentType type) throws CollaborationException
type
- the appointment typeAPPOINTMENT_TYPE
public boolean isAnniversary() throws CollaborationException
true
if an anniversary; false
otherwiseAPPOINTMENT_TYPE
,
getAppointmentType()
public NameInfo getChair() throws CollaborationException
CHAIR
public NameInfo getPrincipal() throws CollaborationException
PRINCIPAL
public int getSequence() throws CollaborationException
SEQUENCE_NUM
public boolean isChair() throws CollaborationException
true
if the user is the chair; false
otherwiseCHAIR
public boolean isChair(UserInfo userInfo) throws CollaborationException
userInfo
- the user to checktrue
if the user is the chair; false
otherwiseCHAIR
public InstanceType getInstanceType() throws CollaborationException
null
)INSTANCE_TYPE
public RepeatPattern getRepeatPattern() throws CollaborationException
null
is returned.null
if this is not a
repeating appointmentICalendarItem.isRecurring()
,
ICalendarItem.IS_RECURRING
public InstanceInfo[] getInstanceInfo() throws CollaborationException
getInstanceType()
,
InstanceTypeEnum.PARENT
,
IDocument.PARENT_DOCUMENT_ID
public void setRepeatPattern(RepeatPattern pattern) throws CollaborationException
SINGLE
; otherwise, this method does nothing. Also, the
appointment must be committed before calling this method.
Note: the repeat pattern is set immediately and cannot be undone.
There is no need to call commit()
.
Note: the start and end times properties must be loaded prior to calling this method
pattern
- the repeat patten (may not be null
)getInstanceType()
,
APPOINTMENT_TYPE
,
INSTANCE_TYPE
,
START_TIMES
,
END_TIMES
public void delete(int iUpdateRule) throws CollaborationException
(String, FetchProfile, Date)
.iUpdateRule
- the update rule (
see RepeatPattern.UPDATE_
constants)
// * @param instanceDate the instance to delete (if
// * iUpdateRule
is anything other than UPDATE_ALL
// * and the appointment was not retrieved using a date range
// * query, for example it was retrieved by ID, then this must not
// * be null
)ICalendarItem.IS_RECURRING
,
START_TIMES
,
END_TIMES
public void cancel(int iUpdateRule, java.lang.String sComment, java.lang.String sSubject) throws CollaborationException
Note: this appointment must be of type AppointmentType.MEETING
and
you must be the chair to cancel this appointment.
iUpdateRule
- the update rule (
see RepeatPattern.UPDATE_
constants)sComment
- the comment (body) or null
for nonesSubject
- the subject of the cancellation, or
null
to use a default
// * @see #CHAIRAPPOINTMENT_TYPE
,
// * @see #isChair()
,
getAppointmentType()
public MeetingResponse[] getMeetingResponses() throws CollaborationException
Note: this appointment must be of type AppointmentType.MEETING
and
you must be the chair to cancel this appointment.
A CollaborationException
is thrown if you
are not the chair or this is not an appointment type meeting.
A null
is returned if no responses exists for this meeting.
APPOINTMENT_TYPE
,
CHAIR
,
isChair()
,
getAppointmentType()
public void commit(int iUpdateRule) throws CollaborationException
(String, FetchProfile, Date)
.iUpdateRule
- the update rule (see
RepeatPattern.UPDATE_
constants)ICalendarItem.IS_RECURRING
,
START_TIMES
,
END_TIMES
public void commit(int iUpdateRule, boolean bSend) throws CollaborationException
(String, FetchProfile, Date)
.iUpdateRule
- the update rule (see
RepeatPattern.UPDATE_
constants)bSend
- if true
and the appointment is
a meeting, send an update messageICalendarItem.IS_RECURRING
,
START_TIMES
,
END_TIMES
public boolean getPreventCounter() throws CollaborationException
true
to prevent counter propose;
false
otherwisePREVENT_COUNTER
public void setPreventCounter(boolean bFlag) throws CollaborationException
bFlag
- true
to prevent counter propose;
false
otherwisePREVENT_COUNTER
public boolean getPreventDelegate() throws CollaborationException
true
to prevent delegating;
false
otherwisePREVENT_DELEGATE
public void setPreventDelegate(boolean bFlag) throws CollaborationException
bFlag
- true
to prevent delegating;
false
otherwisePREVENT_DELEGATE
public void send() throws CollaborationException
send
. This method
automatically sets the appointment type to MEETING
.send
in interface IMessage
com.compoze.collab.messaging.IMessage
CollaborationException
- if the provider encountered
an error while sending the message
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |