Package com.crystaldecisions.sdk.plugin.desktop.usergroup

This package allows you to manage user groups and their group associates.

See:
          Description

Interface Summary
IUserGroup The IUserGroup interface stores information about a group and manages its group associates (users, parent groups, and subgroups).
IUserGroupAlias An IUserGroupAlias interface is created automatically when a group is added to the system.
IUserGroupAliases A user group alias is another name for a group--one that never changes, even if the group name does.
IUserGroupBase The IUserGroupBase interface stores information about a group and manages its group associates (users, parent groups, and subgroups).
 

Package com.crystaldecisions.sdk.plugin.desktop.usergroup Description

This package allows you to manage user groups and their group associates. Each group may have three types of group associates that are related to it:

Group members may be native Enterprise users, or they may be users whose third-party group has been mapped to the system. User management for third-party groups is handled by the APS. Also, Enterprise users can only be added to groups that have an Enterprise alias. For information on mapping third-party groups, see Authentication plugins.

Note: The User plugin allows you to add new users and to determine their group membership, whereas the UserGroup plugin allows you to add new groups and determine the users that belong to these groups. The user's group list and the group's user list are synchronized.

The diagram below illustrates the object model that is implemented by the UserGroup plugin:

Retrieving desktop plugins

Each object that is created with a desktop plugin is stored in either the CI_INFOOBJECTS or the CI_SYSTEMOBJECTS category in the APS InfoStore, and is marked with a programmatic identifier (ProgID). Using SI_PROGID, you can query the APS InfoStore for a collection of objects.

Example

The following query selects the names, and IDs of all UserGroup objects in the APS:

IInfoObjects userGroupObjs = iStore.query("SELECT SI_NAME, SI_ID FROM CI_SYSTEMOBJECTS Where SI_PROGID='CrystalEnterprise.UserGroup');

The query method returns a collection of InfoObjects, which in this case are IUserGroup objects. Like other InfoObjects, these objects are uniquely represented by their ID property. For each object in the collection, you can access general InfoObject properties, such as the SI_NAME property, SI_DESCRIPTION property, and SI_ID property.

To access the IUserGroup objects returned by the query, the resulting IInfoObjects need to be cast. This example demonstrates how to cast the returned IInfoObjects as IUserGroup objects.

for (int i = 0; i < userGroupObjs.size(); i++)
{
    IInfoObject obj = (IInfoObject) userGroupObjs.get(i);
    IUserGroup userGroup = (IUserGroup) obj;
}