org.eclnt.jsfserver.i18n

## Class I18N

- java.lang.Object
- - org.eclnt.jsfserver.i18n.I18N

- All Implemented Interfaces:
    java.io.Serializable, java.util.Map<java.lang.String,java.lang.String>

      public class I18N
      extends java.lang.Object
      implements java.util.Map<java.lang.String,java.lang.String>, java.io.Serializable

  Access of localized information that is required within the JSF server processing part of Enterprise Client. This class is instanciated as managed bean with request scope under the name "eclnti18n".
  The class does nothing else than delegating the get-method to a ResourceBundle:
  public String get(Object key)
  {
  ResourceBundle rb = ResourceBundle.getBundle(s_bundle,FacesContext.getCurrentInstance().getViewRoot().getLocale());
  return rb.getString(key.toString());
  }
  All other functions of Map are not implemented, i.e. this is pure read-only map in which only the get-method is implemented. As consequence it can be nicely used in expressions, e.g. "#{eclnt18n.OKPopup_ok}".
  You can override this class by overriding the s_bundle member in the constructor of your class and point it to your resource bundle.
  Attention: keys must not contain any "." because this is interpreted as property separator by JSF expressions.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `java.util.Map.Entry<K,V>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.lang.String` | `s_bundle`
    `protected static I18NConnector` | `s_connector`
    `protected static I18N` | `s_instance`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `I18N()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `boolean` | `containsKey(java.lang.Object key)`
    `boolean` | `containsValue(java.lang.Object value)`
    `java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>>` | `entrySet()`
    `java.lang.String` | `get(java.lang.Object key)`
    `java.lang.String` | `get(java.lang.Object key, java.lang.String nullDefault)`
    `static java.util.ResourceBundle` | `getBundle()` This method may only be called within a request processing.
    `static java.util.ResourceBundle` | `getBundle(java.lang.String language)` This method may only be called within a request processing.
    `static java.lang.String` | `getString(java.lang.String literalId)`
    `boolean` | `isEmpty()`
    `java.util.Set<java.lang.String>` | `keySet()`
    `java.lang.String` | `put(java.lang.String key, java.lang.String value)`
    `void` | `putAll(java.util.Map<? extends java.lang.String,? extends java.lang.String> m)`
    `java.lang.String` | `remove(java.lang.Object key)`
    `static void` | `setI18NConnector(I18NConnector connector)` Allows to pass an own mechanism for retrieving texts that are used within CaptainCasa default screens (e.g.
    `int` | `size()`
    `java.util.Collection<java.lang.String>` | `values()`

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

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

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll`

- - ### Field Detail

    - #### s_bundle

          protected static java.lang.String s_bundle

    - #### s_connector

          protected static I18NConnector s_connector

    - #### s_instance

          protected static I18N s_instance

  - ### Constructor Detail

    - #### I18N

          public I18N()

  - ### Method Detail

    - #### setI18NConnector

          public static void setI18NConnector(I18NConnector connector)

      Allows to pass an own mechanism for retrieving texts that are used within CaptainCasa default screens (e.g. Yes/No Popup). By default the literals are read from property files that are kept in elcntjsfserver.jar. But: you can provide the literal information on your own as well, by setting this interface.
      After setting the interface, I18N will first call your connector and only uses the default literals if your connector returns back null.

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### containsValue

          public boolean containsValue(java.lang.Object value)

      Specified by:
        `containsValue` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### entrySet

          public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> entrySet()

      Specified by:
        `entrySet` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### keySet

          public java.util.Set<java.lang.String> keySet()

      Specified by:
        `keySet` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### put

          public java.lang.String put(java.lang.String key,
                                      java.lang.String value)

      Specified by:
        `put` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### putAll

          public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.String> m)

      Specified by:
        `putAll` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### remove

          public java.lang.String remove(java.lang.Object key)

      Specified by:
        `remove` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### values

          public java.util.Collection<java.lang.String> values()

      Specified by:
        `values` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### containsKey

          public boolean containsKey(java.lang.Object key)

      Specified by:
        `containsKey` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### get

          public java.lang.String get(java.lang.Object key)

      Specified by:
        `get` in interface `java.util.Map<java.lang.String,java.lang.String>`

    - #### get

          public java.lang.String get(java.lang.Object key,
                                      java.lang.String nullDefault)

    - #### getString

          public static java.lang.String getString(java.lang.String literalId)

    - #### getBundle

          public static java.util.ResourceBundle getBundle()

      This method may only be called within a request processing.

    - #### getBundle

          public static java.util.ResourceBundle getBundle(java.lang.String language)

      This method may only be called within a request processing.

Copyright © CaptainCasa Gmbh. All Rights Reserved.