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.

This was last published in August 2005

Dig Deeper on Java for Lotus Notes Domino

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close