Passing information about UI objects to a java agent

The lotus java agents don’t have classes to manage the UI objects, such as in LotusScript with the classes NotesUIDocument or NotesUIView.
It’s true that you can find several info about the Notes Client Java UI API in internet, but these classes are not officially supported.
In this post I explain 3 ways to obtain the currently open view or document inside an agent java.
You take advantage of the LotusScript UI classes that can easily manage the UI objects, and you pass them to the java agent using the variables in the notes.ini or a profile document or a notes document. Continue reading “Passing information about UI objects to a java agent”

Getting the list of users belonging to a group

There is not a method in lotusccript to get the list of all users belonging to a group, and to complicate matters, groups can contain other groups as members.
To solve this problem I wrote getUsersByGroup function that returns the list of users belonging to a group, provided that:

  • the public names.nsf is accessible
  • users have a document “Person” in the public address book
  • groups are defined in the names
  • the maximum number of nested groups is 100, but you can change this setting changing the variable maxNestedGroup

Continue reading “Getting the list of users belonging to a group”

The method getDocumentByUNID in NotesDatabase class

The method getDocumentByUNID NotesDatabase class returns the appropriate document for the UniversalUnid passed as argument, but it does not return Nothing if it does not find the document but the error 4091 (lsERR_NOTES_BAD_UNID).
Then a code to handle this would be the following: