当前位置: 代码迷 >> Lotus >> Domino7 新建用户以后,在names中配置用户信息以后通过JAVA获取下来的信息不完整,该如何处理
  详细解决方案

Domino7 新建用户以后,在names中配置用户信息以后通过JAVA获取下来的信息不完整,该如何处理

热度:461   发布时间:2016-05-05 07:23:07.0
Domino7 新建用户以后,在names中配置用户信息以后通过JAVA获取下来的信息不完整
以下是我配置的用户的界面

当我通过JAVA打开names.nsf数据库以后,取得($Users)视图,根据这个用户的名字找到用户的文档打印出来,属性只有
很少的几个,一下是代码:
Java code
  try    {      Database db = this.session.getDatabase(this.servername, "names.nsf");      if (!db.isOpen()) {        db.open();      }            View view = null;      if (!"".equals(this.viewName))        view = db.getView(this.viewName);      else {        view = db.getView("($Users)");      }      System.out.println("************************");      while ("".equals(this.username)) {        System.out.print("请输入需要操作的用户名:");        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));        this.username = br.readLine();      }            System.out.println(this.username);      lotus.domino.Document doc = view.getDocumentByKey(this.username);      if (doc == null) {        System.out.println("无法找到指定用户的配置文档..");        System.exit(0);      }      else {        System.out.println(doc.generateXML());        this.mailserver = doc.getItemValueString("Mailserver");        this.filepath = doc.getItemValueString("Mailfile");        System.out.println(doc.getItemValue("WebSite"));        System.out.println(doc.getItemValueString("MailSystem"));        System.out.println(doc.getItemValueString("MailDomain"));        System.out.println(doc.getItemValueString("MailAddress"));        System.out.println(doc.getItemValueString("InternetAddress"));      }

以上代码我主要是想取得用户的数据库所在的domino服务器和管理员配置的用户的数据库所在的目录,可是我取出来的整个用户的文档就如一下内容:
XML code
<document form='DPABperson'><noteinfo noteid='9f2' unid='C0D0E984B8B80F2A482578AB002EE814' sequence='-2147483647'><created><datetime>20110610T163220,68+08</datetime></created><modified><datetime>20110610T163220,71+08</datetime></modified><revised><datetime>20110610T163220,68+08</datetime></revised><lastaccessed><datetime>20110610T163220,68+08</datetime></lastaccessed><addedtofile><datetime>20110610T163220,68+08</datetime></addedtofile></noteinfo><updatedby><name/></updatedby><item name='MailAddress'><text>[email protected]</text></item><item name='SametimeLogin'><text>[email protected]</text></item><item name='AltFullName'><text/></item><item name='AltFullNameLanguage'><text/></item><item name='FirstName'><text>chenxiaoming</text></item><item name='Type'><text>Person</text></item><item name='FullName'><textlist><text>[email protected]</text></textlist></item><item name='InternetAddress'><text>[email protected]</text></item><item name='LastName'><text/></item><item name='MailDomain'><text/></item><item name='MailSystem'><text>1</text></item><item name='MiddleInitial'><text/></item><item name='Suffix'><text/></item><item name='Title'><text/></item><item name='$DPABstub'><text>1</text></item><item name='$DPABDIPNAME'><textlist><text>[email protected]</text></textlist></item><item name='$NoPurge'><text>1</text></item><item name='$ConflictAction'><text>1</text></item><item name='$AutoCreatedList'><text>DIP</text></item><item name='NameDisplayPref'><text/></item></document>
  相关解决方案