|
Alerts preferences and settingsThere are two important repositories involved here. The PortalRepository and the AlertsRepository. The two are cross referenced and it's worth checking them out in the ACC although the relationships between the repository items are not obvious at first. Gear Alert Preferences and Alert ViewingEach gear definition has a gearAlerts property which describes the default setting for which alerts will be picked out of the AlertsRepository by the AlertRepositoryManager for display be the Alert Gear. For each each message type there is a 'default_value' setting which can be either yes_locked or no. yes_locked means the alerts will be displayed, no means that they will not. This property is actually map between the alert names and Alert Gear Preference (alert_gear_def) repository items in the AlertsRepository. This map is initialized from the values in the alerts section of the gear manifest file as follows: When the gear manifest was loaded, the manifest values for the alerts are used to create an entry in the 'Alert gear definition preferences' view of the Alerts repository:
In addition to the gear definition property, each Gear instance also has a gearAlerts property which describes which alerts can be sent by this gear. This property is a map between the alert name and an Alert Gear Preference (alert_gear) repository item in the Alerts repository:
When a gear instance is created, values from the 'Alert Gear Definition Preferences' are copied to the gear instance's 'Alert Gear Preferences'. Instance Configuration of Alert Gear PreferencesIn the previous section we discussed how the default Alter Gear Preferences are set. All the built in gears offer the community administrator the ability to change this setting in the gear's instance config. This is set up on the gear's instance config page using the atg.portal.admin.AlertConfigBean to collect the form input and the paf:handleAlertConfig tag to actually commit the changes. The page looks something like this: (source code)
As the form is submitted the jsp page sets the gearAlertPref property on the AlertConfigBean. The AlertConfigBean is passed into the paf:handleAlertConfig tag and the string value is used to set the the 'default_value' of the every alert_gear in the gearAlerts property of the gear instance.
atg.portal.admin.AlertConfigBeanUsed to collect the form input from the instanceConfig alert configuration form. Basically a single value which is either 'no' or 'yes_locked'. This value is used to configure the gear's gearAlerts value for each alert type which is may send by the paf:handleAlertConfig tag. paf:handleAlertConfigTakes in the AlertConfigBean and actually applies the settings to the gear instance. It applies the setting to alert_gear objects in the gearAlerts map as well as setting the gear's instance parameter 'globalAlertMode'. NOTE: A well designed gear might declare and check the value of the gear's instance parameter 'globalAlertMode' and decide whether or not to actually send the messages. The Alert Gear - Viewing the Alerts in the RepositoryThe Alerts gear uses the GetAlertsTag to get the Alerts for the user, the tag in turn uses the AlertsRepositoryManager to get the Alerts from the repository. The AlertsRepositoryManager examines the Alert gear instance configuration to see what Alerts to retrieve, but importantly, it examines the alert source gears' gearAlerts map to see which to display to the user and only returns Alerts explicitly enabled, regardless of whether or not they are in the repository. Interestingly, the gear instances' gearAlerts maps will not be there (will be null) unless the community administrator has run the alerts configuration for that gear instance. So by default no alerts will appear in the alerts gear Setting up the Alert GearThe community administrator can add the alert gear to the community via the
community administration pages.
Aggregated Community AlertsIf this is enabled the GetEventsTag returns all the community Alerts for all communities of which this user is a member. If it is disabled only community alerts for the current community are shown. Community alertsWhen enabled the Alert Gear queries the AlertRepository for community Alerts and displays them to the user. When disabled the 'Community Targeted Messages' section is not shown in the gear. (Controls the display of alert type == 'community' Alerts) Role alertsWhen enabled the Alert Gear queries the AlertRepository for role Alerts
and displays them to the user. When disabled the 'Role Targeted Messages'
section is not shown in the gear. (Controls the display of alert type == 'role'
Alerts) Organization alerts (Communities are not organizations)When enabled the Alert Gear queries the AlertRepository for
organization Alerts
and displays them to the user. When disabled the 'Organization Targeted Messages'
section is not shown in the gear. (Controls the display of alert type ==
'organization'
Alerts). User alertWhen enabled the Alert Gear queries the AlertRepository for user Alerts
and displays them to the user. When disabled the 'User Targeted Messages'
section is not shown in the gear. (Controls the display of alert type == 'user'
Alerts). Alert Channels Individual users configure their channel preferences in the My
Alerts page, to receive a message on a channel the user must have enabled
the channel on the My Alerts page. My Alerts - User Delivery Channel OptionsA user can specify if they wish to receive alerts via email in addition to via the alerts gear by clicking on the MyAlerts link in the community. For each message type from each gear in that community the user can toggle their email preference. It's not possible to completely unsubscribe from a message at the user level.
Clicking MyAlerts takes the user to this page This modifies the Alerts->Alert Notify Preferences (alertNotifyPreferences) in the users Profile. The user may have an alert preference for each gear instance in each community. Checking the email option adds 'Email' to the list of channels for that gear message. Normally the channels list is empty. See the section on Alert Channels |
|