How SharePoint usernames are mapped to Sametime for presence awareness

harmon.ie for Notes Knowledge Base

harmon.ie for Notes supplies IBM Sametime® presence awareness in the integrated SharePoint® sidebar panel for IBM Notes 8.0.1 and greater.

Columns which have values that include name information (Created by, Modified by, or Checked Out to) are designated with Sametime presence status. From the Sametime label, the user can start a Sametime instant messaging chat with other SharePoint users.

The SharePoint Integrator maps SharePoint users to Sametime users in the order below:

  • By internet email address: if the SharePoint user's email value is equal to a Sametime user's Internet address, a match is made.
  • By username: if the SharePoint username (without domain) is equal to a Sametime user's Short name/UserID, a match is made.

If no match is found, the username is displayed as regular text.

Customize usernames resolution

harmon.ie offers an Eclipse extension point for providing a custom Java implementation for mapping SharePoint users to Domino users. If the mapping described above does not match your company requirements, you may implement this custom interface to create your own resolving algorithm. To implement the interface, do the following:

  1. Add a personResolver extension node to plugin.xml. Here is a code snippet showing how this is done:
    1
    2
    3
    4
    5
    6
    7
    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.2"?>
    <plugin>
     <extension point="com.mainsoft.sharepoint.sametimeintegration.personResolver">
      <provider class="com.company.sharepointintegrator.PersonResolverSamplePlugin">
     </provider></extension>
    </plugin>
    
  2. Implement the resolve method of the IPersonResolver interface. Below is sample Java code for a custom implementation of the IPersonResolver interface that maps a SharePoint user to a Sametime user, and also ensures that the user's SharePoint domain and Sametime organization match:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    package com.company.sharepointintegrator;
      
    import com.ibm.collaboration.realtime.people.PeopleService;
    import com.ibm.collaboration.realtime.people.Person;
    import com.ibm.collaboration.realtime.servicehub.ServiceException;
    import com.ibm.collaboration.realtime.servicehub.ServiceHub;
    import com.mainsoft.contentlibrary.UserInfo;
    import com.mainsoft.sharepoint.sametimeintegration.IPersonResolver;
     
    public class PersonResolverSamplePlugin implements IPersonResolver { 
     
      public Person resolve(UserInfo userInfo) {
         try {
            PeopleService _peopleService =
              (PeopleService)ServiceHub.getService(PeopleService.SERVICE_TYPE);
            return _peopleService.getPersonById(getDominoUsername(userInfo));
         } catch (ServiceException e) {
            e.printStackTrace();
         }
         return null;
      }
     
      private String getDominoUsername(UserInfo userInfo) {
         String dominoUsername = userInfo.getDepartment();
         if (userInfo.getDepartment().length() > 0)
            dominoUsername += "/";
     
         dominoUsername += userInfo.getUsername(false);
         return dominoUsername;
      }
    }