The following is an example of adding the Alerts element to the Gear manifest file mentioned in Step 6 of Adding Custom Alert Messages to Gears above. Adding the Alerts element makes it possible to configure user preferences for the alerts from the My Alerts configuration page.

For information on the gear manifest syntax, refer to the Gear Packaging and Deployment chapter and the Appendix A, Portal Manifest Reference.

The following sample illustrates the syntax used in the gear manifest XML file for the alerts element, which must be placed within the <gear-definition> element set within the gear manifest.

...
<gear-definition name="Document Exchange" version="1.0" author="AUTHOR">
...
  <alerts>
    <alert-message name="DocumentCreatedMessage">
      <message-type>atg.portal.gear.docexch.DocumentCreatedMessage</message-type>
        <default-value>yes_locked</default-value>
          <resource-bundle>
          atg.portal.gear.docexch.DocumentCreatedResources
          </resource-bundle>
    </alert-message>
...
  </alerts>
...
</gear-definition>

The parameter default value can be one of the following:

Value

Description

yes_locked

The alert is sent to users automatically and they cannot opt out of receiving it.

yes_opened

The alert will be sent only to users who specifically request it.

no

The alert will not be sent by default.

Note: The resource-bundle parameter is defined by using the full package name of the resource bundle. This is recommended since it guarantees that the name will be unique.

 
loading table of contents...