The following is an example of the atg.portal.gear.docexch.DocumentCreatedResources properties file mentioned in Step 7 of Adding Custom Alert Messages to Gears above.

The java.util.ResourceBundle property files contain locale-specific objects for use by Java classes. The ResourceBundle property file must be placed somewhere in the CLASSPATH. Typically this is best accomplished by placing the ResourceBundle properties file in the same directory as the gear message class that it maps to.

The ResourceBundle properties file specifies the alert notification string and the properties that will be used to format the string. The java.text.MessageFormat class performs the formatting. The alertPropertyNames key specifies a list of properties of the gear message JavaBean; those properties are converted to strings and inserted into the alert notification text, which is defined by the resource key alertDisplayString. This resource key contains placeholders for the properties of the message that are to be inserted. For instance, the placeholder {0} receives a string obtained by retrieving the first property specified, documentName.

The alertEmailTemplate property refers to a JSP page fragment that will be used by the Alert Manager to notify users of the alert via e-mail. This is only required if you wish to support e-mail notifications (rather than just notifications in the Alert gear.) The e-mail template is discussed more in the next step.

#
# Web displayable string that is used for the alert notification. The
# place holders are replaced by properties retrieved from the message bean.
#
alertDisplayString=The Document {0} has been created by {1}

#
# Properties that are used to format the unformatted alertDisplayString above.
# Delimited by a comma without any spaces.
#
alertPropertyNames=documentName,authorName

#
# The email template file that will be used to create email content
# for the targeted email. Should be located in a directory in the DOCPATH.
#
alertEmailTemplate=/Portal/email/DocCreatedEmail.jsp

Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices