Service Registry 3 2005Q4 Developer's Guide

Adding Names and Descriptions to Objects

For all objects, you can set the name and description attributes by calling setter methods. These attributes are of type InternationalString. An InternationalString includes a set of LocalizedString objects that allow users to display the name and description in one or more locales. By default, the InternationalString value uses the default locale.

For example, the following fragment creates a description that uses two localized strings. One string is in the language of the default locale. The other string is in Canadian French.

InternationalString is =
    blcm.createInternationalString("What We Do"));
Locale loc = new Locale("fr", "CA");
LocalizedString ls = blcm.createLocalizedString(loc,
     "ce que nous faisons");
is.addLocalizedString(ls);
org.setDescription(is);