SlideShare a Scribd company logo
1 of 37
Download to read offline
© 2013 Wellesley Information Services. All rights reserved.
C&S APIs in
IBM Notes and Domino
Dave Delay
IBM
2
Please Note ...
IBM’s statements regarding its plans, directions, and intent are subject to change or
withdrawal without notice at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general product
direction and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a commitment,
promise, or legal obligation to deliver any material, code or functionality. Information
about potential future products may not be incorporated into any contract. The
development, release, and timing of any future features or functionality described for our
products remains at our sole discretion.
3
What We’ll Cover …
• Overview of C&S APIs
• C&S in the C API toolkit
• C&S in LotusScript, Java and SSJS
• REST calendar service
• Wrap-up
4
9.0 Social Edition C&S API Design Goals
• Allow an application to manage data on a user's calendar
 Includes robust and reliable scheduling
 Does not include ToDos, busy-time, and rooms & resources
• Keep it simple
 Encapsulate the Notes/Domino data and recurrence model
 Leverage the iCalendar standard
• Available to developers working in C/C++, LotusScript, Java and
server-side JavaScript
• Easily expandable in future releases
5
C&S APIs Available in 9.0 Social Edition
C API Toolkit (calapi.h)
Java Wrappers
LotusScript
Wrappers
Core C&S Logic
NotesCalendar Back-end Classes
Customer
solutions
using
LotusScript
Customer solutions using
Notes Java API
Customer
solutions
using C / C++
Customer
solutions
using
SSJS
JS Wrappers
• One C&S implementation; multiple interfaces
• All four interfaces are new in 9.0
6
What is iCalendar?
• Text-based, standard representation of calendar data (see
RFC5545)
• Open source iCalendar libraries available (e.g. ical4j & libical)
iCalendar Example:
BEGIN:VCALENDAR
PRODID:-//Renovations Inc//MyApp 1.0//EN
BEGIN:VEVENT
DTSTART:20130204T140000Z
DTEND:20130204T143000Z
SUMMARY:Team meeting
ORGANIZER;CN="Samantha Daryn":mailto:sdaryn@renovations.com
ATTENDEE;CN="Ted Amado":mailto:tamado@renovations.com
DESCRIPTION:Discuss status
LOCATION:My office
END:VEVENT
END:VCALENDAR
7
C&S API Features
• Working with calendar entries
 Read a range of entries
 Create, read, update or delete an individual calendar entry
 Implicit scheduling for meetings
 Simple actions on meetings (decline, delegate, cancel, etc.)
 Complete support for repeating entries
 Support for all entry types (meetings, appointments, all day
events, anniversaries, reminders)
• Working with calendar notices
 Read the list of new invitations
 Read a list of unapplied notices (for an entry)
 Process a notice (accept, decline, delegate, counter, etc.)
8
What We’ll Cover …
• Overview of C&S APIs
• C&S in the C API toolkit
• C&S in LotusScript, Java and SSJS
• REST calendar service
• Wrap-up
9
C&S in the C API Toolkit
• All functions defined in calapi.h
• The C API is the foundation for all other
language bindings
• Implemented using core C&S and iCalendar logic
• Can be used with open source libical
C API Toolkit (calapi.h)
Core C&S Logic
Customer
solutions
using C / C++
10
A Few Calendar Entry Functions (C API)
• Read the iCalendar representation for a range of events
 STATUS CalReadRange(DBHANDLE hDB, TIMEDATE tdStart,
TIMEDATE tdEnd, ...);
• Read the iCalendar for a single event
 STATUS CalReadEntry(DBHANDLE hDB, const char* pszUID,
const char* pszRecurID, ...);
• Create a new event from iCalendar
 STATUS CalCreateEntry(DBHANDLE hDB, const char*
pszCalEntry, DWORD dwFlags, ...);
11
A Few Calendar Notice Functions (C API)
• Get a list of new invitations
 STATUS CalGetNewInvitations(DBHANDLE hDB, TIMEDATE*
ptdStart, ...);
• Get a list of notices for a single event
 STATUS CalGetUnappliedNotices(DBHANDLE hDB, const char*
pszUID, ...);
• Process a single notice (accept, decline, etc.)
 STATUS CalNoticeAction(DBHANDLE hDB, NOTEID noteID,
DWORD dwAction, ...);
12
Debugging the C API functions
• Notes.ini setting for tracing the C&S API
 CSDebugAPI=1
• This works for the LotusScript, Java and SSJS classes too
Sample console log:
[268C:000A-188C] 04/05/2013 09:03:30.65 AM [CS API]> Enter CalReadEntry,
UID:A6F3B8508B90461A85257B4100601786-Lotus_Notes_Generated, RID:NULL, Flags:0x0.
[268C:000A-188C] 04/05/2013 09:03:30.69 AM [CS API]> Exit CalReadEntry,
return:0x0000, No error.
[268C:000A-188C] 04/05/2013 09:07:49.97 AM [CS API]> Enter CalCreateEntry,
Flags:0x0.
[268C:000A-188C] 04/05/2013 09:07:50.45 AM [CS API]> PRODID required in C&S API
input but was not found
[268C:000A-188C] 04/05/2013 09:07:50.45 AM [CS API]> Error |
ConvertIcal2NoteRequest.cpp(189) : Missing VEvent components (0x892)
[268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error |
VersitInterface.cpp(1769) : Missing VEvent components (0x892)
[268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error |
VersitInterface.cpp(1966) : Missing VEvent components (0x892)
[268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error |
calendarapiworker.cpp(405) : Missing VEvent components (0x892)
[268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Exit CalCreateEntry,
return:0x0892, Missing VEvent components.
[268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error | calendarapi.c(370) :
Missing VEvent components (0x892)
13
C API Documentation
• A complete function reference is included in the C API toolkit
• The calapi.h file also has lots of useful comments
Sample comment:
/*********************************************************************************
* CalReadRange
* This will return data for all entries that begin within a specified date range,
* with paging capabilities (similar to NIFReadEntries) in cases where there is
* more data than can be returned in a single call.
* Specifically, this can return one or both of:
* 1) iCalendar generated from view level data about the calendar entries in the
* date range
* 2) A list of UIDs for each calendar entry in the date range
*
* ...
*
* Inputs: ...
*
* Outputs: ...
*
* Returns: ...
*/
14
What We’ll Cover …
• Overview of C&S APIs
• C&S in the C API toolkit
• C&S in LotusScript, Java and SSJS
• REST calendar service
• Wrap-up
15
C&S in LotusScript, Java & SSJS
• One object model
 NotesCalendar
 NotesCalendarEntry
 NotesCalendarNotice
• Three language bindings
• Java developers can use
open source ical4j
C API Toolkit (calapi.h)
Java Wrappers
LotusScript
Wrappers
Core C&S Logic
NotesCalendar Back-end Classes
Customer
solutions
using
LotusScript
Customer
solutions
using
Notes Java
API
Customer
solutions
using
SSJS
JS Wrappers
16
C&S Backend Classes
Session
getCalendar(Database db) NotesCalendar
readRange(...)
getEntry(String uid)
createEntry(String ical)
getNewInvitations()
NotesCalendarEntry
read()
update(String ical)
remove()
delegate(...)
...
getNotices()
NotesCalendarNotice
read()
accept()
decline()
delegate(...)
...
17
A Few Calendar Entry Methods (Java)
• Read the iCalendar representation for a range of events
 (NotesCalendar class) String readRange(DateTime start,
DateTime end);
• Read the iCalendar for a single event
 (NotesEntryCalendar class) String read();
• Create a new event from iCalendar
 (NotesCalendar class) NotesCalendarEntry createEntry(String
icalentry);
Compare
these
methods
with the
equivalent C
functions.
18
A Few Calendar Notice Methods (Java)
• Get a list of new invitations
 (NotesCalendar class) Vector getNewInvitations(DateTime start,
DateTime since);
• Get a list of notices for a single event
 (NotesCalendarEntry class) Vector getNotices();
• Process a single notice (accept, decline, etc.)
 (NotesCalendarNotice class) void accept(String comments);
 (NotesCalendarNotice class) void decline(String comments);
19
C&S Java API Demo
20
Tips for Using the C&S Backend Classes
• Remember the Notes.ini setting
 CSDebugAPI=1
• Don't forget to recycle (Java and SSJS)
 For example NotesCalendarEntry.recycle() frees any native
memory associated with the entry
 Particularly important when the parent database and session
remain open
• See the NotesError class for useful error codes (Java and SSJS)
 NOTES_ERR_ERRSENDINGNOTICES
 NOTES_ERR_NOTACCEPTED
 NOTES_ERR_NEWERVERSIONEXISTS, etc.
21
C&S Backend Classes Documentation
• See Domino Designer for help on each language binding
• LotusScript help
 IBM Domino Designer Basic User Guide and Reference >
LotusScript/COM/OLE Classes > LotusScript Classes A-Z > NotesCalendar
(LotusScript)
• Java help
 IBM Domino Designer Basic User Guide and Reference > Java/CORBA
Classes > Java Classes A-Z > NotesCalendar (Java)
• Server-side JavaScript help
 IBM Domino Designer XPages Reference > Domino > NotesCalendar
(JavaScript)
22
What We’ll Cover …
• Overview of C&S APIs
• C&S in the C API toolkit
• C&S in LotusScript, Java and SSJS
• REST calendar service
• Wrap-up
23
Review of C&S APIs Available in 9.0 Social Edition
C API Toolkit (calapi.h)
Java Wrappers
LotusScript
Wrappers
Core C&S Logic
NotesCalendar Back-end Classes
Customer
solutions
using
LotusScript
Customer solutions using
Notes Java API
Customer
solutions
using C / C++
Customer
solutions
using
SSJS
JS Wrappers
• Each interface works on either Notes or Domino
• But your application must be co-located with Notes or Domino
24
C&S APIs Planned for 9.x
C API Toolkit (calapi.h)
Java Wrappers
LotusScript
Wrappers
Core C&S Logic
NotesCalendar Back-end Classes
Customer
solutions
using
LotusScript
Customer
solutions
using
Notes Java
API
Customer
solutions
using C / C++
Customer
solutions
using
SSJS
JS Wrappers
Customer
solutions
using
REST
REST Service
HTTP
• Calendar service will provide remote access to the
same C&S implementation
25
Calendar Service Design
• Accessible from any HTTP client
 Web applications (Dojo, jQuery, etc.)
 Native mobile applications
 Open Social gadgets
 Server-to-server applications
• Keep it simple
 Uses the C&S back-end classes
 Uses any authentication scheme supported by Domino (basic,
session, SAML, etc.)
 Same syntax as other IBM services
26
Calendar Service Design (continued)
• Functional design
 Create, read, update and delete calendar entries
 Get a list of new invitations or unapplied notices
 Simple actions to process entries and notices
 Control implicit scheduling
• Resource-oriented
 Calendars, events and notices are resources – each with a
unique URL
 Use simple verbs to act on resources (GET, PUT, POST &
DELETE)
 Navigate between resources
27
iCalendar vs. JSON
• Most calendar service requests support either iCalendar or JSON
• JSON may be easier to use with JavaScript
• iCalendar may be easier to use with an open source parser / generator (ical4j,
libical, etc.)
JSON event:
{
"events": [
{
"id": "8A3941390301436885257AD700661DAE",
"summary": "Super Bowl XLVII",
"location": "New Orleans",
"start": {
"date": "2013-02-03",
"time": "23:30:00",
"utc": true
},
"end": {
"date": "2013-02-04",
"time": "03:00:00",
"utc": true
}
}
]
}
iCalendar event:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Lotus ... //NONSGML ...
BEGIN:VEVENT
DTSTART:20130203T233000Z
DTEND:20130204T030000Z
LAST-MODIFIED:20121217T183957Z
DTSTAMP:20121217T184244Z
SUMMARY:Super Bowl XLVII
LOCATION:New Orleans
UID:8A3941390301436885257AD700661DAE
END:VEVENT
END:VCALENDAR
28
A Few Calendar Entry Requests (REST)
• Read a range of events (JSON or iCalendar)
 GET /{database}/api/calendar/events
 GET /{database}/api/calendar/events?format=icalendar
• Read a single event (JSON or iCalendar)
 GET /{database}/api/calendar/events/{uid}
 GET /{database}/api/calendar/events/{uid}?format=icalendar
• Create a new event
 POST /{database}/api/calendar/events
Compare
these REST
requests
with the
other C&S
APIs.
29
A Few Calendar Notice Requests (REST)
• Get a list of new invitations
 GET /{database}/api/calendar/invitations
• Get a list of notices for a single event
 GET /{database}/api/calendar/events/{uid}/notices
• Process a single notice (accept, decline, etc.)
 PUT /{database}/api/calendar/events/{uid}/action?type={action}
30
Sample JSON Response
• Read a range of events
 GET /{database}/api/calendar/events
JSON response:
{
"events": [
{
"id": "8A3941390301436885257AD700661DAE",
"summary": "Super Bowl XLVII",
"location": "New Orleans",
"start": {
"date": "2013-02-03",
"time": "23:30:00",
"utc": true
},
"end": {
"date": "2013-02-04",
"time": "03:00:00",
"utc": true
}
},
{
"id": "09C4206D7BD743D685257AB0007BA513",
"summary": "Repeating Appointment",
"location": "test",
"start": {...},
"end": {...}
}, ...
]
}
31
Sample iCalendar Response
• Read a range of events
 GET /{database}/api/calendar/events?format=icalendar
iCalendar response:
BEGIN:VCALENDAR
X-LOTUS-CHARSET:UTF-8
VERSION:2.0
BEGIN:VEVENT
DTSTART:20130203T233000Z
DTEND:20130204T030000Z
SUMMARY:Super Bowl XLVII
LOCATION:New Orleans
UID:8A3941390301436885257AD700661DAE
X-LOTUS-SUMMARYDATAONLY:TRUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20130205T140000Z
DTEND:20130205T150000Z
SUMMARY:Repeating Appointment
LOCATION:test
UID:09C4206D7BD743D685257AB0007BA513
X-LOTUS-SUMMARYDATAONLY:TRUE
END:VEVENT
...
END:VCALENDAR
32
Calendar Service Demo
33
Calendar Service Release Plan
• Like other REST services, it will be released on OpenNTF first
 Part of the XPages Extension Library
 Available to early adopters, source included
 Limited support by the OpenNTF community
• Product release vehicle is TBD
• More on the extension library development model:
Continuous development released as open source
8.5.3 UP1
N/D 8.5.3 N/D 9.0 Social Edition
9.0 UP1 (not in plan)
34
What We’ll Cover …
• Overview of C&S APIs
• C&S in the C API toolkit
• C&S in LotusScript, Java and SSJS
• REST calendar service
• Wrap-up
35
Additional Resources
• www-01.ibm.com/software/lotus/category/messaging
 IBM Notes and Domino 9.0 Social Edition
• www-10.lotus.com/ldd/ddwiki.nsf
 IBM Notes and Domino Application Development Wiki
• extlib.openntf.org
 Extension library on OpenNTF
• tools.ietf.org/pdf/rfc5545.pdf
 iCalendar standard specification
• ical4j.sourceforge.net/index.html
 Java library for parsing and generating iCalendar
36
7 Key Points to Take Home
• One C&S implementation; multiple interfaces
• iCalendar model encapsulates internal complexity
• Take advantage of implicit scheduling
• Choose an open source iCalendar library
• Use CSDebugAPI=1 for development
• Watch OpenNTF for the REST calendar service
• REST services are strategically important for remote access to
Domino
37
Your Turn!
How to contact me:
Dave Delay
ddelay@us.ibm.com

More Related Content

What's hot

Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureVijay Rastogi
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateBohdan Dovhań
 
Post-mortem Debugging of Windows Applications
Post-mortem Debugging of  Windows ApplicationsPost-mortem Debugging of  Windows Applications
Post-mortem Debugging of Windows ApplicationsGlobalLogic Ukraine
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Massimo Oliviero
 
01 Introduction to programming
01 Introduction to programming01 Introduction to programming
01 Introduction to programmingmaznabili
 
Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Bohdan Dovhań
 
Db2 version 9 for linux, unix, and windows
Db2 version 9 for linux, unix, and windowsDb2 version 9 for linux, unix, and windows
Db2 version 9 for linux, unix, and windowsbupbechanhgmail
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer InternalsKyungmin Lee
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]David Buck
 
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!ddrschiw
 
Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Antoine Sabot-Durand
 
GBDC 勉強会 #6 Java イベントレポート 2016
GBDC 勉強会 #6 Java イベントレポート 2016GBDC 勉強会 #6 Java イベントレポート 2016
GBDC 勉強会 #6 Java イベントレポート 2016Yutaka Kato
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]David Buck
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first appAlessio Ricco
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]David Buck
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)DroidConTLV
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationrtretola
 

What's hot (20)

Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structureAndroid App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
 
Introduction to Programming Lesson 01
Introduction to Programming Lesson 01Introduction to Programming Lesson 01
Introduction to Programming Lesson 01
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 Update
 
Post-mortem Debugging of Windows Applications
Post-mortem Debugging of  Windows ApplicationsPost-mortem Debugging of  Windows Applications
Post-mortem Debugging of Windows Applications
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
01 Introduction to programming
01 Introduction to programming01 Introduction to programming
01 Introduction to programming
 
Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)
 
Db2 version 9 for linux, unix, and windows
Db2 version 9 for linux, unix, and windowsDb2 version 9 for linux, unix, and windows
Db2 version 9 for linux, unix, and windows
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer Internals
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]
 
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!
Ad108 - XPages in the IBM Lotus Notes Client - A Deep Dive!
 
Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014
 
GBDC 勉強会 #6 Java イベントレポート 2016
GBDC 勉強会 #6 Java イベントレポート 2016GBDC 勉強会 #6 Java イベントレポート 2016
GBDC 勉強会 #6 Java イベントレポート 2016
 
VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first app
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
 
Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)Using the Android Native Development Kit (NDK)
Using the Android Native Development Kit (NDK)
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR application
 

Similar to C&S APIs in IBM Notes and Domino

IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By ExampleIBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By ExampleIBM Connections Developers
 
Why use Gitlab
Why use GitlabWhy use Gitlab
Why use Gitlababenyeung1
 
Why and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company GrowsWhy and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company GrowsNGINX, Inc.
 
Serverless Computing
Serverless ComputingServerless Computing
Serverless ComputingAnand Gupta
 
Suite Script 2.0 API Basics
Suite Script 2.0 API BasicsSuite Script 2.0 API Basics
Suite Script 2.0 API BasicsJimmy Butare
 
