Article

pnuffer's picture
article
Reads:

2546

Score:
0
0
 
Comments:

0

Handling Custom Attributes in Notes

Author Info

30 August 2006 - 5:44am
Submitted by: pnuffer

(View Disclaimer)

Problem

The documentation for Notes 2.2 driver is not clear on some of the custom attributes. What are the functional differences between the following attributes and when should one be chosen over the other?

Both mailserver and mail-server are used to set the destination mail server for new Notes users when sending an <add> operation (command) to the NotesDriverShim. Both accomplish the same thing (functionally equivalent), but each is used at a different location of an XDS input document. Which is used is determined by the preference of the policy programmer?

Solution

The documentation is confusing (and incorrect) regarding the mailserver parameter. The MailServer parameter is used within an <add-attr> element of an <add> operation. For example:

<input>
  <add class-name="User"
       dest-dn="cn=JDocker/o=Novell"
       event-id="MYSERVER-NDS#20040128232403#1#1"
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\CN=JDocker"
       src-dn="\mytree\DirXML\Notes\Users\JDocker"
       src-entry-id="37959">
    <add-attr attr-name="Surname">
      <value timestamp="1075332220#3" type="string">Docker</value>
    </add-attr>
    <add-attr attr-name="Given Name">
      <value timestamp="1075332243#1" type="string">John</value>
    </add-attr>
    <add-attr attr-name="MailServer">
      <value type="string">CN=DominoMailServer1/O=Novell</value>
    </add-attr>
    <add-attr attr-name="Internet Email Address">
      <value>JohnDocker@novell.com</value>
    </add-attr>
  </add>
</input>

The same objective of setting the mail server on a newly created Notes user can also be accomplished using the mail-server custom parameter by inserting the custom parameter within the <add> element's attribute list, like the following:

<input>
  <add class-name="User"
       dest-dn="cn=JDocker/o=Novell"
       event-id="MYSERVER-NDS#20040128232403#1#1"
       mail-server="CN=DomainoMailServer1/O=Novell"
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\CN=JDocker"
       src-dn="\mytree\DirXML\Notes\Users\JDocker"
       src-entry-id="37959">
    <add-attr attr-name="Surname">
      <value timestamp="1075332220#3" type="string">Docker</value>
    </add-attr>
    <add-attr attr-name="Given Name">
      <value timestamp="1075332243#1" type="string">John</value>
    </add-attr>
    <add-attr attr-name="Internet Email Address">
      <value>JohnDocker@novell.com</value>
    </add-attr>
  </add>
</input>

Given appropriate Notes driver settings and policies, the above sample <input> documents accomplish the same result.

mailfile-rep-new-server and rep-new-server both are custom parameters used to specify the Domino server on which a database is to be replicated. Which database? If using the mailfile-rep-new-server parameter, then the database to be replicated will be the newly created mailfile database of the newly created user. This mailfile-rep-new-server custom parameter is only
effective within an <add> operation. If you're using the rep-new-server parameter, then the database to be replicated will be the driver's synchronized database (such as names.nsf).
Both of these parameters can be specified as attributes of the <add>
operation.

For example:

<input>
  <add class-name="User"
       dest-dn="cn=JDocker/o=Novell"
       event-id="MYSERVER-NDS#20040128232403#1#1"
       mail-server="CN=DomainoMailServer1/O=Novell"
       mailfile-rep-new-server="CN=DomainoMailServer2/O=Novell"
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\CN=JDocker"
       rep-new-server="CN=DomainoDirectoryServer2/O=Novell"
       src-dn="\mytree\DirXML\Notes\Users\JDocker"
       src-entry-id="37959">
    <add-attr attr-name="Surname">
      <value timestamp="1075332220#3" type="string">Docker</value>
    </add-attr>
    <add-attr attr-name="Given Name">
      <value timestamp="1075332243#1" type="string">John</value>
    </add-attr>
    <add-attr attr-name="Internet Email Address">
      <value>JohnDocker@novell.com</value>
    </add-attr>
  </add>
</input>

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell