Class UserRegistryConnector

  • All Implemented Interfaces:
    ConnectorInterface, AbapErrorCache, VersionInfoInterface

    public final class UserRegistryConnector
    extends Connector
    implements ConnectorInterface, AbapErrorCache

    The SAP R/3 User Registry Connector. Version %sapurcn.release.version% Build %sapurcn.release.build.version%.

    The connector enables external applications, using IBM Tivoli Directory Integrator, to manage users in SAP R/3. It projects the SAP user database as a "registry" into the IBM Tivoli Directory Integrator infrastructure. It supports the following IBM Tivoli Directory Integrator Connector Modes: Add Only, Delete, Update, Iterator, Lookup. The connector supports design time schema query via querySchema(java.lang.Object).

    A note about ABAP errors and warnings
    The connector invokes BAPI/RFC functions in SAP to perform the connector mode operations. In some cases, data passed to the BAPI/RFC functions from the XML input, may result in ABAP data validation failures. An example of this case could be the value for post code is not valid within the country region. The BAPI/RFC functions return the results of validation checks in the "RETURN" parameter of the RFC.

    The connector has been desingned to make the RFC return status available to the Assembly Line. The connector does not interpret, or translate, ABAP errors or warnings into thrown exceptions. The connector registers a script bean named "urcAbapErrorCache". The bean is registered for all connector modes and can be accessed in connector hooks. The bean is an instance of AbapErrorCache. Script code in a connector hook can use this information to perform contingency actions as required. The cache is reset before the execution of each connector method. Example script code is shown below:

    var errs = urcAbapErrorCache.getLastErrorSet();
    if (errs.size() > 0) {
      task.logmsg("********** There were ABAP Errors *********");
      for (var i = 0; i < errs.size(); ++i) {
       var errInfo = errs.get(i);
       task.logmsg("The message is: " + errInfo.getMsg());
       task.logmsg("The message number is: " + errInfo.getMsgNum().toString());
      }
    }

    var warns = urcAbapErrorCache.getLastWarningSet();
    if (warns.size() > 0) {
      task.logmsg("********** There were ABAP Warnings *********");
      for (var i = 0; i < warns.size(); ++i) {
       var errInfo = warns.get(i);
       task.logmsg("The message is: " + errInfo.getMsg());
       task.logmsg("The message number is: " + errInfo.getMsgNum().toString());
      }
    }

    A given SAP user entry is represented as XML by the connector, and is set as the value of the connector attribute named "sapUserXml". The value if this attribute is always an XML string. Its XSchema is defined in the user guide for the connector. An example XML instance is shown below.

      &ltUser&gt
      &ltsapUserName&gt&lt/sapUserName&gt
      &ltsapUserPassword&gt&lt/sapUserPassword&gt
      &ltsapUserAlias&gt
      &ltaliasName&gt&lt/aliasName&gt
      &lt/sapUserAlias&gt     
      &ltsapAddress&gt
      &lttitle&gt&lt/title&gt
      &ltacademicTitle&gt&lt/academicTitle&gt
      &ltfirstName&gt&lt/firstName&gt
      &ltlastName&gt&lt/lastName&gt
      &ltnamePrefix&gt&lt/namePrefix&gt
      &ltnameFormat&gt&lt/nameFormat&gt
      &ltnameFormatRuleCountry&gt&lt/nameFormatRuleCountry&gt
      &ltisoLanguage&gt&lt/isoLanguage&gt
      &ltlanguage&gt&lt/language&gt
      &ltsearchSortTerm&gt&lt/searchSortTerm&gt
      &ltdepartment&gt&lt/department&gt
      &ltfunction&gt&lt/function&gt
      &ltbuildingNumber&gt&lt/buildingNumber&gt
      &ltbuildingFloor&gt&lt/buildingFloor&gt
      &ltroomNumber&gt&lt/roomNumber&gt
      &ltname&gt&lt/name&gt
      &ltname2&gt&lt/name2&gt
      &ltname3&gt&lt/name3&gt
      &ltname4&gt&lt/name4&gt
      &ltcity&gt&lt/city&gt
      &ltpostCode&gt&lt/postCode&gt
      &ltpoBoxPostCode&gt&lt/poBoxostCode&gt
      &ltpoBox&gt&lt/poBox&gt
      &ltstreet&gt&lt/street&gt
      &ltstreetNumber&gt&lt/streetNumber&gt
      &lthouseNumber&gt&lt/houseNumber&gt
      &ltcountry&gt&lt/country&gt
      &ltcountryIso&gt&lt/countryIso&gt
      &ltregion&gt&lt/region&gt
      &lttimeZone&gt&lt/timeZone&gt
      &ltprimaryPhoneNumber&gt&lt/primaryPhoneNumber&gt
      &ltprimaryPhoneExtension&gt&lt/primaryPhoneExtension&gt
      &ltprimaryFaxNumber&gt&lt/primaryFaxNumber&gt
      &ltprimaryFaxExtension&gt&lt/primaryFaxExtension&gt
      &lt/sapAddress&gt
      &ltsapCompany&gt
      &ltcompanyNameKey&gt&lt/companyNameKey&gt
      &lt/sapCompany&gt
      &ltsapDefaults&gt
      &ltstartMenu&gt&lt/startMenu&gt
      &ltoutputDevice&gt&lt/outputDevice&gt
      &ltprintTimeAndDate&gt&lt/printTimeAndDate&gt
      &ltprintDelete&gt&lt/printDelete&gt
      &ltdateFormat&gt&lt/dateFormat&gt
      &ltdecimalFormat&gt&lt/decimalFormat&gt
      &ltlogonLanguage&gt&lt/logonLanguage&gt
      &ltcattTestStatus&gt&lt/cattTestStatus&gt
      &ltcostCenter&gt&lt/costCenter&gt
      &lt/sapDefaults&gt
      &ltsapLogonData&gt
      &ltvalidFromDate&gt&lt/validFromDate&gt
      &ltvalidToDate&gt&lt/validToDate&gt
      &ltuserType&gt&lt/userType&gt
      &ltuserGroup&gt&lt/userGroup&gt
      &ltaccountId&gt&lt/accountId&gt
      &lttimeZone&gt&lt/timeZone&gt
      &ltlastLogonTime&gt&lt/lastLogonTime&gt
      &ltcodeVerEncryption&gt&lt/codeVerEncryption&gt
      &lt/sapLogonData&gt
      &ltsapSncData&gt
      &ltprintableName&gt&lt/printableName&gt
      &ltallowUnsecure&gt&lt/allowUnsecure&gt
      &lt/sapSncData&gt
      &ltsapUserGroupList&gt
      &ltgroup&gt
      &ltname&gt&lt/name&gt
      &lt/group&gt
      &ltgroup&gt
      &ltname&gt&lt/name&gt
      &lt/group&gt
      &lt/sapUserGroupList&gt
      &ltsapParameterList&gt
      &ltparameter&gt
      &ltparameterId&gt&lt/parameterId&gt
      &ltparameterValue&gt&lt/parameterValue&gt
      &lt/parameter&gt
      &ltparameter&gt
      &ltparameterId&gt&lt/parameterId&gt
      &ltparameterValue&gt&lt/parameterValue&gt
      &lt/parameter&gt
      &lt/sapParameterList&gt
      &ltsapUserEmailAddressList&gt
      &ltemail&gt
      &ltdefaultNumber&gt&lt/defaultNumber&gt
      &ltsmtpAddress&gt&lt/smtpAddress&gt
      &ltisHomeAddress&gt&lt/isHomeAddress&gt
      &ltsequenceNumber&gt&lt/sequenceNumber&gt
      &lt/email&gt
      &ltemail&gt
      &ltdefaultNumber&gt&lt/defaultNumber&gt
      &ltsmtpAddress&gt&lt/smtpAddress&gt
      &ltisHomeAddress&gt&lt/isHomeAddress&gt
      &ltsequenceNumber&gt&lt/sequenceNumber&gt
      &lt/email&gt
      &lt/sapUserEmailAddressList&gt
      &ltsapRoleList&gt
      &ltrole&gt
      &ltname&gt&lt/name&gt
      &ltvalidFromDate&gt&lt/validFromDate&gt
      &ltvalidToDate&gt&lt/validToDate&gt
      &lt/role&gt
      &ltrole&gt
      &ltname&gt&lt/name&gt
      &ltvalidFromDate&gt&lt/validFromDate&gt
      &ltvalidToDate&gt&lt/validToDate&gt
      &lt/role&gt
      &lt/sapRoleList&gt
      &ltsapProfileList&gt
      &ltprofile&gt
      &ltname&gt&lt/name&gt
      &lt/profile&gt
      &ltprofile&gt
      &ltname&gt&lt/name&gt
      &lt/profile&gt
      &lt/sapProfileList&gt
      &lt/User&gt
     

    For a description of Add Only mode requirements, see putEntry(com.ibm.di.entry.Entry).

    For a description of Update mode requirements, see modEntry(com.ibm.di.entry.Entry, com.ibm.di.server.SearchCriteria).

    For a description of Delete mode requirements, see deleteEntry(com.ibm.di.entry.Entry, com.ibm.di.server.SearchCriteria).

    For a description of Lookup mode requirements, see findEntry(com.ibm.di.server.SearchCriteria).

    For a description of Iterator mode requirements, see getNextEntry() and selectEntries().