SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
OpenNTF Domino API: Making
Domino Work The Way You Want
Paul Withers
Intec Systems Ltd

September
Paul Withers
• XPages Developer since 2009
• IBM Champion
• Author of XPages Extension
Library
• Co-Developer of OpenNTF
Domino API
• Notes cheat sheets
Agenda
• Background
• Why Bother?
• Installation and Architecture
• Using the API
• Investigating the API
Why Java?
• Current Run Contexts

• Accessible Objects*

•

Agents

•

Databases

•

XPages

•

Directories

•

Java / JAR Design Element

•

Documents

•

Applets

•

Design Elements

•

Servlets

•

ACLs

•

Java Addins

•

Admin Requests

•

Client Plugin

•

Names

•

Designer Plugin

•

HTTP Requests / Responses

•

OSGi Plugin

•

Sessions

•

DOTS Task

•

File Attachments

*Accessible objects can vary by context
Java in Domino
Not Just for Java
• SSJS
• #{javascript:…} means parse this string
using SSJS rules
• Pass commands to VariableResolver
• Look for corresponding variable name
• Map to a Java object/method
• Add variable and mapping to registry
• In org.openntf.domino.xsp plugin (most)
Why Bother?

* See http://www.shoeboxblog.com/wp-content/uploads/2010/02/life-before-google-500x496.jpg
Why Develop It?
• Out-dated objects (Vectors)
• Out-dated iteration rules
• Unhelpful content assist
• Argument names arg0, arg1
• No Javadoc
• Recycling – here be dragons!
• Exceptional exception handling
Why Use It?

Inline
Documentation

Garbage
Collection

Auto-logging

Auto-boxing

Iterables

Helpers
How Do You Use It?

GitHub source

Install Update
Site in DDE

OpenNTF
download

Drop JAR in
Domino JVM
(outside OSGi)

Upload Update
Site to Server

Drop JAR in
Designer JVM
(outside OSGi)
Installation on Server
• Upload org.openntf.domino.xsp into
Update Site Db
• “Restart task http” on console
• Sufficient for OSGi-dependent contexts
since M4
Installation on Server
• For non-OSGi contexts, e.g. Agents:
• Save org.openntf.domino JAR to
<domino>jvmlibext
Installation on Client / Designer
• Install Update Site
via Widget Catalog
or via File >
Application > Install
• For agents save
org.openntf.domino
JAR to <notes>jvm
libext
OpenNTF Essentials
• Also part of OpenNTF Essentials
• Only XPages / OSGi part
• Does not include jar file
• Download from http://essentials.openntf.org
• Copy Update Site database to server
• Update notes.ini
• Restart server
• Install in client (see OpenNTF webinar)
Enable Library for NSF
• Remember to add it to Xsp Properties
Configure Xsp Properties
• org.openntf.domino.xsp=….
•
•
•
•

godmode: override session and database objects
marcel: always convert MIME
raid: run in debug mode
khan: turns on all “fixes”, e.g. appendItemValue
"I am... better."
"At what?"
"Everything."

• e.g. org.openntf.domino.xsp=godmode,khan
Configure Xsp Properties
• OpenLog
•
•
•
•
•

xsp.openlog.filepath
xsp.openlog.displayError
xsp.openlog.genericErrorMessage
xsp.openlog.email
xsp.openlog.debugLevel
See Demo App
• All available in the demo application

https://github.com/paulswithers/org.op
enntf.domino-Demo-Database
Using Demo Database
• Download and sign
• Go to Administration page
• Create Sample DataSet
• Familiar? Sort of…
• Based on Extension Library code
• Uses org.openntf.domino
• Use Import Comparator to compare
Sample Pages
Java Comparator
Creating Pages
Java Methods
• New#{compositeData.title}Bean &
Old#{compositeData.title}Bean
• Register in faces-config.xml
• Add public void methods
• For comparator, set
javaMethodName to method
name
• Create text files
• Copy & paste bean code
Reviewing the Source
• Install / open Eclipse
• Using Git
• Clone repository from GitHub
• Import projects
Packages
• org.openntf.domino: core code
• org.openntf.domino.designer: future Designer-specific
functionality
• org.openntf.domino.plugin: core packaged in plugin
• If you want to modify and test, build this
• org.openntf.domino.xsp: XPages-specific code
• org.openntf.domino.xsp.feature: feature project
• org.openntf.domino.xsp.update: update project
• Build All and export
Core API Packages
• src: main code
• test: test scripts
• tinkerpop: graph db code
• data: sample error log
• doc: JavaDoc
• resources: various
resource files
src Package
• org.openntf.domino
• Core interfaces
• Import these classes
• org.openntf.domino.ext
• Extension interfaces
(new methods)
• org.openntf.domino.impl
• Implementations of
interfaces - actual code
Enabling SSJS
• Core cannot have XPages dependencies
• Must be in org.openntf.domino.xsp
• org.openntf.domino.xsp.script
• WrapperOpenDomino.register()
• Adds objects for each class
• getMethodMap() creates map for each
method
• OpenFunction.call() calls that method
How It’s Normally Done
How We Do It?
• WRAPPED_CLASSES adds each class
required for SSJS
• Iterated to create one OpenFunction object
for each class
• Generic Code to add all public non-static
methods to Map
• generateMethodMap()
• Limitations on ellipses / generic parameters
• There are ways round this!
Benefits?
• If we add a new public non-static method,
it’s automatically added
• If we add a new class, we just need to add
new element in WRAPPED_CLASSES
Map
Recent Additions (M3, M4)
• Database Event
Listeners
• Graph Database
• Jobs and Tasks
• Email Helper
• XPages OpenLog
Logger
• New 9.0.1
methods added
Work in Progress
• Classes for ALL Design
Elements
• Read / write XPages,
Custom Controls, JARs
• Data Schemas
• Big Data Models
• MapPicker / ListPicker as
dataProviders
• NamePicker dataProviders
• Support
Thank You
• Paul Withers
• pwithers@intec.co.uk
• http://www.intec.co.uk/blog
• @paulswithers
• https://github.com/OpenNTF/
org.openntf.domino
• https://github.com/paulswithers/org.opennt
f.domino-Demo-Database

