Administration
  Home arrow Administration arrow Page 5 - Connect Lotus Domino Server through St...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Connect Lotus Domino Server through Standalone Application with CORBA
By: Alex Soto Bueno
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2004-09-14

    Table of Contents:
  • Connect Lotus Domino Server through Standalone Application with CORBA
  • Start Working with Documents
  • Looking for Documents
  • Working with Received Mails
  • Deleting Attachments
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Connect Lotus Domino Server through Standalone Application with CORBA - Deleting Attachments


    (Page 5 of 6 )

    Deleting attachments from a file isn't as easy as we think because the attachments could go with body text, and an email could have more than one body. Because of that, we need to retrieve all Body fields, save them to a buffer, (only text), remove it, and then recreate only with the buffer information.

    String bod = new String();
    RichTextItem body = (RichTextItem)oDocument.getFirstItem("Body");
    while(body!=null)
    {
        bod +=new String(body.getFormattedText(false, 0, 0));
        body.remove();
        body = (RichTextItem)oDocument.getFirstItem("Body");
    }
    RichTextItem body2 = oDocument.createRichTextItem("Body");
    body2.appendText(bod);

    oDocument.save();

    As you can see in the first part of the algorithm, what we do is save all text information into a String object and we remove the body section. It would be better use StringBuffer. Then we create a new body, and we append all the text previously kept. 

    Linking Documents

    Linking documents to other documents is a very important feature because you can divide one document in multiple documents, with all documents linked, so when you consult, you can navigate through documents.

    RichTextItem body = oDocument.createRichTextItem("Body");
    body.appendText("Link to Other Document");
    body.addNewLine();
    body.appendDocLink((Document)oOtherDocument);

    oDocument.save();

    The code is so simple; we create a RichTextItem object, first we append a text, and then we append a document. What we would see is a document icon, and when we push it, we will jump to the document we have already appended. 

    More Administration Articles
    More By Alex Soto Bueno


       · i recently completed an web app that hooks into domino, a few things i learned is...
       · Hi,I am writing a program in java which will read a (Domino)NSF file stored...
     

       

    ADMINISTRATION ARTICLES

    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway