com.comtrade.ecm.engine.i18n

## Class TextManagerDefault

- java.lang.Object
- - com.comtrade.ecm.engine.i18n.TextManagerDefault

- All Implemented Interfaces:
    TextManager, EcmService

      public class TextManagerDefault
      extends java.lang.Object
      implements TextManager

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextManagerDefault()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addListener(TextManagerListener listener)` Sets a listener `TextManagerListener` to `TextManager`-object
    `java.lang.String` | `getString(java.lang.String key, java.util.Locale locale)`
    `java.lang.String` | `getString(java.lang.String bundleFamily, java.lang.String key, java.util.Locale locale)`
    `void` | `registerBundle(java.lang.String bundleFamilyName)` Registers new bundle-family identified by its filename. Registered/added bundle-family will be used in the process of localization.
    `void` | `registerClassBundle(java.lang.Class<?> bundleFamilyClass)` Registers new bundle-family class. Registered/added bundle-family will be used in the process of localization.
    `void` | `removeListener(TextManagerListener listener)` Removes a listener `TextManagerListener` from `TextManager`-object
    `void` | `setForceToLatin(boolean forceToLatin)` Instructs TextManager to force (or not to force) conversion to latin alphabet
    `void` | `unregisterBundle(java.lang.String bundleFamilyName)` Removes bundle-family from process of localization
    `void` | `unregisterClassBundle(java.lang.Class<?> bundleFamilyClass)` Removes bundle-family from process of localization

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextManagerDefault

          public TextManagerDefault()

  - ### Method Detail

    - #### getString

          public java.lang.String getString(java.lang.String bundleFamily,
                                            java.lang.String key,
                                            java.util.Locale locale)

      Specified by:
        `getString` in interface `TextManager`
      Parameters:
        `bundleFamily` - `ResourceBundle` which should be primarily used for localization
        `key` - Localization key
        `locale` - `Locale` to be used for localization
      Returns:
        Localized key

    - #### getString

          public java.lang.String getString(java.lang.String key,
                                            java.util.Locale locale)

      Specified by:
        `getString` in interface `TextManager`
      Parameters:
        `key` - Localization key
        `locale` - `Locale` to be used for localization
      Returns:
        Localized key

    - #### addListener

          public void addListener(TextManagerListener listener)

      Description copied from interface: `TextManager`
      Sets a listener `TextManagerListener` to `TextManager`-object
      Specified by:
        `addListener` in interface `TextManager`
      Parameters:
        `listener` - `TextManagerListener` to be set

    - #### removeListener

          public void removeListener(TextManagerListener listener)

      Description copied from interface: `TextManager`
      Removes a listener `TextManagerListener` from `TextManager`-object
      Specified by:
        `removeListener` in interface `TextManager`
      Parameters:
        `listener` - `TextManagerListener` to be removed

    - #### registerBundle

          public void registerBundle(java.lang.String bundleFamilyName)

      Description copied from interface: `TextManager`
      Registers new bundle-family identified by its filename.
      Registered/added bundle-family will be used in the process of localization.
      Specified by:
        `registerBundle` in interface `TextManager`
      Parameters:
        `bundleFamilyName` - Filename of a bundle-family to be registered

    - #### unregisterBundle

          public void unregisterBundle(java.lang.String bundleFamilyName)

      Description copied from interface: `TextManager`
      Removes bundle-family from process of localization
      Specified by:
        `unregisterBundle` in interface `TextManager`
      Parameters:
        `bundleFamilyName` - Filename of a bundle-family to be removed

    - #### registerClassBundle

          public void registerClassBundle(java.lang.Class<?> bundleFamilyClass)

      Description copied from interface: `TextManager`
      Registers new bundle-family class.
      Registered/added bundle-family will be used in the process of localization.
      Specified by:
        `registerClassBundle` in interface `TextManager`
      Parameters:
        `bundleFamilyClass` - Class of a bundle-family to be registered

    - #### unregisterClassBundle

          public void unregisterClassBundle(java.lang.Class<?> bundleFamilyClass)

      Description copied from interface: `TextManager`
      Removes bundle-family from process of localization
      Specified by:
        `unregisterClassBundle` in interface `TextManager`
      Parameters:
        `bundleFamilyClass` - Class of a bundle-family to be removed

    - #### setForceToLatin

          public void setForceToLatin(boolean forceToLatin)

      Description copied from interface: `TextManager`
      Instructs TextManager to force (or not to force) conversion to latin alphabet
      Specified by:
        `setForceToLatin` in interface `TextManager`
      Parameters:
        `forceToLatin` - Whether we should force transformation to latin characters