Contenu connexe

Tendances

Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
Ricardo Sanchez
 

Tendances (20)

Utilizing the open ntf domino api
Utilizing the open ntf domino apiUtilizing the open ntf domino api
Utilizing the open ntf domino api
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Functional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersFunctional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented Programmers
 
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Automating Your Daily Tasks with Scripting - RubyConf 2015 TaiwanAutomating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
 
Play framework
Play frameworkPlay framework
Play framework
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
Ansible Best Practices - July 30
Ansible Best Practices - July 30Ansible Best Practices - July 30
Ansible Best Practices - July 30
 
Introduction to Ansible - Jan 28 - Austin MeetUp
Introduction to Ansible - Jan 28 - Austin MeetUpIntroduction to Ansible - Jan 28 - Austin MeetUp
Introduction to Ansible - Jan 28 - Austin MeetUp
 
Getting Started with Go
Getting Started with GoGetting Started with Go
Getting Started with Go
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
React Development with the MERN Stack
React Development with the MERN StackReact Development with the MERN Stack
React Development with the MERN Stack
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
 
The journey of asyncio adoption in instagram
The journey of asyncio adoption in instagramThe journey of asyncio adoption in instagram
The journey of asyncio adoption in instagram
 
Delphi L01 Intro
Delphi L01 IntroDelphi L01 Intro
Delphi L01 Intro
 
Ce e nou in Rails 4
Ce e nou in Rails 4Ce e nou in Rails 4
Ce e nou in Rails 4
 
Wider than rails
Wider than railsWider than rails
Wider than rails
 
A Brief History of OWIN
A Brief History of OWINA Brief History of OWIN
A Brief History of OWIN
 
I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettext
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - Intro
 

Similaire à DanNotes 2013: OpenNTF Domino API

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
Ulrich Krause
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB Foxx
Michael Hackstein
 

Similaire à DanNotes 2013: OpenNTF Domino API (20)

Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
 
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
 
JS Essence
JS EssenceJS Essence
JS Essence
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
Bccon use notes objects in memory and other useful
Bccon   use notes objects in memory and other usefulBccon   use notes objects in memory and other useful
Bccon use notes objects in memory and other useful
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Rapid API Development ArangoDB Foxx
Rapid API Development ArangoDB FoxxRapid API Development ArangoDB Foxx
Rapid API Development ArangoDB Foxx
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 
[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 

Plus de Paul Withers

Plus de Paul Withers (20)

Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-Red
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
 
Engage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good ForEngage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good For
 
Social Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open SourceSocial Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open Source
 
ICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a ChatbotICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a Chatbot
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
IBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDKIBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDK
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
 
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
 
Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and Domino
 
ICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorldsICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorlds
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
 
What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
 
Embracing the power of the notes client
Embracing the power of the notes clientEmbracing the power of the notes client
Embracing the power of the notes client
 
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPagesBP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
 
Eureka Moment UKLUG
Eureka Moment UKLUGEureka Moment UKLUG
Eureka Moment UKLUG
 

Dernier

Dernier (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

DanNotes 2013: OpenNTF Domino API

  • 1. OpenNTF Domino API: Making Domino Work The Way You Want Paul Withers Intec Systems Ltd September
  • 2. Paul Withers • XPages Developer since 2009 • IBM Champion • Author of XPages Extension Library • Co-Developer of OpenNTF Domino API • Notes cheat sheets
  • 3. Agenda • Background • Why Bother? • Installation and Architecture • Using the API • Investigating the API
  • 4. Why Java? • Current Run Contexts • Accessible Objects* • Agents • Databases • XPages • Directories • Java / JAR Design Element • Documents • Applets • Design Elements • Servlets • ACLs • Java Addins • Admin Requests • Client Plugin • Names • Designer Plugin • HTTP Requests / Responses • OSGi Plugin • Sessions • DOTS Task • File Attachments *Accessible objects can vary by context
  • 6. Not Just for Java • SSJS • #{javascript:…} means parse this string using SSJS rules • Pass commands to VariableResolver • Look for corresponding variable name • Map to a Java object/method • Add variable and mapping to registry • In org.openntf.domino.xsp plugin (most)
  • 7. Why Bother? * See http://www.shoeboxblog.com/wp-content/uploads/2010/02/life-before-google-500x496.jpg
  • 8. Why Develop It? • Out-dated objects (Vectors) • Out-dated iteration rules • Unhelpful content assist • Argument names arg0, arg1 • No Javadoc • Recycling – here be dragons! • Exceptional exception handling
  • 10. How Do You Use It? GitHub source Install Update Site in DDE OpenNTF download Drop JAR in Domino JVM (outside OSGi) Upload Update Site to Server Drop JAR in Designer JVM (outside OSGi)
  • 11. Installation on Server • Upload org.openntf.domino.xsp into Update Site Db • “Restart task http” on console • Sufficient for OSGi-dependent contexts since M4
  • 12. Installation on Server • For non-OSGi contexts, e.g. Agents: • Save org.openntf.domino JAR to <domino>jvmlibext
  • 13. Installation on Client / Designer • Install Update Site via Widget Catalog or via File > Application > Install • For agents save org.openntf.domino JAR to <notes>jvm libext
  • 14. OpenNTF Essentials • Also part of OpenNTF Essentials • Only XPages / OSGi part • Does not include jar file • Download from http://essentials.openntf.org • Copy Update Site database to server • Update notes.ini • Restart server • Install in client (see OpenNTF webinar)
  • 15. Enable Library for NSF • Remember to add it to Xsp Properties
  • 16. Configure Xsp Properties • org.openntf.domino.xsp=…. • • • • godmode: override session and database objects marcel: always convert MIME raid: run in debug mode khan: turns on all “fixes”, e.g. appendItemValue "I am... better." "At what?" "Everything." • e.g. org.openntf.domino.xsp=godmode,khan
  • 17. Configure Xsp Properties • OpenLog • • • • • xsp.openlog.filepath xsp.openlog.displayError xsp.openlog.genericErrorMessage xsp.openlog.email xsp.openlog.debugLevel
  • 18. See Demo App • All available in the demo application https://github.com/paulswithers/org.op enntf.domino-Demo-Database
  • 19. Using Demo Database • Download and sign • Go to Administration page • Create Sample DataSet • Familiar? Sort of… • Based on Extension Library code • Uses org.openntf.domino • Use Import Comparator to compare
  • 23. Java Methods • New#{compositeData.title}Bean & Old#{compositeData.title}Bean • Register in faces-config.xml • Add public void methods • For comparator, set javaMethodName to method name • Create text files • Copy & paste bean code
  • 24. Reviewing the Source • Install / open Eclipse • Using Git • Clone repository from GitHub • Import projects
  • 25. Packages • org.openntf.domino: core code • org.openntf.domino.designer: future Designer-specific functionality • org.openntf.domino.plugin: core packaged in plugin • If you want to modify and test, build this • org.openntf.domino.xsp: XPages-specific code • org.openntf.domino.xsp.feature: feature project • org.openntf.domino.xsp.update: update project • Build All and export
  • 26. Core API Packages • src: main code • test: test scripts • tinkerpop: graph db code • data: sample error log • doc: JavaDoc • resources: various resource files
  • 27. src Package • org.openntf.domino • Core interfaces • Import these classes • org.openntf.domino.ext • Extension interfaces (new methods) • org.openntf.domino.impl • Implementations of interfaces - actual code
  • 28. Enabling SSJS • Core cannot have XPages dependencies • Must be in org.openntf.domino.xsp • org.openntf.domino.xsp.script • WrapperOpenDomino.register() • Adds objects for each class • getMethodMap() creates map for each method • OpenFunction.call() calls that method
  • 30. How We Do It? • WRAPPED_CLASSES adds each class required for SSJS • Iterated to create one OpenFunction object for each class • Generic Code to add all public non-static methods to Map • generateMethodMap() • Limitations on ellipses / generic parameters • There are ways round this!
  • 31. Benefits? • If we add a new public non-static method, it’s automatically added • If we add a new class, we just need to add new element in WRAPPED_CLASSES Map
  • 32. Recent Additions (M3, M4) • Database Event Listeners • Graph Database • Jobs and Tasks • Email Helper • XPages OpenLog Logger • New 9.0.1 methods added
  • 33. Work in Progress • Classes for ALL Design Elements • Read / write XPages, Custom Controls, JARs • Data Schemas • Big Data Models • MapPicker / ListPicker as dataProviders • NamePicker dataProviders • Support
  • 34. Thank You • Paul Withers • pwithers@intec.co.uk • http://www.intec.co.uk/blog • @paulswithers • https://github.com/OpenNTF/ org.openntf.domino • https://github.com/paulswithers/org.opennt f.domino-Demo-Database