jet.server.api.nls
Interface GlobalNLSLibrary


public interface GlobalNLSLibrary

GlobalNLSLibrary is the manager Global NLS Library. In Global NLS Library, there are two kind of entities-- Locale, NLSEntry(TextNLSEntry and FontNLSEntry). There are one or more locale in the Global NLS Library, and a locale has one or more NLSEntry bond with it.

See Also:
NLSEntry, TextNLSEntry, FontNLSEntry

Method Summary
 boolean containsLocale(java.util.Locale locale)
          Tests whether a locale is contained in the Global NLS Library.
 java.util.List<java.util.Locale> getAvailableLocales()
          Gets all locales in Global NLS Library.
 FontNLSEntry getFontNLSEntry(java.util.Locale locale, java.lang.String orginalFaceName, int orginalPointSize)
          Gets a special Font NLS Entry(FontNLSEntry) from the Global NLS Library.
 FormatNLSEntry getFormatNLSEntry(java.util.Locale locale, java.lang.String keyFormat)
          Gets a Format NLS Entry(FormatNLSEntry) from the Global NLS Library.
 java.util.List<NLSEntry> getLocale(java.util.Locale locale)
          Gets the NLS entries bond with a locale in the Global NLS Library.
 java.util.List<FontNLSEntry> getLocaleFonts(java.util.Locale locale)
          Gets all Font NLS Entry(FontNLSEntry) bond with a locale in the Global NLS Library.
 java.util.List<FormatNLSEntry> getLocaleFormats(java.util.Locale locale)
          Gets all Format NLS Entry(FormatNLSEntry) bond with a locale in the Global NLS Library.
 java.util.List<TextNLSEntry> getLocaleTexts(java.util.Locale locale)
          Gets all Text NLS Entry(TextNLSEntry) bond with a locale in the Global NLS Library.
 TextNLSEntry getTextNLSEntry(java.util.Locale locale, NLSType type, java.lang.String keyText)
          Gets a Text NLS Entry(TextNLSEntry) from the Global NLS Library.
 boolean removeFontNLSEntry(java.util.Locale locale, FontNLSEntry entry)
          Removes a Font NLS Entry from the Global NLS Library.
 boolean removeFormatNLSEntry(java.util.Locale locale, FormatNLSEntry entry)
          Removes a Format NLS Entry from the Global NLS Library.
 boolean removeLocale(java.util.Locale locale)
          Removes a locale and all NLS entries bond with the locale from the Global NLS Library.
 boolean removeNLSEntry(java.util.Locale locale, NLSEntry entry)
          Removes a NLS entry from the Global NLS Library.
 boolean removeTextNLSEntry(java.util.Locale locale, TextNLSEntry entry)
          Removes a Text NLS Entry from the Global NLS Library.
 void updateFontNLSEntry(java.util.Locale locale, FontNLSEntry entry)
          Updates a Font NLS Entry bond with a locale in the Global NLS Library.
 void updateFormatNLSEntry(java.util.Locale locale, FormatNLSEntry entry)
          Updates a Format NLS Entry bond with a locale in the Global NLS Library.
 void updateLocale(java.util.Locale locale, java.util.List<NLSEntry> entries)
          Updates the NLS Entries bond with a locale in the Global NLS Library.
 void updateLocaleFonts(java.util.Locale locale, java.util.List<FontNLSEntry> entries)
          Updates the Font NLS Entries bond with a locale in the Global NLS Library.
 void updateLocaleFormats(java.util.Locale locale, java.util.List<FormatNLSEntry> entries)
          Updates the Format NLS Entries bond with a locale in the Global NLS Library.
 void updateLocaleTexts(java.util.Locale locale, java.util.List<TextNLSEntry> entries)
          Updates the Text NLS Entries bond with a locale in the Global NLS Library.
 void updateNLSEntry(java.util.Locale locale, NLSEntry entry)
          Updates a NLS Entry bond with a locale in the Global NLS Library.
 void updateTextNLSEntry(java.util.Locale locale, TextNLSEntry entry)
          Updates a Text NLS Entry bond with a locale in the Global NLS Library.
 

Method Detail

getAvailableLocales

java.util.List<java.util.Locale> getAvailableLocales()
Gets all locales in Global NLS Library.

Returns:
A List which contain all locales.

containsLocale

boolean containsLocale(java.util.Locale locale)
Tests whether a locale is contained in the Global NLS Library.

Parameters:
locale - The locale to test.
Returns:
Return True if the Global NLS Library contain it, otherwise false.

getLocale

java.util.List<NLSEntry> getLocale(java.util.Locale locale)
Gets the NLS entries bond with a locale in the Global NLS Library.

Parameters:
locale - The locale which was bond with the NLS entries.
Returns:
A list which contains all NLS entries, the NLS entry is one of TextNLSEntry and FontNLSEntry.

getLocaleTexts

java.util.List<TextNLSEntry> getLocaleTexts(java.util.Locale locale)
Gets all Text NLS Entry(TextNLSEntry) bond with a locale in the Global NLS Library.

Parameters:
locale - The locale which was bond with the Text NLS entries.
Returns:
A list which contains all Text NLS Entry(TextNLSEntry).

getLocaleFormats

java.util.List<FormatNLSEntry> getLocaleFormats(java.util.Locale locale)
Gets all Format NLS Entry(FormatNLSEntry) bond with a locale in the Global NLS Library.

Parameters:
locale - The locale which was bond with the Format NLS entries.
Returns:
A list which contains all Format NLS Entry(FormatNLSEntry).

getLocaleFonts

java.util.List<FontNLSEntry> getLocaleFonts(java.util.Locale locale)
Gets all Font NLS Entry(FontNLSEntry) bond with a locale in the Global NLS Library.

Parameters:
locale - The locale which was bond with the Font NLS entries.
Returns:
A list which contains all Font NLS Entry(FontNLSEntry).

getTextNLSEntry

TextNLSEntry getTextNLSEntry(java.util.Locale locale,
                             NLSType type,
                             java.lang.String keyText)
Gets a Text NLS Entry(TextNLSEntry) from the Global NLS Library.

Parameters:
locale - The locale which the Text NLS Entry was bond with.
type - The type of the Text NLS Entry.
keyText - The keyText of the Text NLS Entry.
Returns:
A TextNLSEntry, it maybe null if there is no Text NLS Entry specified by the type and keyText in the Global NLS Library.

getFormatNLSEntry

FormatNLSEntry getFormatNLSEntry(java.util.Locale locale,
                                 java.lang.String keyFormat)
Gets a Format NLS Entry(FormatNLSEntry) from the Global NLS Library.

Parameters:
locale - The locale which the Format NLS Entry was bond with.
keyFormat - The keyFormat of the Format NLS Entry.
Returns:
A FormatNLSEntry, it maybe null if there is no Format NLS Entry specified by the keyFormat in the Global NLS Library.

getFontNLSEntry

FontNLSEntry getFontNLSEntry(java.util.Locale locale,
                             java.lang.String orginalFaceName,
                             int orginalPointSize)
Gets a special Font NLS Entry(FontNLSEntry) from the Global NLS Library.

Parameters:
locale - The locale which the Font NLS Entry was bond with.
orginalFaceName - The orginalFaceName of the Font NLS Entry.
orginalPointSize - The orginalPointSize of the Font NLS Entry.
Returns:
A FontNLSEntry, it maybe null if there is no Font NLS Entry specified by the orginalFaceName and orginalPointSize in the Global NLS Library.

updateLocale

void updateLocale(java.util.Locale locale,
                  java.util.List<NLSEntry> entries)
Updates the NLS Entries bond with a locale in the Global NLS Library. After updating, the old NLS Entries bond with the locale will be removed, and the NLS Entries contained in the list entries will be added into the Global NLS Library, and they will bond with the locale.

Parameters:
locale - The locale which the NLS entries bond with.
entries - The NLS entries bond with a locale.

updateLocaleTexts

void updateLocaleTexts(java.util.Locale locale,
                       java.util.List<TextNLSEntry> entries)
Updates the Text NLS Entries bond with a locale in the Global NLS Library. After updating, the old Text NLS Entries bond with the locale will be removed, and the Text NLS Entries contained in the list entries will be added into the Global NLS Library, and they will bond with the locale.

Parameters:
locale - The locale which the Text NLS Entries bond with.
entries - The Text NLS entries bond with the locale.

updateLocaleFormats

void updateLocaleFormats(java.util.Locale locale,
                         java.util.List<FormatNLSEntry> entries)
Updates the Format NLS Entries bond with a locale in the Global NLS Library. After updating, the old Format NLS Entries bond with the locale will be removed, and the Format NLS Entries contained in the list entries will be added into the Global NLS Library, and they will bond with the locale.

Parameters:
locale - The locale which the Format NLS Entries bond with.
entries - The Format NLS entries bond with the locale.

updateLocaleFonts

void updateLocaleFonts(java.util.Locale locale,
                       java.util.List<FontNLSEntry> entries)
Updates the Font NLS Entries bond with a locale in the Global NLS Library. After updating, the old Font NLS Entries bond with the locale will be removed, and the Font NLS Entries contained in the list entries will be added into the Global NLS Library, and they will bond with the locale.

Parameters:
locale - The locale which the Font NLS Entries bond with.
entries - The Font NLS entries bond with the locale.

updateNLSEntry

void updateNLSEntry(java.util.Locale locale,
                    NLSEntry entry)
Updates a NLS Entry bond with a locale in the Global NLS Library. If there is a same NLS Entry in the Global NLS Library already, it will be replaced. Otherwise, a NLS Entry will add into the Global NLS Library.

Parameters:
locale - The locale which the NLS Entry bond with.
entry - The NLS entry bond with the locale.

updateTextNLSEntry

void updateTextNLSEntry(java.util.Locale locale,
                        TextNLSEntry entry)
Updates a Text NLS Entry bond with a locale in the Global NLS Library. If there is a same Text NLS Entry in the Global NLS Library already, it will be replaced. Otherwise, a Text NLS Entry will add into the Global NLS Library.

Parameters:
locale - The locale the Text NLS Entry bond with.
entry - The Text NLS entry bond with the locale.

updateFormatNLSEntry

void updateFormatNLSEntry(java.util.Locale locale,
                          FormatNLSEntry entry)
Updates a Format NLS Entry bond with a locale in the Global NLS Library. If there is a same Format NLS Entry in the Global NLS Library already, it will be replaced. Otherwise, a Format NLS Entry will add into the Global NLS Library.

Parameters:
locale - The locale the Format NLS Entry bond with.
entry - The Format NLS entry bond with the locale.

updateFontNLSEntry

void updateFontNLSEntry(java.util.Locale locale,
                        FontNLSEntry entry)
Updates a Font NLS Entry bond with a locale in the Global NLS Library. If there is a same Font NLS Entry in the Global NLS Library already, it will be replaced. Otherwise, a Font NLS Entry will add into the Global NLS Library.

Parameters:
locale - The locale which the Font NLS Entry bond with.
entry - The Font NLS entry bond with the locale.

removeNLSEntry

boolean removeNLSEntry(java.util.Locale locale,
                       NLSEntry entry)
Removes a NLS entry from the Global NLS Library.

Parameters:
locale - The locale which the NLS Entry bond with.
entry - The entry which you want to remove.
Returns:
Return true if the NLS Entry contained in the Global NLS Library, otherwise false.

removeTextNLSEntry

boolean removeTextNLSEntry(java.util.Locale locale,
                           TextNLSEntry entry)
Removes a Text NLS Entry from the Global NLS Library.

Parameters:
locale - The locale which the Text NLS Entry bond with.
entry - The entry which you want to remove.
Returns:
Return true if the Text NLS Entry contained in the Global NLS Library, otherwise false.

removeFormatNLSEntry

boolean removeFormatNLSEntry(java.util.Locale locale,
                             FormatNLSEntry entry)
Removes a Format NLS Entry from the Global NLS Library.

Parameters:
locale - The locale which the Format NLS Entry bond with.
entry - The entry which you want to remove.
Returns:
Return true if the Format NLS Entry contained in the Global NLS Library, otherwise false.

removeFontNLSEntry

boolean removeFontNLSEntry(java.util.Locale locale,
                           FontNLSEntry entry)
Removes a Font NLS Entry from the Global NLS Library.

Parameters:
locale - The locale which the Font NLS Entry bond with.
entry - The entry which you want to remove.
Returns:
Return true if the Font NLS Entry contained in the Global NLS Library, otherwise false.

removeLocale

boolean removeLocale(java.util.Locale locale)
Removes a locale and all NLS entries bond with the locale from the Global NLS Library.

Parameters:
locale - The locale which you want to remove.
Returns:
Return true if the locale contained in the Global NLS Library.