Home > Ask the Domino Experts > Domino Development Questions & Answers > Using Java API to access folders/objects inside Domino server
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Using Java API to access folders/objects inside Domino server

Andre Guirard EXPERT RESPONSE FROM: Andre Guirard

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 21 July 2005
How can I access inbox and other folders/objects inside my Domino server using Java APIs?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Domino Development
Can I create and copy Microsoft Excel spreadsheets with LotusScript?
'Illegal circular use: Audit Trail' error when opening Lotus Notes docs
How to make computed fields recalculate
Sending and logging faxes from Lotus Notes and Domino
Accessing documents in a Lotus Notes database
Adding an action to the Lotus Notes right-click menu
Writing temporary text files that email as attachments
Trapping the on-click event of a radio button
Copying a form object using LotusScript
Connecting to a remote DB2 server with LEI

Java for Lotus Notes Domino
Top 10 Lotus Notes/Domino coding and development tips of 2008
Java code inserts data from Notes documents into a SQL table
Java code shortens strings in a SQL table
How to execute a stored procedure in Lotus Notes Domino using Java
Top 10 Lotus Notes Domino programming and development tips of 2007
How to return an HTML representation of a Lotus Notes rich-text field
Shrink Lotus Notes databases with many attachments
Converting Lotus Notes Domino Web pages to PDF files with a Java agent
Developing Eclipse plug-ins for Lotus Notes and Domino -- 7 tips in 7 minutes
A bevy of Notes/Domino development tips

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


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.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts