IMessageConveyor (Compiler assisted localization library (CAL10N) - Parent 0.7.7 API)
Date: 2013-03-18

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ch.qos.cal10n
Interface IMessageConveyor

All Known Implementing Classes:
  MessageConveyor

    public interface IMessageConveyor

Retrieve a localized message by its key as specified by an enum.

The strategy in retrieving messages may vary from implementation to implementation.

Author:
  Ceki Gülcü

Method Summary
`
`<E extends Enum<?>> String`
` | `getMessage(E key, Object... args)` Retrieve a localized message by its key as specified by an enum.
`String` | `getMessage(MessageParameterObj mpo)` Syntactic sugar for the case where the massage is contained in a `MessageParameterObj`.

Method Detail

### getMessage

    <E extends Enum<?>> String getMessage(E key,
                                          Object... args)
                      throws MessageConveyorException

  Retrieve a localized message by its key as specified by an enum.

  Note that any further arguments passed in 'args' will be interpolated using the translated message. The interpolation will be done by and according to conventions of `MessageFormat`.

  Type Parameters:
    `E` - an enum type
  Parameters:
    `key` - an enum instance
    `args` - optional arguments
  Returns:
    The translated/localized message
  Throws:
    `MessageConveyorException`

### getMessage

    String getMessage(MessageParameterObj mpo)
                      throws MessageConveyorException

  Syntactic sugar for the case where the massage is contained in a `MessageParameterObj`.

  Equivalent to calling

       getMessage(mpo.getKey(), mpo.getArgs());

  Parameters:
    `mpo` - The MessageParameterObj to translate
  Returns:
    translated message
  Throws:
    `MessageConveyorException`
  See Also:
    `getMessage(Enum, Object...)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009-2013 QOS.ch. All Rights Reserved.