Artefacts Produced by msggen Build Target

The Java artefacts (symbol definition and message catalog files) produced from a merged message file, are placed in the / build/svr/message/gen/<package> directory, where <package> is the package attribute specified in the message file. For example, package="curam.message" would result in the Java artefacts being placed in the / build/svr/message/gen/curam/message directory.

The directory contains the Java files (which are locale independent) and the property files (which are locale dependent) which are named <Message File name>_<specific language>_<specific country>.properties.

Note: If message files of the same name exist in different components with a different package attribute value, then the generated artefacts (symbol definition and message catalog files) produced are placed in the package specified by the message file of the component with the highest precedence order (as listed in the SERVER_COMPONENT_ORDER environment variable).

These artefacts are best illustrated by example:

Figure 1. Java file produced from merged message file
package curam.message;
import curam.util.message.CatEntry;
import curam.util.message.MessageCatalog
public final class SampleMessages {

  private static final MessageCatalog kCat =
    new MessageCatalog("curam.message.SampleMessages");

  /**
   * BpoActivity:ERR_SAMPLE_VALIDATION_MSG
   * en_UK = The specified colour is not valid.
   * en_US = The specified color is not valid.
   */
  public static final CatEntry ERR_SAMPLE_VALIDATION_MSG

   = kCat.entry("ERR_SAMPLE_VALIDATION_MSG");

  /**
   * BpoActivity:ERR_SAMPLE_ERROR_MSG
   * en_US = An external resource is not available.
   */
  public static final CatEntry ERR_SAMPLE_ERROR_MSG
    = kCat.entry("ERR_SAMPLE_ERROR_MSG");

  /**
   * BpoActivity:ERR_SAMPLE_NEW_MSG
   * en_GB = An example of localisation.
   */
  public static final CatEntry ERR_SAMPLE_NEW_MSG
    = kCat.entry("ERR_SAMPLE_NEW_MSG");
}
Figure 2. Sample (UK) Properties produced from message file
ERR_SAMPLE_VALIDATION_MSG=The specified colour is not valid.
ERR_SAMPLE_NEW_MSG=An example of localisation.

At the end of the msggen step these property files are placed into a .jar file which is used by the client to localize the messages that are returned to it.