com.comtrade.ecm.engine.objects

## Class EcmMessagePart

- java.lang.Object
- - com.comtrade.ecm.engine.objects.EcmMessagePart

- All Implemented Interfaces:
    java.io.Serializable

      public class EcmMessagePart
      extends java.lang.Object
      implements java.io.Serializable

  An object that keeps information about a part of the message that is going to be presented to a user.
  For example, it can be shown on the screen, or written in a log-file, or saved in the database (possibly, many other scenarios may be "invented").
  Every `EcmMessagePart` can be used
  - literally (exactly as it is), if `toBeLocalized` is false, or
  - in its localized form (if localization is possible), if `toBeLocalized` is true.
  A conversion to a String is not performed inside this object. This objects only saves necessary logical information. Conversion is performed in some calling objects, where full information (regarding user's Locale settings) is available.
  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getContent()`
    `boolean` | `isToBeLocalized()`
    `static EcmMessagePart` | `localized(java.io.Serializable content)` Creates a message that should (if possible) be localized
    `java.lang.String` | `toString()`
    `static EcmMessagePart` | `unlocalized(java.io.Serializable content)` Creates a message that should not be localized

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

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

- - ### Method Detail

    - #### localized

          public static EcmMessagePart localized(java.io.Serializable content)

      Creates a message that should (if possible) be localized
      Parameters:
        `content` - A content that should be localized
      Returns:
        A reference to `EcmMessagePart` object

    - #### unlocalized

          public static EcmMessagePart unlocalized(java.io.Serializable content)

      Creates a message that should not be localized
      Parameters:
        `content` - A content that should not be localized
      Returns:
        A reference to `EcmMessagePart` object

    - #### getContent

          public java.lang.Object getContent()

      Returns:
        `content`

    - #### isToBeLocalized

          public boolean isToBeLocalized()

      Returns:
        `toBeLocalized`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`