public interface Calendaring
Modifier and Type | Method and Description |
---|---|
CalendarActionData |
buildActionData()
Use this method to start building the data object to be passed along
calendar actions;
|
String |
createCalendarEntry(Database dbMail,
String iCal,
Collection<CalendarWrite> flags)
Creates a calendar entry.
This supports either a single entry, or a recurring entry which may contain multiple VEVENTS represenging both the series and exception data. |
void |
entryAction(Database dbMail,
String uid,
String recurId,
Collection<CalendarProcess> action,
CalendarRangeRepeat scope,
String comment,
CalendarActionData data,
Collection<CalendarActionOptions> flags)
Perform an action on a calendar entry.
For instance, change the response of an accepted meeting to counter or delegate. This must be applied to meetings (with the exception of CalendarProcess.DELETE ,
which can be applied to any calendar entry).This makes the appropriate modifications to the invitee calendar and also sends appropriate notices out. |
String |
getApptUnidFromUID(String uid)
This is a convenience method that returns an Apptunid value that corresponds to a UID.
|
int |
getNewInvitations(Database dbMail,
TemporalAccessor start,
String uid,
TemporalAccessor since,
AtomicReference<DominoDateTime> retUntil,
List<Integer> retNoteIds,
List<String> retUNIDs)
Retrieve invitations in a mailfile that have not yet been responded to.
This returns the number of new invitations as well as optional NOTEID and/or UNID lists. This returns only invitations (and delegated invitations), and not reschedules, information updates, cancels, etc. This method does not filter out any invitations that have since been canceled/rescheduled, or are otherwise out of date. Once the invitation is accepted, other notices that apply to that meeting can be discovered with a call to getUnappliedNotices(Database, String, List, List)
must be used (on a per-UID level).Only invitations for meetings that are current (at least one instance starts within the last day or in the future) are returned, although the starting time can be specified by the caller to override the default.A caller can retrieve only invitations that have arrived since a prior call to getNewInvitations(com.hcl.domino.data.Database, java.time.temporal.TemporalAccessor, java.lang.String, java.time.temporal.TemporalAccessor, java.util.concurrent.atomic.AtomicReference<com.hcl.domino.data.DominoDateTime>, java.util.List<java.lang.Integer>, java.util.List<java.lang.String>)
by using tdSince and ptdretUntil.If uid is provided, invitations only for a
particular meeting will be returned.This is useful if you are looking for an invitation or invitations that correspond to an updated notice that has arrived. Note: Multiple invitations might exist for a particular UID if that meeting is recurring and you were added to an instance or instances after the initial creation. The returned notices are not guaranteed to be in any particular order. |
String |
getRecurrenceID(TemporalAccessor td)
This is a convenience method that returns a RECURRENCE-ID (in UTC time) from a
TemporalAccessor object. |
String |
getUIDfromDocument(Document document)
This is a convinience method that returns a UID for a calendar entry document.
NOTEID->UID is a many to one mapping since one or several documents may represent a calendar entry (especially if it repeats) and its related notices. |
String |
getUIDfromNoteID(Database dbMail,
int noteId)
This is a convinience method that returns a UID from a NOTEID.
NOTEID->UID is a many to one mapping since one or several notes may represent a calendar entry (especially if it repeats) and its related notices. |
String |
getUIDFromUNID(Database dbMail,
String unid)
This is a convinience method that returns a UID from a UNID.
UNID->UID is a many to one mapping since one or several notes may represent a calendar entry (especially if it repeats) and its related notices. As such, the UID output will be the same for all notes that refer to the same calendar entry. This method may incur a note open, so there could be performance impact. |
int |
getUnappliedNotices(Database dbMail,
String uid,
List<Integer> retNoteIds,
List<String> retUNIDs)
Retrieve the unapplied notices that exist for a participant of calendar entry representing a meeting.
This will return things like: Reschedules, informational updates, cancelations, confirmations, etc. Notices will only be returned if the initial invitation has already been responded to, otherwise this method will return ERR_INVITE_NOT_ACCEPTED. For recurring meetings, notices that apply to any instances in the series will be returned, with the exception of instances where the initial invitation has not yet been responded to. Calendar entries that are not meetings will return ERR_INVALID_NOTE. We do not currently support getting unprocessed calendar entries if you are the owner (such as a counter proposal request or a request for updated information), so this will return ERR_NOT_YET_IMPLEMENTED. Note: For recurring meetings, it is possible that multiple notices will contain current information for a particular occurence, so it is not possible to guarantee that there is a single "most current" notice. For example, the subject might be changed for a single instance, and then the time may be changed across instances. Because only one notice will have the current subject and another notice will have the current time but NOT the current subject, both notices will be returned and both must be processed to guarantee accuracy. Process returned notices via the CalNoticeAction method. |
void |
noticeAction(Database dbMail,
int noteId,
Collection<CalendarProcess> action,
String comment,
CalendarActionData data,
Collection<CalendarActionOptions> flags)
Process a calendar notice.
This makes the appropriate modifications to the calendar entry and also sends appropriate notices out. |
void |
noticeAction(Database dbMail,
String unid,
Collection<CalendarProcess> action,
String comment,
CalendarActionData data,
Collection<CalendarActionOptions> flags)
Process a calendar notice.
This makes the appropriate modifications to the calendar entry and also sends appropriate notices out. |
Document |
openCalendarEntryDocument(Database dbMail,
String uid,
String recurId,
Collection<CalendarDocumentOpen> flags)
This is a method to get a document for an entry on the calendar.
The intent is that the note handle can be used to get information about an entry or instance or to write additional information to the entry or instance (beyond what is defined in iCalendar and/or available in this API). |
String |
readCalendarEntry(Database dbMail,
String uid,
String recurId,
Collection<CalendarRead> flags)
This will return complete iCalendar data for the specified entry.
For recurring entries, this may result in multiple VEVENTs in the returned iCalendar data. In this case, the first VEVENT represents the recurrence set and additional entries represent exceptions to the recurrence set. All instances that differ from the recurrence set will be returned as additional VEVENTs containing the exceptional data. |
String |
readNotice(Database dbMail,
int noteId,
Collection<CalendarRead> flags)
This will return iCalendar data representing a notice with the specified NOTIED.
A notice may not yet be applied to the calendar entries itself, but an application may want to read the notice (and process it). Examples of notices include invitations, reschedules, information updates, confirmations, cancelations, counterproposals, requests for information, acceptances, declines, tenative acceptances, etc. |
String |
readNotice(Database dbMail,
String unid,
Collection<CalendarRead> flags)
This will return iCalendar data representing a notice with the specified NOTIED.
A notice may not yet be applied to the calendar entries itself, but an application may want to read the notice (and process it). Examples of notices include invitations, reschedules, information updates, confirmations, cancelations, counterproposals, requests for information, acceptances, declines, tenative acceptances, etc. |
void |
readRange(Database dbMail,
TemporalAccessor start,
TemporalAccessor end,
Appendable retICal,
List<String> retUIDs)
Gets a summary of calendar entries for a range of times
|
void |
readRange(Database dbMail,
TemporalAccessor start,
TemporalAccessor end,
int skipCount,
int maxRead,
Appendable retICal,
List<String> retUIDs)
Gets a summary of calendar entries for a range of times
|
void |
readRange(Database dbMail,
TemporalAccessor start,
TemporalAccessor end,
int skipCount,
int maxRead,
Collection<CalendarReadRange> readMask,
Appendable retICal,
List<String> retUIDs)
Gets a summary of calendar entries for a range of times
|
void |
updateCalendarEntry(Database dbMail,
String iCal,
String uid,
String recurId,
String comments,
Collection<CalendarWrite> flags)
This will modify an existing calendar entry.
This supports either single entries or recurring entries, but recurring entries will only support updates for a single instance specified via RECURRENCE-ID that may not include a RANGE (This may be permitted in the future but for now will return an error). The iCalendar input may only contain a single VEVENT and must contain a UID. By default, attachments and custom data (for fields contained in $CSCopyItems) will be maintained from the existing calendar entry. |
String createCalendarEntry(Database dbMail, String iCal, Collection<CalendarWrite> flags)
CalendarWrite.DISABLE_IMPLICIT_SCHEDULING
is specified)
The following errors will be thrown by this method:
ERR_NULL_DBHANDLE
- The database handle is NULLERR_NO_CALENDAR_FOUND
- Unable to find the entry because the required view does not exist in this databaseERR_ICAL2NOTE_CONVERT
- Error interpreting iCalendar inputERR_IMPLICIT_SCHED_FAILED
- Entry was updated, but errors were encountered sending notices to meeting participantsdbMail
- The database where the entry will be created.iCal
- The iCalendar data representing the entry to createflags
- CalendarWrite
flags to control non-default behaviorvoid updateCalendarEntry(Database dbMail, String iCal, String uid, String recurId, String comments, Collection<CalendarWrite> flags)
CalendarWrite.DISABLE_IMPLICIT_SCHEDULING
is specified).ERR_NULL_DBHANDLE
- The database handle is NULLERR_NO_CALENDAR_FOUND
- Unable to find the entry because the required view does not exist in this databaseERR_ICAL2NOTE_CONVERT
- Error interpereting iCalendar inputERR_IMPLICIT_SCHED_FAILED
- Entry was updated, but errors were encountered sending notices to meeting participantsdbMail
- The database containing the entry to updateiCal
- The iCalendar data representing the updated entryuid
- If non-NULL, this value MUST match the UID value in the iCalendar input. If present,or else this returns ERR_InvalidVEventPropertyFound. If the iCalendar input has no UID this value will be used.recurId
- If non-NULL, this value MUST match the RECURRENCE-ID value in the iCalendar input if present, or else this returns ERR_InvalidVEventPropertyFound. If the iCalendar input has no RECURRENCE-ID this value will be used.comments
- If non-NULL, this text will be sent as comments on any notices sent to meeting participants as a result of this call. that will be included on the notices. Can be NULL.flags
- CalendarWrite
flags to control non-default behavior. Supported: CAL_WRITE_MODIFY_LITERAL, CalendarWrite.DISABLE_IMPLICIT_SCHEDULING
, CalendarWrite.IGNORE_VERIFY_DB
.String getUIDfromDocument(Document document)
ERR_NULL_DBHANDLE
- The database handle is NULLdocument
- the documentString getUIDfromNoteID(Database dbMail, int noteId)
ERR_NULL_DBHANDLE
- The database handle is NULLdbMail
- The database containing the note referenced by noteid.noteId
- note idString getUIDFromUNID(Database dbMail, String unid)
ERR_NULL_DBHANDLE
- The database handle is NULLdbMail
- The database containing the note referenced by unid.unid
- UNID of a calendar noteString getApptUnidFromUID(String uid)
uid
- UID of the icalendar entryDocument openCalendarEntryDocument(Database dbMail, String uid, String recurId, Collection<CalendarDocumentOpen> flags)
ERR_NULL_DBHANDLE
- The database handle is NULLERR_NO_CALENDAR_FOUND
- Unable to find the entry because the required view does not exist in this databasedbMail
- The database containing the entry to open.uid
- The UID of the entry to get a note handle for.recurId
- The RECURRENCE-ID of the instance to get a note handle for. Timezones not permitted (time values must be in UTC time). NULL for single entries. Must be present for recurring entries.flags
- CalendarDocumentOpen
flags to control non-default behavior. Supported: CalendarDocumentOpen.HANDLE_NOSPLIT
.String readCalendarEntry(Database dbMail, String uid, String recurId, Collection<CalendarRead> flags)
recurId
and only the data for that instance will be returned.dbMail
- The database from which entries are returned.uid
- The UID of the entry to be returned.recurId
- NULL for single entries or to read data for an entire recurring series. If populated, this is the RECURRENCE-ID of the specific instance to read.flags
- CalendarRead
flags to control non-default behaviorvoid readRange(Database dbMail, TemporalAccessor start, TemporalAccessor end, Appendable retICal, List<String> retUIDs) throws IOException
dbMail
- The database from which entries are returned.start
- the start time of the rangeend
- the end time of the range. An exception occurs if the end time is not greater than the start timeretICal
- if not null, we return a summary in iCalendar format of the entries from the start date to the end date, inclusive. An exception occurs if the range contains no entries.retUIDs
- if not null, we return a list of UIDs found within the rangeIOException
- if writing iCalendar data failsvoid readRange(Database dbMail, TemporalAccessor start, TemporalAccessor end, int skipCount, int maxRead, Appendable retICal, List<String> retUIDs) throws IOException
dbMail
- The database from which entries are returned.start
- the start time of the rangeend
- the end time of the range. An exception occurs if the end time is not greater than the start timeskipCount
- the number of entries to skip from the beginning of the range. This parameter can be used in conjunction with entriesprocessed to read the entries in a series of callsmaxRead
- the maximum number of entries to readretICal
- if not null, we return a summary in iCalendar format of the entries from the start date to the end date, inclusive. An exception occurs if the range contains no entries.retUIDs
- if not null, we return a list of UIDs found within the rangeIOException
- if writing iCalendar data failsvoid readRange(Database dbMail, TemporalAccessor start, TemporalAccessor end, int skipCount, int maxRead, Collection<CalendarReadRange> readMask, Appendable retICal, List<String> retUIDs) throws IOException
dbMail
- The database from which entries are returned.start
- the start time of the rangeend
- the end time of the range. An exception occurs if the end time is not greater than the start timeskipCount
- the number of entries to skip from the beginning of the range. This parameter can be used in conjunction with entriesprocessed to read the entries in a series of callsmaxRead
- the maximum number of entries to readreadMask
- flags that control what properties about the calendar entries will be returnedretICal
- if not null, we return a summary in iCalendar format of the entries from the start date to the end date, inclusive. An exception occurs if the range contains no entries.retUIDs
- if not null, we return a list of UIDs found within the rangeIOException
- if writing iCalendar data failsString getRecurrenceID(TemporalAccessor td)
TemporalAccessor
object.td
- Input time/date objectint getUnappliedNotices(Database dbMail, String uid, List<Integer> retNoteIds, List<String> retUNIDs)
dbMail
- The database to search for calendar entriesuid
- The UID of the entry to return notices for.retNoteIds
- return list of note ids or NULLretUNIDs
- return list of UNIDs or NULLint getNewInvitations(Database dbMail, TemporalAccessor start, String uid, TemporalAccessor since, AtomicReference<DominoDateTime> retUntil, List<Integer> retNoteIds, List<String> retUNIDs)
getUnappliedNotices(Database, String, List, List)
must be used (on a per-UID level).getNewInvitations(com.hcl.domino.data.Database, java.time.temporal.TemporalAccessor, java.lang.String, java.time.temporal.TemporalAccessor, java.util.concurrent.atomic.AtomicReference<com.hcl.domino.data.DominoDateTime>, java.util.List<java.lang.Integer>, java.util.List<java.lang.String>)
by using tdSince and ptdretUntil.If uid
is provided, invitations only for a
particular meeting will be returned.dbMail
- The database from which entries are returned.start
- Optional: If provided, only invitations for meetings that occur on or after this time will be returned.Passing in NULL will use the default value (one day before current time).uid
- Optional: If present only invitations with a matching UID will be returned. Note: For some repeating meetings there could be multiple invites for the same UID (for separate instances).since
- Optional: Only return invitations that have been received/modified since the provided time.Passing in NULL will return invitations regardless of when they arrived.retUntil
- Optional: If provided, this is populated with the time of this method call, which can then be used as the ptdSince argument of a subsequent call.retNoteIds
- return list of note ids or NULLretUNIDs
- return list of UNIDs or NULLString readNotice(Database dbMail, int noteId, Collection<CalendarRead> flags)
dbMail
- The database from which entries are returned.noteId
- The NOTEID of the notice to be returned.flags
- CalendarRead
flags to control non-default behavior. Supported: CalendarRead.HIDE_X_LOTUS
, CalendarRead.INCLUDE_X_LOTUS
.String readNotice(Database dbMail, String unid, Collection<CalendarRead> flags)
dbMail
- The database from which entries are returned.unid
- The UNID of the notice to be returned.flags
- CalendarRead
flags to control non-default behavior. Supported: CalendarRead.HIDE_X_LOTUS
, CalendarRead.INCLUDE_X_LOTUS
.void entryAction(Database dbMail, String uid, String recurId, Collection<CalendarProcess> action, CalendarRangeRepeat scope, String comment, CalendarActionData data, Collection<CalendarActionOptions> flags)
CalendarProcess.DELETE
,
which can be applied to any calendar entry).dbMail
- The database containing calendar entries to act onuid
- The UID of the entry to act onrecurId
- The RECURRENCE-ID of the instance to act on. May be specified for recurring meetings (omission acts on all). MUST be NULL for single meetings. Timezones not permitted (time values must be in UTC time)action
- The action to perform as defined in CalendarProcess
valuesscope
- CalendarRangeRepeat
as defined above (ignored for non-repeating entries)comment
- Comments to include on the outgoing notice(s) to organizer or participants (can be NULL).data
- Conveys any additional information required to perform action
- NULL for actions that do not require additional information to perform, required for CalendarProcess.DELEGATE
, CalendarProcess.DECLINE
and CalendarProcess.COUNTER
and CalendarProcess.UPDATEINVITEES
.flags
- Flags - Only CalendarActionOptions.UPDATE_ALL_PARTICIPANTS
is allowed (and only for CalendarProcess.UPDATEINVITEES
void noticeAction(Database dbMail, int noteId, Collection<CalendarProcess> action, String comment, CalendarActionData data, Collection<CalendarActionOptions> flags)
dbMail
- The database containing the notice to act on.noteId
- The noteid of the notice to act on.action
- The action to perform as defined in CalendarProcess
values.comment
- Comments to include on the outgoing notice(s) to organizer or participants (can be NULL).data
- Conveys any additional information required to perform action
- NULL for actions that do not require additional information to perform, required for CalendarProcess.DELEGATE
and CalendarProcess.COUNTER
flags
- Flags - (a CalendarActionOptions
value).void noticeAction(Database dbMail, String unid, Collection<CalendarProcess> action, String comment, CalendarActionData data, Collection<CalendarActionOptions> flags)
dbMail
- The database containing the notice to act on.unid
- The UNID of the notice to act onaction
- The action to perform as defined in CalendarProcess
values.comment
- Comments to include on the outgoing notice(s) to organizer or participants (can be NULL).data
- Conveys any additional information required to perform action
- NULL for actions that do not require additional information to perform, required for CalendarProcess.DELEGATE
and CalendarProcess.COUNTER
flags
- Flags - (a CalendarActionOptions
value).CalendarActionData buildActionData()
Copyright © 2019–2021 HCL. All rights reserved.