Before beginning this article please review Business Card Basics http://www.lotus.com/ldd/stwiki.nsf/dx/Business_Card_Basics
The most common purpose for using a Dual Repository is to apply Photographs to the Business Card. The most common configuration for this is to use the Domino Directory and a Custom Notes Database.
Once you've reviewed the above article and have confirmed you can retrieve business card information in the default single repository configuration you are ready to implement the dual repository.
There are 3 basic operations to perform in this setup:
- The first step is to modify the Admin pages to remove the attributes from any fields you'll be including in the secondary repository.
- Next you'll add a section to the UserInfoConfig.xml file to specify the secondary repository as a custom notes database and include the fields you want to pull from that DB.
- Finally the Notes DB is created and photos are attached.
The first step is self-explainatory so we'll begin with the second. The steps below are from the Sametime 8.0.2 infocenter:
An additional black box, which functions as a customized special implementation, is provided to enable data retrieval from the customized Notes database. This 'customized' black box should always be preceded by a call to the black box that handles the Sametime directory. A CommonField tag is used for synchronization between the black boxes. If the common field is defined as MailAddress, then the value retrieved for MailAddress from the first storage (LDAP or Domino) is used as the ID to query for in the customized database. The application first queries the database using the userID received as a parameter; if no record is found, it queries the database again, using the value retrieved for the CommonFieldName as userID. To use the customized database feature:
* Perform the following manual steps:
1. Open UserInfoConfig.xml and update the CommonField tag in the first 'storage' section to hold the ID property of a Detail tag that represents the same detail in the different storage types. This detail tag is assigned a different field name in each storage section, but the value in each of these fields should be identical for the specific user. The default value for the Common field tag is "MailAddress." The attributes holding the e-mail address for a user should have the same value in both storages.
2. Using the Administrator's Tool, update the Business Card attribute page with the values to be retrieved from the Sametime directory, leaving blank the field name for items required from the customized database.
3. Remove the Detail tags of the fields you left blank in the set-up page from the first 'storage' section in the UserInfoConfig.xml file.
4. Add an additional 'storage' section to the UserInfoConfig.xml as the second storage. This storage section is a new section added specifically for this feature; it differs from the standard Notes storage section through the additional parameters specified below:
5. In the newly-added "storage" section, delete the Detail tags of the items that you do not want to retrieve from this database, and update:
1. The DbName property, including the full path, no path is required if the database is stored in the Data directory.
2. The view name (if needed)
3. The mapping of the "Detail" tag so each item is mapped to the correct field name of the new database
6. Add a BlackBox tag to the BlackBoxConfiguration section in UserInfoConfig.xml as a second record:
7. Restart StConfiguration and the HTTP task.
The above examples were modified to retrieve only the photograph from the secondary repository but others could have been included as well. In the example we are retrieving information from the fldPhoto field of the ViewPerson view in the bcard.nsf. The complete UserInfoConfig.xml is shown below.
Note: Custom database has to be on the same server as Sametime. It is because API is designed to read the xml file looks for the database on the same server and it is not possible to specify a different server.
I've attached the example bcard.nsf database and UserInfoConfig.xml. These can be placed in the Data and Domino directories (respectively) on a test server. Add person docs (example below) for the users listed in bcard and you'll be able to see this work. Attachments are contained in the Attachments sections at the end of this article.