Home arrow Site Administration arrow Page 2 - Connect Lotus Domino Server through Standalone Application with CORBA

Start Working with Documents - Administration

This article discusses Lotus Domino Notes, especially how to access to the documents stored in it with CORBA. This feature allow developers to write standalone applications that will use documents of Lotus. Moreover, the developer won't have to learn CORBA because the Lotus Domino Server has already mapped all interfaces, so we are pure users of an API. This article assumes you already have installed a Lotus Domino Server, configured the IIOP properly, and that you know how to create nsf database files.

TABLE OF CONTENTS:
  1. Connect Lotus Domino Server through Standalone Application with CORBA
  2. Start Working with Documents
  3. Looking for Documents
  4. Working with Received Mails
  5. Deleting Attachments
  6. Conclusion
By: Alex Soto Bueno
Rating: starstarstarstarstar / 17
September 14, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Creating a Document

Creating a document and filling the information is as easy as:

Document Doc = this.database.createDocument();
Doc.replaceItemValue("name","Alex Soto Bueno");

We have to create the document and call the method replaceItemValue, where the first argument is the name of the field, and the second, its content. The content argument is a class java.lang.Object. This is because in single value fields, we pass a String, but in multiple values fields we can put a java.util.Vector with all the Strings we want to save.

Furthermore, we have the ability of attach files. Note: the files must be resident in Lotus Domino Server, not in the client application. A good solution can be to upload them beforehand with FTP. When the file is already attached in the server, we must do this:

RichTextItem body = doc.createRichTextItem("Body");
body.embedObject(EmbeddedObject.EMBED_ATTACHMENT ,"", "c:inetpubftproot22572.txt", "22572.txt");

We will use RichTextItem class. This class has methods to transform the data into XML, copy attachments, consult its content ...

What we do in the code is to create in field called Body, a RichTextItem, and in this case we paste a file that is located in c:inetpubftproot22572.txt in the SERVER.

Document class has a lot of methods to interact with a Lotus Document. It's simple, and by consulting javadoc, you will be able to execute all operations against Domino.

The last thing you must do is to save a document. This is obvious but it easy to forget.

Doc.save(); 



 
 
>>> More Site Administration Articles          >>> More By Alex Soto Bueno
 

blog comments powered by Disqus
   

SITE ADMINISTRATION ARTICLES

- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup
- Install and Optimize PlayOnLinux on Ubuntu a...
- Top Wordpress Plugins for e-Commerce
- Top WordPress Plugins to Fight Spam
- Top Six Drupal Modules to Prevent Spam
- Install XAMPP on Windows
- Manage Backups for WordPress Files and Datab...
- WordPress Security Tips
- How to Back Up WordPress Files and Databases


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap

Dev Shed Tutorial Topics: