203 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Bleedyellow.com has a new home
Sat, Nov 11th 2017 11
Life sign / Major update for Domino JNA on Github
Fri, Nov 10th 2017 10
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 3
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 1
My latest wish list for the Domino Java API
Thu, Nov 3rd 2016 3
My latest wish list for the Domino Java API
Thu, Nov 3rd 2016 2
Big update for Domino JNA project on Github
Mon, Jul 11th 2016 1
Top 10
Bleedyellow.com has a new home
Sat, Nov 11th 2017 11
Life sign / Major update for Domino JNA on Github
Fri, Nov 10th 2017 10
Tools we use to build web apps
Sun, Sep 21st 2014 6
XSS security fix in Domino R9 HTTP server may break existing web applications
Mon, Jun 3rd 2013 6
Quick tip: Fixing Dojo drag and drop issues in a Windows 8 VMWare on the Mac
Thu, Mar 7th 2013 6
Fast Notes view reading via Java API:New ViewNavigator cache methods in 8.5.3
Thu, Jan 17th 2013 6
Download links for IBM Connect 2013 session slides
Thu, Jan 31st 2013 5
Notes 9.0.1 64 bit for Mac OS X 10.11 El Capitan now available - warning our customer NOT to update for 30+ days!
Tue, Sep 29th 2015 5
Big update for Domino JNA project on Github
Mon, Jul 11th 2016 5
New C API method NIFFindByKeyExtended2 in Domino 9.0 improves view lookups
Fri, Mar 6th 2015 4


Big update for Domino JNA project on Github
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
Karsten Lehmann    

Last weekend, I committed a big update for the




Here is what's new:

Note (Document) APIs
The last weeks since creating the project, I added basic APIs to work with database notes (documents). The main focus was to be able to read the classic note item value types, e.g. String, Number and Date/Time with single or multiple values per item, handle a few rarely known edge cases (e.g. multiline text values that Domino stores with delimiter between the lines instead of platform dependent n or rn), do proper LMBCS/Unicode conversion routines for special characters like Umlauts and provide access to item metadata like the sequence number or the last modified date of an item.

While reading the note flag documentation, I discovered NOTE_FLAG_READONLY, which Domino automatically adds to the note info area. This note flag can be used to quickly check whether the current Domino user has edit access to a document without all the work of traversing all author items and manually compare the values to @UserNamesList. So that's what is being queried now when you call NotesNote.isReadOnly().

Attachment streaming
Another thing I added was support for note attachment streaming. You probably know that IBM's (poor) implementation of EmbeddedObject.getInputStream() internally first extracts the file to a temp directory and then returns an InputStream to this temporary file. Depending on the file size, that may ruin application performance and fill disk space. So the Domino JNA way of reading attachment is to manually decode the $File items and read the file content in small chunks of 16K, the buffer size of the C function to read attachment data.

The Domino C API provides some easy methods to set item values for selected data types (e.g. single values for text, number and Date/Time). I added them to the Domino JNA as well, but there is still work to do to write multiple values.

A few other things that are new:

User spoofing - reader items on steroids
A NAMES_LIST data structure is what Domino returns when you call NSFBuildNamesList with a Domino username. This NAMES_LIST contains all name variants/wildcards and groups/nested groups on the server for the specified username.
It is passed as a parameter when you open a database or a view so that Domino can compute document visibility (reader items) and write access rights.

Ever since writing the code to decode this simple memory data structure, I was asking myself whether it can be built programatically, because it's just the number of names and the null terminated LMBCS encoded list of names.

And since I need that functionality for an upcoming customer project (Google+ like application with very flexible read access rights for postings), I tried it and it worked like a charm. :-)

So now you can build your own Domino users at runtime that do not have to be in a Domino directory. Just pass a Java List with name variants in the NotesDatabase constructor and all operations are executed on behalf of that user.

Unification of view column value reading
Domino has two ways to read view column data: READ_MASK_SUMMARY which returns programmatic column names and their values in the summary buffer and READ_MASK_SUMMARYVALUES that just returns the column values.

The latter leaves more space in the summary buffer for data, as the column names never change between view entries. Unfortunately, one new optimized lookup call that IBM added in R9 to atomically look up a key and start reading values, currently only works with READ_MASK_SUMMARY.

I don't think that developers should care about this difference, so I now handle all that internally in the NotesViewEntryData object and you simply call NotesViewEntryData.get("Firstname") to read a column value.

Here is a test case to see some sample code for view data reading (the API has changed compared to the initial release).

Performance optimizations
I did some profiler sessions and optimized the API for performance. The main optimization was to add an LMBCS string decoder cache that reduces the string conversion operations and to lazily convert strings when they are first needed (e.g. when reading only a few view column values).


The code on Github was tested on Mac 64 bit and Windows 32 bit clients so far. The next days, I will do further tests with Windows 64 bit servers since we are using the API in multiple customer projects.

The repository contains various test cases to get started.




---------------------
https://www.mindoo.com/web/blog.nsf/dx/11.07.2016233301KLETA8.htm
Jul 11, 2016
2 hits



Recent Blog Posts
11
Bleedyellow.com has a new home
Sat, Nov 11th 2017 11:16a   Karsten Lehmann
It took some time and the domain transfer is not 100% complete, but bleedyellow.com is on it's way from René Winkelmeyer to Mindoo. Our blog is currently configured to be the default website on www.bleedyellow.com We do not have any plans yet for the domain, but did not want to let it expire. If you have any suggestions, feel free to comment.
10
Life sign / Major update for Domino JNA on Github
Fri, Nov 10th 2017 4:25p   Karsten Lehmann
Wow - I haven't written a blog post in the last 9 months! It's just so much easier to write a Tweet than to produce long articles, when I split the week between three customers and my family with two children. Just wanted to let you know that we are alive and kicking and still doing very much Domino related work! :-) Technologies have as always shifted a bit. Most of the time we create pure JavaEE projects now for our customer web apps, developed in Eclipse and not Domino Designer (ok, u
3
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 8:21a   Karsten Lehmann
It took some time (mainly because I was very busy and my main use case for the project is not XPages), but now the Domino JNA project is available for XPages development. That means that there is an XPages Extensibility API plugin available in the project's release section on Github that can be installed both in Domino Designer and on the Domino R9 server to use the API in your own applications. After installation, the API classes are available in SSJS and Java code including API source c
1
New APIs for Domino JNA project, now available for XPages development
Mon, Jan 16th 2017 6:21a   Karsten Lehmann
It took some time (mainly because I was very busy and my main use case for the project is not XPages), but now the Domino JNA project is available for XPages development. That means that there is an XPages Extensibility API plugin available in the project's release section on Github that can be installed both in Domino Designer and on the Domino R9 server to use the API in your own applications. After installation, the API classes are available in SSJS and Java code including API source c
2
My latest wish list for the Domino Java API
Thu, Nov 3rd 2016 9:10a   Karsten Lehmann
Last week I sent an email with enhancement ideas for the Domino Java API to IBM development. Most of the stuff listed here (except new @-functions) can be implemented by wrapping existing C API functions or simple copy&paste of already existing code. We already did this using our Domino JNA project, but I thought it would be a good idea to add this functionality to the standard API and provide full platform support. I don't really have unrealistic expectations whether this will ever be
2
Big update for Domino JNA project on Github
Mon, Jul 11th 2016 9:33p   Karsten Lehmann
Last weekend, I committed a big update for the Domino JNA project on Github. Here is what's new: Note (Document) APIs The last weeks since creating the project, I added basic APIs to work with database notes (documents). The main focus was to be able to read the classic note item value types, e.g. String, Number and Date/Time with single or multiple values per item, handle a few rarely known edge cases (e.g. multiline text values that Domino stores with delimiter between the lines
0
New on Github: Domino JNA - Cross-platform access to IBM Notes/Domino C API methods from Java
Fri, Apr 8th 2016 5:11p   Karsten Lehmann
I would like to introduce you to a pet project that I have been working on for the last months: Domino JNA - Cross-platform access to IBM Notes/Domino C API methods from Java As you might have already read in this blog in the past, we have been playing with the Domino C API for some time now and found out that you can speed up view reading dramatically when you talk directly to the C API instead of using IBM's Java classes. The C API also provides lots of other functionality for whic
1
Updated on OpenNTF: Release 1.1 of Open Eclipse Update Site with Mac 64 Bit Client support and other cool stuff
Thu, Mar 3rd 2016 11:23p   Karsten Lehmann
I have updated the OpenNTF project "Open Eclipse Update Site" with release version 1.1 and added the following useful features: added support for the Mac Notes Client with 64 bit new view action to extract selected features as an update site to disk (also available in headless mode via Java agents “(API)” and “(Java-API)“) new view actions to install/uninstall selected features via rcplauncher based deployment, which is used by software distribution systems and should
2
Notes 9.0.1 64 bit for Mac OS X 10.11 El Capitan now available - warning our customers NOT to update for 30+ days!
Tue, Sep 29th 2015 8:30a   Karsten Lehmann
One day before the general availability of Mac OS X 10.11 (El Capitan), IBM released an update for their IBM Notes Client 9.0.1 with 64 bit support: http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=877&letternum=ENUSZP15-0483 Previous versions were using Java 1.6 32 Bit under the hood, which was maintained by Apple for the last 7 years. Since Apple dropped support for Java 1.6 in OS X 10.11, IBM had to update their IBM Mac No
1
New C API method NIFFindByKeyExtended2 in Domino 9.0 improves view lookups
Fri, Mar 6th 2015 12:48p   Karsten Lehmann
Once again I am digging into the Notes/Domino C API to implement fast and powerful view lookups. What caused it this time was a customer requirement for "Notes Client style keyboard navigation" in web views, meaning that you type a character, press enter and the cursor position should be moved to the relevant area of the view (e.g. where the content in the first sorted view column is greater or equal letter "L"). Using standard Java APIs for this purpose (ViewNavigator.getNextSibling(), unt




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition