The UME provides several methods to search for users, groups and roles with different attributes. The search is performed with search filters.
Example to get a user search filter and start search:
IUserFactory ufact = UMFactory.getUserFactory(); // Provide the search attributes |
To search for roles is similar to search for users.
Example:
IRoleFactory rfact = UMFactory.getRoleFactory(); // Provide the search attributes |
The search attribute can be set with setDisplayName() method. This method allows exact searches or wildcard searches.
Example:
// Provide the search attributes, with wildcards before and after |
Depending on the search attribute, the search method returns one or several users or roles. The returned value is a ISearchResult object that can be iterated.
With the methods isMemberOfRole() or isMemberOfGroup() it can be determined if a user is a member of a particular role or group. The methods require the unique ID of the role or group.
Example:
IRole superRole= null; |