To write a Directory Management application
A session object is obtained when a user or administrator successfully logs in:
If login is successful, the session object contains the session specification.
If the login is successful, the session specification is put into the spec field of the SessionDef object. Set the spec value in the SmApiSession object.
After obtaining a valid session, create a DMS API object by passing the session to the constructor of the SmDmsApiImpl class—for example:
SmDmsApi dmsApi = new SmDmsApiImpl (apiSession);
In the example, dmsApi is the new DMS API object, and apiSession is the session obtained when the administrator successfully logged in.
Note: Whenever you create a DMS API object, you pass the session and connection information to the object.
To use the DMS API to access a user directory, you need to know either:
Call SmDmsApiImpl.getDmsContext() to pass in this information.
Call SmDmsApiImpl.getDirectoryContext() to pass in this information.
The type of information you know or choose to provide determines the directory management context for accessing the user directory, as follows:
|
If You Know... |
And... |
Then Use... |
|---|---|---|
|
The OID of a realm that contains a self-registration scheme |
The user is a SiteMinder administrator |
Delegated Management Services (DMS) context |
|
The SiteMinder user directory name or OID |
— |
Directory context |
DMS context and directory context provide two different avenues for reaching the same destination—an SmDmsDirectory object where you can access and manipulate directory information.
5. Create and Manipulate Objects
After creating a context, you can create and manipulate directory objects using the DMS Object Model. When working with directory objects, you need to know:
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |