lotus domino - Querying the users directory via the Java API -


i trying access/querying domino directory using domino java api , have question regarding same -

here setup -

  1. i creating application uses java domino api interface domino server
  2. my java application resides on own server , uses java api (via diiop) talk domino server
  3. the domino server version in environment 9.0
  4. there multiple domino servers in environment , user mailboxes distributed across these domino servers
  5. my application receives email address , message id external source input. based on input application needs delete message user's mailbox.

what stuck @ - want query domino directory server identify mail server name , mail file name user (using email address) application can open user's mail file , delete corresponding message user's mailbox file.

as researching found class/method directory.lookupnames() method can used query directory users.

will method allow searching users based on email address or search based on user's name?

i tried test above approach invoking session.getdirectory() method throws notesexception - "not implemented". see below code snippet. session object valid (authenticated) session object. missing here?

is there alternate method/approach should using query users domino server?

following code snippet -

private static boolean querydirectory(session dominosession) {     try {         directory dirdomino = dominosession.getdirectory(null);          directorynavigator dirnavigator = dirdomino.lookupnames("people", "john", "email");         boolean bmatchfound = dirnavigator.findfirstmatch();         while (true == bmatchfound) {             string strvalue = (string)dirnavigator.getfirstitemvalue().get(0);             system.out.println("value - " + strvalue);             bmatchfound = dirnavigator.findnextmatch();                      }     }     catch(notesexception exc) {         exc.printstacktrace();         return false;     }     catch(exception exc) {         exc.printstacktrace();         return false;     }      return true; } 


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -