D.8 Setting and Modifying Lotus Notes Field Flags

The Notes Driver v2.1.1 and above can set (add) or modify Lotus Notes field flags on documents (records) in a Lotus Notes database (.nsf) that is being synchronized (Subscriber channel only). Available Lotus Notes field flags that the driver can appropriately set are read-access, read/write-access, names, protected, and summary. The seal and sign flags can also be enabled or disabled, but without the expected supporting functionality.

Each Notes field flag can be set enabled or disabled by using a corresponding XML tag.

Table D-1 Driver Attributes Tags and Corresponding Notes Field Flag

driver-attr-flag

Notes Field Flag

authors-flag

READ/WRITE-ACCESS

encrypted-flag

SEAL

names-flag

NAMES

protected-flag

PROTECTED

readers-flag

READ-ACCESS

signed-flag

SIGN

summary-flag

SUMMARY

You can insert these XML tags (driver-attr-flags) into XDS documents of the Subscriber channel as attributes of the <add-attr> or <modify-attr> elements (siblings to the attr-name attribute). The field flags must be used in the appropriate manner, according to Lotus Notes database schema and design rules. Inappropriate flags (or flag combinations) on a field can cause unexpected results for that document (record).

For example, it is possible for uncertified users to be removed from the view of the Notes Address book (rendering them inaccessible) when certain attribute flags (readers-flag, authors-flag) are set inappropriately on a field that cannot handle the flag.

The encrypted-flag can be set for a field, even though the driver does not take the necessary steps to call the encryption methods with appropriate certificates. It is possible to set a field as SEAL, but some other code needs to call the appropriate methods to encrypt the field in the document, or the field is not actually sealed (encrypted).

D.8.1 Sample Creation Policy Rules

To view a sample of using the field flags in creation policy rules, see setfieldflagsadd.xml. You can use or modify the code sample for your own XML solutions.

D.8.2 Sample Modify Policy Rule

To view a sample of a Modify policy rule in the command transform, see setfieldflagsmodify.xml. You can use or modify the code sample for your own XML solutions.

D.8.3 Sample Add XDS Doc

Below is a sample Add XDS doc before it is submitted to the Notes Driver shim:

<nds dtdversion="2.0" ndsversion="8.x">
   <source>
  <product version="2.0.5.51 ">Identity Manager</product>
  <contact>Novell, Inc.</contact>
   </source>
   <input>
  <add certify-user="true" 
       class-name="Person" 
       create-mail="true" 
       dest-dn="CN=ErnieEngineer/OU=eng/O=novell" 
       drv-param-cert-id="eng-cert-id-file" 
       drv-param-cert-pwd="eng-cert-id-password" 
       event-id="BLACKCAP-NDS#20040915163542#1#1" 
       expire-term="22" 
       internet-password-force-change="false" 
       mail-acl-manager-name="CN=Notes Driver/O=novell" 
       mail-file-inherit-flag="true" 
       no-id-file="false" 
       notes-password-change-interval="0" 
       notes-password-check-setting="PWD_CHK_CHECKPASSWORD" 
       notes-password-grace-period="0" 
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\OU=eng\CN=ErnieEngineer" 
       roaming-cleanup-period="90" 
       roaming-cleanup-setting="REG_ROAMING_CLEANUP_EVERY_NDAYS"
       roaming-server="CN=blackcap/O=novell" 
       roaming-subdir="Roaming\ErnieEngineer" 
       roaming-user="false" src-dn="\raspberry\DirXML\Notes\Users\eng\ErnieEngineer" 
       src-entry-id="39853" 
       store-useridfile-in-ab="true" 
       sync-internet-password="true">
     <add-attr attr-name="FullName">
    <value naming="true" timestamp="1095266118#20" type="string">ErnieEngineer</value>
     </add-attr>
     <add-attr attr-name="LastName">
    <value timestamp="1095266118#3" type="string">Engineer</value>
     </add-attr>
     <add-attr attr-name="FirstName">
    <value timestamp="1095266142#1" type="string">Ernie</value>
     </add-attr>
     <add-attr attr-name="InternetAddress">
    <value>ErnieEngineer@novell.com</value>
     </add-attr>
     <add-attr attr-name="ShoeSize" authors-flag="false" encrypted-flag="false" names-flag="false" protected-flag="true" readers-flag="false" signed-flag="false" summary-flag="true">
    <value type="string">9.5</value>
     </add-attr>
  </add>
   </input>
</nds>

D.8.4 Sample Modify XDS Doc

Below is a sample Modify XDS doc before it is submitted to the Notes Driver shim:

<nds dtdversion="2.0" ndsversion="8.x">
   <source>
  <product version="2.0.5.51 ">Identity Manager</product>
  <contact>Novell, Inc.</contact>
   </source>
   <input>
  <modify class-name="Person" 
       event-id="BLACKCAP-NDS#20040915164613#1#1" 
       qualified-src-dn="O=DirXML\OU=Notes\OU=Users\OU=eng\CN=ErnieEngineer" 
       src-dn="\raspberry\DirXML\Notes\Users\eng\ErnieEngineer" 
       src-entry-id="39853" tell-adminp-process="tell adminp process all" timestamp="1095267005#2">
     <association state="associated">A4C23EE8273577AF87256F10005B2BF9</association>
     <modify-attr attr-name="OfficePhoneNumber" 
          authors-flag="false" 
          encrypted-flag="false" 
          names-flag="false" 
          protected-flag="true" 
          readers-flag="false" 
          signed-flag="false" 
          summary-flag="true">
    <remove-value>
       <value timestamp="1095266773#1" type="teleNumber">222-2222</value>
    </remove-value>
    <add-value>
       <value timestamp="1095267005#2" type="teleNumber">222-2221</value>
    </add-value>
     </modify-attr>
  </modify>
   </input>
</nds>