org.appng.api.support

## Class MessageSourceChain

- java.lang.Object
- - org.appng.api.support.MessageSourceChain

- All Implemented Interfaces:
    org.springframework.context.MessageSource

      public class MessageSourceChain
      extends Object
      implements org.springframework.context.MessageSource

  A `MessageSource` that wraps multiple `MessageSource` and processes them in sequence. The message is always taken from the first `MessageSource` that returns a non-`null` value (if any).
  Author:
    Matthias Müller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageSourceChain()`
    `MessageSourceChain(org.springframework.context.MessageSource... messageSources)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMessage(org.springframework.context.MessageSourceResolvable resolvable, Locale locale)`
    `String` | `getMessage(String code, Object[] args, Locale locale)`
    `String` | `getMessage(String code, Object[] args, String defaultMessage, Locale locale)`
    `org.springframework.context.MessageSource[]` | `getMessageSources()`
    `void` | `setMessageSources(org.springframework.context.MessageSource[] messageSources)`

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

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

- - ### Constructor Detail

    - #### MessageSourceChain

          public MessageSourceChain()

    - #### MessageSourceChain

          public MessageSourceChain(org.springframework.context.MessageSource... messageSources)

  - ### Method Detail

    - #### getMessage

          public String getMessage(String code,
                                   Object[] args,
                                   String defaultMessage,
                                   Locale locale)

      Specified by:
        `getMessage` in interface `org.springframework.context.MessageSource`

    - #### getMessage

          public String getMessage(String code,
                                   Object[] args,
                                   Locale locale)
                            throws org.springframework.context.NoSuchMessageException

      Specified by:
        `getMessage` in interface `org.springframework.context.MessageSource`
      Throws:
        `org.springframework.context.NoSuchMessageException`

    - #### getMessage

          public String getMessage(org.springframework.context.MessageSourceResolvable resolvable,
                                   Locale locale)
                            throws org.springframework.context.NoSuchMessageException

      Specified by:
        `getMessage` in interface `org.springframework.context.MessageSource`
      Throws:
        `org.springframework.context.NoSuchMessageException`

    - #### getMessageSources

          public org.springframework.context.MessageSource[] getMessageSources()

    - #### setMessageSources

          public void setMessageSources(org.springframework.context.MessageSource[] messageSources)

Copyright © 2011–2023 aiticon GmbH. All rights reserved.