Virtual training intro to InfluxDB - June 2021
Virtual training  intro to InfluxDB  - June 2021Virtual training  intro to InfluxDB  - June 2021
Virtual training intro to InfluxDB - June 2021InfluxData
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsKonveyor Community
 
DB2 Accounting Reporting
DB2  Accounting ReportingDB2  Accounting Reporting
DB2 Accounting ReportingJohn Campbell
 
Tips and Tricks for Swift & Dot Swift 2016
Tips and Tricks for Swift & Dot Swift 2016Tips and Tricks for Swift & Dot Swift 2016
Tips and Tricks for Swift & Dot Swift 2016Adam Gask
 
Dev buchan leveraging the notes c api
Dev buchan leveraging the notes c apiDev buchan leveraging the notes c api
Dev buchan leveraging the notes c apiBill Buchan
 
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksLessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksDatabricks
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.Renzo Tomà
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...Ambassador Labs
 
Balamurugan msbi cv
Balamurugan msbi cvBalamurugan msbi cv
Balamurugan msbi cvbala murugan
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalNAVER D2
 
MineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White PaperMineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White PaperDerek Diamond
 
Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4GraphAware
 
Jit builder status and directions 2018 03-28
Jit builder status and directions 2018 03-28Jit builder status and directions 2018 03-28
Jit builder status and directions 2018 03-28Mark Stoodley
 
Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11Remedy IT
 

Similar to C&S APIs in IBM Notes and Domino (20)

IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By ExampleIBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
 
Why use Gitlab
Why use GitlabWhy use Gitlab
Why use Gitlab
 
Why and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company GrowsWhy and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company Grows
 
Serverless Computing
Serverless ComputingServerless Computing
Serverless Computing
 
Suite Script 2.0 API Basics
Suite Script 2.0 API BasicsSuite Script 2.0 API Basics
Suite Script 2.0 API Basics
 
Virtual training intro to InfluxDB - June 2021
Virtual training  intro to InfluxDB  - June 2021Virtual training  intro to InfluxDB  - June 2021
Virtual training intro to InfluxDB - June 2021
 
Tackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy ApplicationsTackle Containerization Advisor (TCA) for Legacy Applications
Tackle Containerization Advisor (TCA) for Legacy Applications
 
DB2 Accounting Reporting
DB2  Accounting ReportingDB2  Accounting Reporting
DB2 Accounting Reporting
 
AMIS Oracle OpenWorld 2015 Review – part 3- PaaS Database, Integration, Ident...
AMIS Oracle OpenWorld 2015 Review – part 3- PaaS Database, Integration, Ident...AMIS Oracle OpenWorld 2015 Review – part 3- PaaS Database, Integration, Ident...
AMIS Oracle OpenWorld 2015 Review – part 3- PaaS Database, Integration, Ident...
 
Tips and Tricks for Swift & Dot Swift 2016
Tips and Tricks for Swift & Dot Swift 2016Tips and Tricks for Swift & Dot Swift 2016
Tips and Tricks for Swift & Dot Swift 2016
 
Dev buchan leveraging the notes c api
Dev buchan leveraging the notes c apiDev buchan leveraging the notes c api
Dev buchan leveraging the notes c api
 
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at DatabricksLessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
 
Balamurugan msbi cv
Balamurugan msbi cvBalamurugan msbi cv
Balamurugan msbi cv
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
MineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White PaperMineDB Mineral Resource Evaluation White Paper
MineDB Mineral Resource Evaluation White Paper
 
Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4
 
Jit builder status and directions 2018 03-28
Jit builder status and directions 2018 03-28Jit builder status and directions 2018 03-28
Jit builder status and directions 2018 03-28
 
Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11Model Driven, Component Based Development for CBDDS and IDL to C++11
Model Driven, Component Based Development for CBDDS and IDL to C++11
 

Recently uploaded

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 

