import lotus.domino.*; public class name1 extends NotesThread { public static void main(String argv[]) { name1 t = new name1(); t.start(); } public void runNotes() { try { Session s = NotesFactory.createSession(); Name n = s.getUserNameObject(); if (n.isHierarchical()) { System.out.println ("Canonical name = " + n.getCanonical()); System.out.println ("Abbreviated name = " + n.getAbbreviated()); } System.out.println ("Common name = " + n.getCommon()); if (n.getOrganization().length() != 0) System.out.println ("Organization = " + n.getOrganization()); if (n.getOrgUnit1().length() != 0) System.out.println ("OrgUnit1 = " + n.getOrgUnit1()); if (n.getOrgUnit2().length() != 0) System.out.println ("OrgUnit2 = " + n.getOrgUnit2()); if (n.getOrgUnit3().length() != 0) System.out.println ("OrgUnit3 = " + n.getOrgUnit3()); if (n.getOrgUnit4().length() != 0) System.out.println ("OrgUnit4 = " + n.getOrgUnit4()); if (n.getGiven().length() != 0) System.out.println ("Given = " + n.getGiven()); if (n.getSurname().length() != 0) System.out.println ("Surname = " + n.getSurname()); if (n.getInitials().length() != 0) System.out.println ("Initials = " + n.getInitials()); if (n.getGeneration().length() != 0) System.out.println ("Generation = " + n.getGeneration()); if (n.getADMD().length() != 0) System.out.println ("ADMD = " + n.getADMD()); if (n.getPRMD().length() != 0) System.out.println ("PRMD = " + n.getPRMD()); if (n.getKeyword().length() != 0) System.out.println ("Keyword = " + n.getKeyword()); if (n.getLanguage().length() != 0) System.out.println ("Language = " + n.getLanguage()); } catch (Exception e) { e.printStackTrace(); } } }
See Also