In the standard ATG Portal configuration, you can target alerts to individual users, to groups of users with the same security role (such as Community Leaders or Portal Administrators), to organizations, and to communities. The TargetHandler
interface provides methods for generating a list of users from a set of constraints, so that alerts can be sent to the appropriate individual or group.
public Collection selectTargets(User pUser, Collection pBag)
public Collection getConstraints(User pUser)
public RepositoryItem[] getUserList(String pTarget)
ATG Portal includes four classes that implement the TargetHandler
interface, one for each of the four basic ways of classifying users in a portal: CommunityTargetHandler
, OrganizationTargetHandler
, UserTargetHandler
, RoleTargetHandler
. For example, the CommunityTargetHandler
includes these methods:
Method | Description |
---|---|
| Returns a Collection of Community IDs |
| Returns a Collection of constraints |
| Returns an array of users for this community |
In addition, the CommunityTargetHandler
has a usersPerCommunity
property. This property represents the number of users that will be requested when getting the list of users belonging to a particular community. If the number of members in a community exceeds this count, the AlertMgr
will loop until all members have been retrieved in increments of this value.