|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.sapr3.user.UserRegistryConnector
public final class UserRegistryConnector
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.
<User> <sapUserName></sapUserName> <sapUserPassword></sapUserPassword> <sapUserAlias> <aliasName></aliasName> </sapUserAlias> <sapAddress> <title></title> <academicTitle></academicTitle> <firstName></firstName> <lastName></lastName> <namePrefix></namePrefix> <nameFormat></nameFormat> <nameFormatRuleCountry></nameFormatRuleCountry> <isoLanguage></isoLanguage> <language></language> <searchSortTerm></searchSortTerm> <department></department> <function></function> <buildingNumber></buildingNumber> <buildingFloor></buildingFloor> <roomNumber></roomNumber> <name></name> <name2></name2> <name3></name3> <name4></name4> <city></city> <postCode></postCode> <poBoxPostCode></poBoxostCode> <poBox></poBox> <street></street> <streetNumber></streetNumber> <houseNumber></houseNumber> <country></country> <countryIso></countryIso> <region></region> <timeZone></timeZone> <primaryPhoneNumber></primaryPhoneNumber> <primaryPhoneExtension></primaryPhoneExtension> <primaryFaxNumber></primaryFaxNumber> <primaryFaxExtension></primaryFaxExtension> </sapAddress> <sapCompany> <companyNameKey></companyNameKey> </sapCompany> <sapDefaults> <startMenu></startMenu> <outputDevice></outputDevice> <printTimeAndDate></printTimeAndDate> <printDelete></printDelete> <dateFormat></dateFormat> <decimalFormat></decimalFormat> <logonLanguage></logonLanguage> <cattTestStatus></cattTestStatus> <costCenter></costCenter> </sapDefaults> <sapLogonData> <validFromDate></validFromDate> <validToDate></validToDate> <userType></userType> <userGroup></userGroup> <accountId></accountId> <timeZone></timeZone> <lastLogonTime></lastLogonTime> <codeVerEncryption></codeVerEncryption> </sapLogonData> <sapSncData> <printableName></printableName> <allowUnsecure></allowUnsecure> </sapSncData> <sapUserGroupList> <group> <name></name> </group> <group> <name></name> </group> </sapUserGroupList> <sapParameterList> <parameter> <parameterId></parameterId> <parameterValue></parameterValue> </parameter> <parameter> <parameterId></parameterId> <parameterValue></parameterValue> </parameter> </sapParameterList> <sapUserEmailAddressList> <email> <defaultNumber></defaultNumber> <smtpAddress></smtpAddress> <isHomeAddress></isHomeAddress> <sequenceNumber></sequenceNumber> </email> <email> <defaultNumber></defaultNumber> <smtpAddress></smtpAddress> <isHomeAddress></isHomeAddress> <sequenceNumber></sequenceNumber> </email> </sapUserEmailAddressList> <sapRoleList> <role> <name></name> <validFromDate></validFromDate> <validToDate></validToDate> </role> <role> <name></name> <validFromDate></validFromDate> <validToDate></validToDate> </role> </sapRoleList> <sapProfileList> <profile> <name></name> </profile> <profile> <name></name> </profile> </sapProfileList> </User>
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()
.
Field Summary |
---|
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
UserRegistryConnector()
Construct the Connector. |
Method Summary | |
---|---|
void |
deleteEntry(Entry entry,
SearchCriteria search)
Called by IBM Tivoli Directory Integrator AL to remove an existing user and associated attributes from SAP R/3. |
Entry |
findEntry(SearchCriteria search)
Called by IBM Tivoli Directory Integrator AL to find an existing user and associated attributes in SAP R/3. |
java.util.List |
getLastErrorSet()
Allows the caller to obtain a list of ABAP errors that might have occured during the execution of any supported Connector method. |
java.util.List |
getLastWarningSet()
Allows the caller to obtain a list of ABAP warnings that might have occured during the execution of any supported Connector method. |
Entry |
getNextEntry()
This method is called to retrieve the next entry from the connector. |
java.lang.String |
getVersion()
Get the version string. |
void |
initialize(java.lang.Object o)
This method is called once after the connector configuration file has been provided by the caller. |
void |
modEntry(Entry entry,
SearchCriteria search)
Called by IBM Tivoli Directory Integrator AL to update an existing user and associated attributes in SAP R/3. |
void |
putEntry(Entry entry)
Called by IBM Tivoli Directory Integrator AL to add a new user and associated attributes to SAP R/3. |
java.lang.Object |
querySchema(java.lang.Object source)
Return the IBM Tivoli Directory Integrator Entry schema supported by this connector. |
void |
registerScriptBeans(ScriptEngine se)
This method is called to register specific objects in the script context. |
void |
selectEntries()
Called by IBM Tivoli Directory Integrator AL when the connector operates in Iterator mode inside an assembly line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
---|
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, pushback, queryOperations, queryReply, reconnect, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer |
Constructor Detail |
---|
public UserRegistryConnector()
Method Detail |
---|
public void registerScriptBeans(ScriptEngine se) throws java.lang.Exception
Connector
registerScriptBeans
in interface ConnectorInterface
registerScriptBeans
in class Connector
se
- The script engine context
java.lang.Exception
- if an error occurs.public java.util.List getLastWarningSet()
getLastWarningSet
in interface AbapErrorCache
public java.util.List getLastErrorSet()
getLastErrorSet
in interface AbapErrorCache
public void initialize(java.lang.Object o) throws UserRegistryConnectorException, ConfigurationException
initialize
in interface ConnectorInterface
initialize
in class Connector
o
- IBM Tivoli Directory Integrator config object. Not used.
UserRegistryConnectorException
- When an error happens during super class init.
ConfigurationException
- if SAP connection parameters are invalid or XSL files are
invalid.public java.lang.Object querySchema(java.lang.Object source) throws UserRegistryConnectorException
querySchema
in interface ConnectorInterface
querySchema
in class Connector
source
- not used.
UserRegistryConnectorException
- If an error occurs.Entry
,
Vector
public void putEntry(Entry entry) throws ConnectorMethodException, UserRegistryConnectorException
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- The AL connector entry input. This connector must have an
attribute named "sapUserXml". Its value must be an XML string
conforming to the SAP User XML Schema. See user guide for more
details.
UserRegistryConnectorException
- If the attribute is missing from the entry.
ConnectorMethodException
- if the SAP network call fails, or an XSL transform error
occurs.Connector.putEntry(com.ibm.di.entry.Entry)
public void deleteEntry(Entry entry, SearchCriteria search) throws ConnectorMethodException, UserRegistryConnectorException
deleteEntry
in interface ConnectorInterface
deleteEntry
in class Connector
entry
- The AL connector entry input. This connector must have an
attribute named "sapUserXml". Its value must be an XML string
conforming to the SAP User XML Schema. The XML must, at a
minimum, contain the "sapUserName" element. Typically, the
entry will be populated by the findEntry method, which is
called by the AL before this method.
See user guide for more details.search
- Passed through to XSL style sheet as an XSL param.
UserRegistryConnectorException
- If the attribute is missing from the entry.
ConnectorMethodException
- if the SAP network call fails, or an XSL transform error
occurs.Connector.deleteEntry(com.ibm.di.entry.Entry, com.ibm.di.server.SearchCriteria)
,
findEntry(com.ibm.di.server.SearchCriteria)
public void modEntry(Entry entry, SearchCriteria search) throws ConnectorMethodException, UserRegistryConnectorException
modEntry
in interface ConnectorInterface
modEntry
in class Connector
entry
- The AL connector entry input. This connector must have an
attribute named "sapUserXml". Its value must be an XML string
conforming to the SAP User XML Schema. The XML must, at a
minimum, contain the "sapUserName" element. Typically, the
entry will be populated by the findEntry method, which is
called by the AL before this method.
See user guide for more details.search
- Passed through to XSL style sheet as an XSL param.
UserRegistryConnectorException
- If the attribute is missing from the entry.
ConnectorMethodException
- if the SAP network call fails, or an XSL transform error
occurs.Connector.modEntry(com.ibm.di.entry.Entry, com.ibm.di.server.SearchCriteria)
,
findEntry(com.ibm.di.server.SearchCriteria)
public Entry findEntry(SearchCriteria search) throws ConnectorMethodException, UserRegistryConnectorException
findEntry
in interface ConnectorInterface
findEntry
in class Connector
search
- Defined in the "LinkCriteria" tab of the AL. Must have a
criteria name "sapUserName". Its value is the name of the user
to be found.
null
if the user could not be found.
UserRegistryConnectorException
- If the attribute is missing from the entry.
ConnectorMethodException
- if the SAP network call fails, or an XSL transform error
occurs.Connector.findEntry(com.ibm.di.server.SearchCriteria)
public void selectEntries() throws ConnectorMethodException, UserRegistryConnectorException
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
UserRegistryConnectorException
- If the attribute is missing from the entry.
ConnectorMethodException
- if the SAP network call fails, or an XSL transform error
occurs.Connector.selectEntries()
,
R3UsernameIterator
public Entry getNextEntry() throws ConnectorMethodException
selectEntries()
.
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
null
when no more user entries are available.
ConnectorMethodException
- if the SAP network call fails, or an XSL transform error
occurs.ConnectorInterface.selectEntries()
public java.lang.String getVersion()
getVersion
in interface VersionInfoInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |