Where can I find the class/methods to get at the user list that is used by the Administration? I am looking at portlet and working with directory set such as being able to bring up user list that we have hooked up via LDAP through MWS.
Hi
have a look into the classes under the Common Directory Services API
[url]http://www.ajax-softwareag.com/articles/Y4LCDN/Caf-7-1-1JavaDocs/com/webmethods/sc/directory/package-summary.html[/url].
One example on using them:
IDirectorySystem directorySystem = DirectorySystemFactory.getDirectorySystem();
/* Create a Directory Session to access the directory services */
IDirectorySession session = directorySystem.createSession();
IDirectoryPrincipal ownerUser = session.lookupPrincipalByName(
"fga", IDirectoryPrincipal.TYPE_USER);
Unfortunately, the Common Directory Services API will not deliver you the users in a role defined by an LDP query (in case you are looking for that).
hope this helps
Javier
Hi,
Try
user = ds.lookupPrincipalByDN(dn, IDirectoryPrincipal.TYPE_USER);
where dn is Distinguished Name from ldap for example “uid=piotrw,ou=people,dc=itg,dc=pl”
It`s work fine.
Best Regards
Peter