Recently uploaded (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 

C&S APIs in IBM Notes and Domino

  • 1. © 2013 Wellesley Information Services. All rights reserved. C&S APIs in IBM Notes and Domino Dave Delay IBM
  • 2. 2 Please Note ... IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.
  • 3. 3 What We’ll Cover … • Overview of C&S APIs • C&S in the C API toolkit • C&S in LotusScript, Java and SSJS • REST calendar service • Wrap-up
  • 4. 4 9.0 Social Edition C&S API Design Goals • Allow an application to manage data on a user's calendar  Includes robust and reliable scheduling  Does not include ToDos, busy-time, and rooms & resources • Keep it simple  Encapsulate the Notes/Domino data and recurrence model  Leverage the iCalendar standard • Available to developers working in C/C++, LotusScript, Java and server-side JavaScript • Easily expandable in future releases
  • 5. 5 C&S APIs Available in 9.0 Social Edition C API Toolkit (calapi.h) Java Wrappers LotusScript Wrappers Core C&S Logic NotesCalendar Back-end Classes Customer solutions using LotusScript Customer solutions using Notes Java API Customer solutions using C / C++ Customer solutions using SSJS JS Wrappers • One C&S implementation; multiple interfaces • All four interfaces are new in 9.0
  • 6. 6 What is iCalendar? • Text-based, standard representation of calendar data (see RFC5545) • Open source iCalendar libraries available (e.g. ical4j & libical) iCalendar Example: BEGIN:VCALENDAR PRODID:-//Renovations Inc//MyApp 1.0//EN BEGIN:VEVENT DTSTART:20130204T140000Z DTEND:20130204T143000Z SUMMARY:Team meeting ORGANIZER;CN="Samantha Daryn":mailto:sdaryn@renovations.com ATTENDEE;CN="Ted Amado":mailto:tamado@renovations.com DESCRIPTION:Discuss status LOCATION:My office END:VEVENT END:VCALENDAR
  • 7. 7 C&S API Features • Working with calendar entries  Read a range of entries  Create, read, update or delete an individual calendar entry  Implicit scheduling for meetings  Simple actions on meetings (decline, delegate, cancel, etc.)  Complete support for repeating entries  Support for all entry types (meetings, appointments, all day events, anniversaries, reminders) • Working with calendar notices  Read the list of new invitations  Read a list of unapplied notices (for an entry)  Process a notice (accept, decline, delegate, counter, etc.)
  • 8. 8 What We’ll Cover … • Overview of C&S APIs • C&S in the C API toolkit • C&S in LotusScript, Java and SSJS • REST calendar service • Wrap-up
  • 9. 9 C&S in the C API Toolkit • All functions defined in calapi.h • The C API is the foundation for all other language bindings • Implemented using core C&S and iCalendar logic • Can be used with open source libical C API Toolkit (calapi.h) Core C&S Logic Customer solutions using C / C++
  • 10. 10 A Few Calendar Entry Functions (C API) • Read the iCalendar representation for a range of events  STATUS CalReadRange(DBHANDLE hDB, TIMEDATE tdStart, TIMEDATE tdEnd, ...); • Read the iCalendar for a single event  STATUS CalReadEntry(DBHANDLE hDB, const char* pszUID, const char* pszRecurID, ...); • Create a new event from iCalendar  STATUS CalCreateEntry(DBHANDLE hDB, const char* pszCalEntry, DWORD dwFlags, ...);
  • 11. 11 A Few Calendar Notice Functions (C API) • Get a list of new invitations  STATUS CalGetNewInvitations(DBHANDLE hDB, TIMEDATE* ptdStart, ...); • Get a list of notices for a single event  STATUS CalGetUnappliedNotices(DBHANDLE hDB, const char* pszUID, ...); • Process a single notice (accept, decline, etc.)  STATUS CalNoticeAction(DBHANDLE hDB, NOTEID noteID, DWORD dwAction, ...);
  • 12. 12 Debugging the C API functions • Notes.ini setting for tracing the C&S API  CSDebugAPI=1 • This works for the LotusScript, Java and SSJS classes too Sample console log: [268C:000A-188C] 04/05/2013 09:03:30.65 AM [CS API]> Enter CalReadEntry, UID:A6F3B8508B90461A85257B4100601786-Lotus_Notes_Generated, RID:NULL, Flags:0x0. [268C:000A-188C] 04/05/2013 09:03:30.69 AM [CS API]> Exit CalReadEntry, return:0x0000, No error. [268C:000A-188C] 04/05/2013 09:07:49.97 AM [CS API]> Enter CalCreateEntry, Flags:0x0. [268C:000A-188C] 04/05/2013 09:07:50.45 AM [CS API]> PRODID required in C&S API input but was not found [268C:000A-188C] 04/05/2013 09:07:50.45 AM [CS API]> Error | ConvertIcal2NoteRequest.cpp(189) : Missing VEvent components (0x892) [268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error | VersitInterface.cpp(1769) : Missing VEvent components (0x892) [268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error | VersitInterface.cpp(1966) : Missing VEvent components (0x892) [268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error | calendarapiworker.cpp(405) : Missing VEvent components (0x892) [268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Exit CalCreateEntry, return:0x0892, Missing VEvent components. [268C:000A-188C] 04/05/2013 09:07:50.49 AM [CS API]> Error | calendarapi.c(370) : Missing VEvent components (0x892)
  • 13. 13 C API Documentation • A complete function reference is included in the C API toolkit • The calapi.h file also has lots of useful comments Sample comment: /********************************************************************************* * CalReadRange * This will return data for all entries that begin within a specified date range, * with paging capabilities (similar to NIFReadEntries) in cases where there is * more data than can be returned in a single call. * Specifically, this can return one or both of: * 1) iCalendar generated from view level data about the calendar entries in the * date range * 2) A list of UIDs for each calendar entry in the date range * * ... * * Inputs: ... * * Outputs: ... * * Returns: ... */
  • 14. 14 What We’ll Cover … • Overview of C&S APIs • C&S in the C API toolkit • C&S in LotusScript, Java and SSJS • REST calendar service • Wrap-up
  • 15. 15 C&S in LotusScript, Java & SSJS • One object model  NotesCalendar  NotesCalendarEntry  NotesCalendarNotice • Three language bindings • Java developers can use open source ical4j C API Toolkit (calapi.h) Java Wrappers LotusScript Wrappers Core C&S Logic NotesCalendar Back-end Classes Customer solutions using LotusScript Customer solutions using Notes Java API Customer solutions using SSJS JS Wrappers
  • 16. 16 C&S Backend Classes Session getCalendar(Database db) NotesCalendar readRange(...) getEntry(String uid) createEntry(String ical) getNewInvitations() NotesCalendarEntry read() update(String ical) remove() delegate(...) ... getNotices() NotesCalendarNotice read() accept() decline() delegate(...) ...
  • 17. 17 A Few Calendar Entry Methods (Java) • Read the iCalendar representation for a range of events  (NotesCalendar class) String readRange(DateTime start, DateTime end); • Read the iCalendar for a single event  (NotesEntryCalendar class) String read(); • Create a new event from iCalendar  (NotesCalendar class) NotesCalendarEntry createEntry(String icalentry); Compare these methods with the equivalent C functions.
  • 18. 18 A Few Calendar Notice Methods (Java) • Get a list of new invitations  (NotesCalendar class) Vector getNewInvitations(DateTime start, DateTime since); • Get a list of notices for a single event  (NotesCalendarEntry class) Vector getNotices(); • Process a single notice (accept, decline, etc.)  (NotesCalendarNotice class) void accept(String comments);  (NotesCalendarNotice class) void decline(String comments);
  • 20. 20 Tips for Using the C&S Backend Classes • Remember the Notes.ini setting  CSDebugAPI=1 • Don't forget to recycle (Java and SSJS)  For example NotesCalendarEntry.recycle() frees any native memory associated with the entry  Particularly important when the parent database and session remain open • See the NotesError class for useful error codes (Java and SSJS)  NOTES_ERR_ERRSENDINGNOTICES  NOTES_ERR_NOTACCEPTED  NOTES_ERR_NEWERVERSIONEXISTS, etc.
  • 21. 21 C&S Backend Classes Documentation • See Domino Designer for help on each language binding • LotusScript help  IBM Domino Designer Basic User Guide and Reference > LotusScript/COM/OLE Classes > LotusScript Classes A-Z > NotesCalendar (LotusScript) • Java help  IBM Domino Designer Basic User Guide and Reference > Java/CORBA Classes > Java Classes A-Z > NotesCalendar (Java) • Server-side JavaScript help  IBM Domino Designer XPages Reference > Domino > NotesCalendar (JavaScript)
  • 22. 22 What We’ll Cover … • Overview of C&S APIs • C&S in the C API toolkit • C&S in LotusScript, Java and SSJS • REST calendar service • Wrap-up
  • 23. 23 Review of C&S APIs Available in 9.0 Social Edition C API Toolkit (calapi.h) Java Wrappers LotusScript Wrappers Core C&S Logic NotesCalendar Back-end Classes Customer solutions using LotusScript Customer solutions using Notes Java API Customer solutions using C / C++ Customer solutions using SSJS JS Wrappers • Each interface works on either Notes or Domino • But your application must be co-located with Notes or Domino
  • 24. 24 C&S APIs Planned for 9.x C API Toolkit (calapi.h) Java Wrappers LotusScript Wrappers Core C&S Logic NotesCalendar Back-end Classes Customer solutions using LotusScript Customer solutions using Notes Java API Customer solutions using C / C++ Customer solutions using SSJS JS Wrappers Customer solutions using REST REST Service HTTP • Calendar service will provide remote access to the same C&S implementation
  • 25. 25 Calendar Service Design • Accessible from any HTTP client  Web applications (Dojo, jQuery, etc.)  Native mobile applications  Open Social gadgets  Server-to-server applications • Keep it simple  Uses the C&S back-end classes  Uses any authentication scheme supported by Domino (basic, session, SAML, etc.)  Same syntax as other IBM services
  • 26. 26 Calendar Service Design (continued) • Functional design  Create, read, update and delete calendar entries  Get a list of new invitations or unapplied notices  Simple actions to process entries and notices  Control implicit scheduling • Resource-oriented  Calendars, events and notices are resources – each with a unique URL  Use simple verbs to act on resources (GET, PUT, POST & DELETE)  Navigate between resources
  • 27. 27 iCalendar vs. JSON • Most calendar service requests support either iCalendar or JSON • JSON may be easier to use with JavaScript • iCalendar may be easier to use with an open source parser / generator (ical4j, libical, etc.) JSON event: { "events": [ { "id": "8A3941390301436885257AD700661DAE", "summary": "Super Bowl XLVII", "location": "New Orleans", "start": { "date": "2013-02-03", "time": "23:30:00", "utc": true }, "end": { "date": "2013-02-04", "time": "03:00:00", "utc": true } } ] } iCalendar event: BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Lotus ... //NONSGML ... BEGIN:VEVENT DTSTART:20130203T233000Z DTEND:20130204T030000Z LAST-MODIFIED:20121217T183957Z DTSTAMP:20121217T184244Z SUMMARY:Super Bowl XLVII LOCATION:New Orleans UID:8A3941390301436885257AD700661DAE END:VEVENT END:VCALENDAR
  • 28. 28 A Few Calendar Entry Requests (REST) • Read a range of events (JSON or iCalendar)  GET /{database}/api/calendar/events  GET /{database}/api/calendar/events?format=icalendar • Read a single event (JSON or iCalendar)  GET /{database}/api/calendar/events/{uid}  GET /{database}/api/calendar/events/{uid}?format=icalendar • Create a new event  POST /{database}/api/calendar/events Compare these REST requests with the other C&S APIs.
  • 29. 29 A Few Calendar Notice Requests (REST) • Get a list of new invitations  GET /{database}/api/calendar/invitations • Get a list of notices for a single event  GET /{database}/api/calendar/events/{uid}/notices • Process a single notice (accept, decline, etc.)  PUT /{database}/api/calendar/events/{uid}/action?type={action}
  • 30. 30 Sample JSON Response • Read a range of events  GET /{database}/api/calendar/events JSON response: { "events": [ { "id": "8A3941390301436885257AD700661DAE", "summary": "Super Bowl XLVII", "location": "New Orleans", "start": { "date": "2013-02-03", "time": "23:30:00", "utc": true }, "end": { "date": "2013-02-04", "time": "03:00:00", "utc": true } }, { "id": "09C4206D7BD743D685257AB0007BA513", "summary": "Repeating Appointment", "location": "test", "start": {...}, "end": {...} }, ... ] }
  • 31. 31 Sample iCalendar Response • Read a range of events  GET /{database}/api/calendar/events?format=icalendar iCalendar response: BEGIN:VCALENDAR X-LOTUS-CHARSET:UTF-8 VERSION:2.0 BEGIN:VEVENT DTSTART:20130203T233000Z DTEND:20130204T030000Z SUMMARY:Super Bowl XLVII LOCATION:New Orleans UID:8A3941390301436885257AD700661DAE X-LOTUS-SUMMARYDATAONLY:TRUE END:VEVENT BEGIN:VEVENT DTSTART:20130205T140000Z DTEND:20130205T150000Z SUMMARY:Repeating Appointment LOCATION:test UID:09C4206D7BD743D685257AB0007BA513 X-LOTUS-SUMMARYDATAONLY:TRUE END:VEVENT ... END:VCALENDAR
  • 33. 33 Calendar Service Release Plan • Like other REST services, it will be released on OpenNTF first  Part of the XPages Extension Library  Available to early adopters, source included  Limited support by the OpenNTF community • Product release vehicle is TBD • More on the extension library development model: Continuous development released as open source 8.5.3 UP1 N/D 8.5.3 N/D 9.0 Social Edition 9.0 UP1 (not in plan)
  • 34. 34 What We’ll Cover … • Overview of C&S APIs • C&S in the C API toolkit • C&S in LotusScript, Java and SSJS • REST calendar service • Wrap-up
  • 35. 35 Additional Resources • www-01.ibm.com/software/lotus/category/messaging  IBM Notes and Domino 9.0 Social Edition • www-10.lotus.com/ldd/ddwiki.nsf  IBM Notes and Domino Application Development Wiki • extlib.openntf.org  Extension library on OpenNTF • tools.ietf.org/pdf/rfc5545.pdf  iCalendar standard specification • ical4j.sourceforge.net/index.html  Java library for parsing and generating iCalendar
  • 36. 36 7 Key Points to Take Home • One C&S implementation; multiple interfaces • iCalendar model encapsulates internal complexity • Take advantage of implicit scheduling • Choose an open source iCalendar library • Use CSDebugAPI=1 for development • Watch OpenNTF for the REST calendar service • REST services are strategically important for remote access to Domino
  • 37. 37 Your Turn! How to contact me: Dave Delay ddelay@us.ibm.com