UserMappingRepository class (Java programming language)

The UserMappingRepository class is an abstract class that does not have a constructor. To create your own user mapping plug-in, you must create a subclass of the UserMappingRepository class or modify the subclass in the sample Java™ plug-in.

The UserMappingRepository class contains the following public methods: getVersionNumber(), getCrypto(), connect(), disconnect(), fetchUM(), and lookupUM(). You must create your own subclass of the UserMappingRepository that contains these functions. In these functions, write the code that the plug-in uses to interact with the external repository.

You can view the implementation of these functions in a sample Java plug-in that retrieves user mappings from an LDAP server. The files are in the sqllib/samples/federated/umplugin/ldap/ directory. The functions from this class are used in the UserMappingRepositoryLDAP.java and UserMappingLookupLDAP.java files.

Public methods

int getVersionNumber()
Returns the version number of the plug-in development kit that is used by the plug-in.
UserMappingCrypto getCrypto()
Returns the UserMappingCrypto object that is associated with this UserMappingRepository object.
abstract void connect()
You must implement your own method for connecting to your repository within this function.
abstract void disconnect()
You must implement your own method for disconnecting from your repository within this function.
abstract voidfetchUM(UserMappingEntry um)
You must implement your own method for retrieving the user mapping from the repository within this function. The um parameter contains the detailed query information that is used to determine which user mapping to retrieve.
UserMappingEntrylookupUM(UserMappingRepositoryrepository, String iiInstanceName, String iiDatabaseName, String iiRemoteServerName, String iiAuthid)
This function is primarily user to test the plug-in. The function uses the iiInstanceName, iiDatabaseName, iiRemoteServerName, and iiAuthid parameters as input to create and initialize the UserMappingEntry class. The function calls the connect, fetchUM, and disconnect methods.