com.filenet.api.engine
Interface DirectoryServiceProvider


public interface DirectoryServiceProvider

For Internal Use Only.

Defines the public interface that a directory service needs to implement. The end target repository is a directory server. A DirectoryServiceProvider object can communicate with the directory server via LDAP or some other form of API.

This is a singleton object. For a given type of directory server, the Content Engine makes sure that only one instance of the implementation class is created.


Method Summary
 GroupInfo getGroupByDN(java.lang.String groupDN, java.lang.String[] requestedProperties)
          For Internal Use Only.
 GroupInfo getGroupByShortName(java.lang.String groupShortName, java.lang.String[] requestedProperties)
          For Internal Use Only.
 GroupInfo getGroupByUniqueId(byte[] uid, java.lang.String[] requestedProperties)
          For Internal Use Only.
 GroupInfo getGroupByUPN(java.lang.String groupUPN, java.lang.String[] requestedProperties)
          For Internal Use Only.
 java.lang.String getRealmByUniqueId(byte[] principalUid)
          For Internal Use Only.
 RealmInfo[] getRealmInfos()
          For Internal Use Only.
 UserInfo getUserByDN(java.lang.String userDN, java.lang.String[] requestedProperties)
          For Internal Use Only.
 UserInfo getUserByShortName(java.lang.String userShortName, java.lang.String[] requestedProperties)
          For Internal Use Only.
 UserInfo getUserByUniqueId(byte[] uid, java.lang.String[] requestedProperties)
          For Internal Use Only.
 UserInfo getUserByUPN(java.lang.String userUPN, java.lang.String[] requestedProperties)
          For Internal Use Only.
 void initialize(DirectoryInfo[] dirInfos)
          For Internal Use Only.
 PrincipalInfoSet searchGroups(java.lang.String realmDN, java.lang.String searchPattern, PrincipalSearchAttribute searchProperty, PrincipalSearchSortType sort, int pageSize, java.lang.String[] requestedProperties, java.lang.String continueFrom)
          For Internal Use Only.
 PrincipalInfoSet searchUsers(java.lang.String realmDN, java.lang.String searchPattern, PrincipalSearchAttribute searchProperty, PrincipalSearchSortType sort, int pageSize, java.lang.String[] requestedProperties, java.lang.String continueFrom)
          For Internal Use Only.
 

Method Detail

initialize

void initialize(DirectoryInfo[] dirInfos)
For Internal Use Only. Initializes the DirectoryServiceProvider object. Can be called only once.

This method takes an array of DirectoryInfo instances, and resolves each instance to one or multiple RealmInfo instances.

Parameters:
dirInfos - An array of DirectoryInfo instances.

getRealmInfos

RealmInfo[] getRealmInfos()
For Internal Use Only. Returns an array of RealmInfo objects that this directory service provider resolves to. This directory service provider should also keep this info for later use, such as resolving group membership across multiple realms.

Returns:
An array of RealmInfo objects. There must be at least one element returned in the array.

getRealmByUniqueId

java.lang.String getRealmByUniqueId(byte[] principalUid)
                                    throws javax.naming.NamingException
For Internal Use Only. Returns the realm name (in DN format) that the unique id belongs to.

Parameters:
principalUid - Unique id of a security principal (user or group).
Returns:
Realm name in DN format.
Throws:
javax.naming.NamingException

getUserByDN

UserInfo getUserByDN(java.lang.String userDN,
                     java.lang.String[] requestedProperties)
                     throws javax.naming.NamingException
For Internal Use Only. Searches by user DN and returns the properties of a user.

Parameters:
userDN - User name in DN format (for example, cn=user1,ou=people,dc=myDomain,dc=com).
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A UserInfo object which contains the requested user properties. If not found, returns null.
Throws:
javax.naming.NamingException

getUserByUPN

UserInfo getUserByUPN(java.lang.String userUPN,
                      java.lang.String[] requestedProperties)
                      throws javax.naming.NamingException
For Internal Use Only. Searches by user UPN and returns properties of a user.

Parameters:
userUPN - User name in UPN format (for example, user1@myDomain.com)
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A UserInfo object which contains the requested user properties. If not found, returns null.
Throws:
javax.naming.NamingException

getUserByShortName

UserInfo getUserByShortName(java.lang.String userShortName,
                            java.lang.String[] requestedProperties)
                            throws javax.naming.NamingException
For Internal Use Only. Searches by user short name and returns the properties of a user.

Note:You must ensure that the short name is unique across all realms under this provider.

Parameters:
userShortName - User short name (for example, user1).
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A UserInfo object which contains user properties asked for. If not found, returns null.
Throws:
javax.naming.NamingException

getUserByUniqueId

UserInfo getUserByUniqueId(byte[] uid,
                           java.lang.String[] requestedProperties)
                           throws javax.naming.NamingException
For Internal Use Only. Searches by unique id and returns properties of a user.

Parameters:
uid - in binary format.
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A UserInfo object which contains the requested user properties. If not found, returns null.
Throws:
javax.naming.NamingException

getGroupByDN

GroupInfo getGroupByDN(java.lang.String groupDN,
                       java.lang.String[] requestedProperties)
                       throws javax.naming.NamingException
For Internal Use Only. Searches by group DN and returns the properties of a group.

Parameters:
groupDN - Group name in DN format (for example, cn=group1,ou=groups,dc=myDomain,dc=com).
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A GroupInfo object which contains the requested group properties. If not found, returns null.
Throws:
javax.naming.NamingException

getGroupByUPN

GroupInfo getGroupByUPN(java.lang.String groupUPN,
                        java.lang.String[] requestedProperties)
                        throws javax.naming.NamingException
For Internal Use Only. Searches and returns properties of a group by group UPN.

Parameters:
groupUPN - Group name in UPN format (for example, group1@myDomain.com)
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A GroupInfo object which contains group properties asked for. If not found, returns null.
Throws:
javax.naming.NamingException

getGroupByShortName

GroupInfo getGroupByShortName(java.lang.String groupShortName,
                              java.lang.String[] requestedProperties)
                              throws javax.naming.NamingException
For Internal Use Only. Searches by group short name and returns the properties of a group.

Note: You must ensure that the short name is unique across all realms under this provider.

Parameters:
groupShortName - Group short name (for example, group1).
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A GroupInfo object which contains the requested group properties. If not found, returns null.
Throws:
javax.naming.NamingException

getGroupByUniqueId

GroupInfo getGroupByUniqueId(byte[] uid,
                             java.lang.String[] requestedProperties)
                             throws javax.naming.NamingException
For Internal Use Only. Searches by unique id and returns the properties of a group.

Parameters:
uid - in binary format.
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
Returns:
A GroupInfo object which contains the requested group properties. If not found, returns null.
Throws:
javax.naming.NamingException

searchUsers

PrincipalInfoSet searchUsers(java.lang.String realmDN,
                             java.lang.String searchPattern,
                             PrincipalSearchAttribute searchProperty,
                             PrincipalSearchSortType sort,
                             int pageSize,
                             java.lang.String[] requestedProperties,
                             java.lang.String continueFrom)
                             throws javax.naming.NamingException
For Internal Use Only. Searches users in the given realm by the given search pattern.

Also need to support the following features:
a) Sorting: ascending or descending.
b) Paging: this method always returns users page by page.
c) Search continuation, for which the logic is as follows:

  1. If this method receives a null value through its continueFrom argument, it returns the first page of the search result. By calling PrincipalInfoSet.setContinueFrom(), this method also returns the start position for the next page.
  2. If this method receives a non-null continueFrom argument, it retrieves a new page starting from this argument value.
  3. If the last page is returned, this method also returns null for the continuation string by calling PrincipalInfoSet.setContinueFrom(null). When the Content Engine receives this null value, it stops the continuation of this search.

Parameters:
realmDN - Realm name in DN format.
searchPattern - Search pattern, such as "*", for the specified searchProperty parameter.
searchProperty - The property to be used for search.
sort - Sorting type, which can be ascending, descending, or none.
pageSize - Page size for the returned result. If zero is passed in, defaults to 50.
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
continueFrom - The value to start from for the new page.
Returns:
A PrincipalInfoSet instance that contains a set of UserInfo objects. The number of objects in the set is <= pageSize.
Throws:
javax.naming.NamingException

searchGroups

PrincipalInfoSet searchGroups(java.lang.String realmDN,
                              java.lang.String searchPattern,
                              PrincipalSearchAttribute searchProperty,
                              PrincipalSearchSortType sort,
                              int pageSize,
                              java.lang.String[] requestedProperties,
                              java.lang.String continueFrom)
                              throws javax.naming.NamingException
For Internal Use Only. Searches groups in the given realm by the given searchPattern.

Also need to support the following features:
a) Sorting: ascending or descending.
b) Paging: this method always returns groups page by page.
c) Search continuation, for which the logic is as follows:

  1. If this method receives a null value through its continueFrom argument, it returns the first page of the search result. By calling PrincipalInfoSet.setContinueFrom(), this method also returns the start position for the next page.
  2. If this method receives a non-null continueFrom argument, it retrieves a new page starting from this argument value.
  3. If the last page is returned, this method also returns null for the continuation string by calling PrincipalInfoSet.setContinueFrom(null). When the Content Engine receives this null value, it stops the continuation of this search.

Parameters:
realmDN - Realm name in DN format.
searchPattern - Search pattern, such as "*", for the specified searchProperty parameter.
searchProperty - The property to be used for the search.
sort - Sorting type, which can be ascending, descending, or none.
pageSize - Page size for returned result. If zero is passed in, defaults to 50.
requestedProperties - Requested property names. Needs to be converted to directory service attributes inside the method.
continueFrom - The value to start from for the new page.
Returns:
A PrincipalInfoSet instance that contains a set of GroupInfo objects. The number of objects in the set is <= pageSize.
Throws:
javax.naming.NamingException


© Copyright IBM Corporation 2006, 2009. All rights reserved.