Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using Java API to access folders/objects inside Domino server

How can I access inbox and other folders/objects inside my Domino server using Java APIs?

View member feedback to this Ask the Expert Q&A.

I'm not sure where your code is running, but the Java API is basically the same regardless. Once you are set up with a lotus.domino.Session object, you first have to locate the user's mail file.
 

      DbDirectory dir = 
session.getDbDirectory(null);
     Database db = 
dir.openMailDatabase();

Then, use the Database..getView method to locate the inbox folder:

        View inbox = 
db.getView("($Inbox)")

Inbox and a couple of other built-in folders have a special name. If you're not sure of the name of the folder you want to find, open the database in Domino Designer and look at how the folder naming scheme goes. To scan through all the folders, you can use Database..getViews to get all the views and iterate through them looking for folders.

However, this is somewhat inefficient since each view will have its index updated when you load its View object, which is work that didn't need doing. You can also find all the Folder design notes using a NoteCollection with a selection formula. There's a function at this URL which shows how to do this.

MEMBER FEEDBACK TO THIS ASK THE EXPERT Q&A:

This is a good answer, but I'm not sure that was the question asked. I'm betting that the actual question here meant "folders" = "subdirectories".

—Doug J.

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Java for Lotus Notes Domino

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close