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

## org.apache.myfaces.shared_orchestra.util
Class MessageUtils

    java.lang.Object
      org.apache.myfaces.shared_orchestra.util.MessageUtils

    public final class MessageUtils

extends java.lang.Object

Utility class to support multilingual FacesMessages using ResourceBundles. Standard messages are stored at `DEFAULT_BUNDLE`.
The summary of the message is stored at the requested key value. The detail of the message is stored at <messageId>_detail.

Version:
  $Revision: 472630 $ $Date: 2006-11-08 21:40:03 +0100 (Mi, 08 Nov 2006) $
Author:
  Thomas Spiegl (latest modification by $Author: grantsmith $), Manfred Geiler, Sean Schofield, Stpehan Strittmatter
See Also:
  `FacesMessage`, `ResourceBundle`

Method Summary
`static void` | `addMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String messageId, java.lang.Object[] args)`
`static void` | `addMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String messageId, java.lang.Object[] args, javax.faces.context.FacesContext facesContext)`
`static void` | `addMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String messageId, java.lang.Object[] args, java.lang.String forClientId)`
`static void` | `addMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String messageId, java.lang.Object[] args, java.lang.String forClientId, javax.faces.context.FacesContext facesContext)`
`static java.util.Locale` | `getCurrentLocale()`
`static javax.faces.application.FacesMessage` | `getMessage(javax.faces.context.FacesContext context, java.lang.String messageId)`
`static javax.faces.application.FacesMessage` | `getMessage(javax.faces.context.FacesContext context, java.lang.String messageId, java.lang.Object[] params)`
`static javax.faces.application.FacesMessage` | `getMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String messageId, java.lang.Object arg)`
`static javax.faces.application.FacesMessage` | `getMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String messageId, java.lang.Object[] args)`
`static javax.faces.application.FacesMessage` | `getMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String messageId, java.lang.Object[] args, javax.faces.context.FacesContext facesContext)`
`static javax.faces.application.FacesMessage` | `getMessage(javax.faces.application.FacesMessage.Severity severity, java.lang.String bundleBaseName, java.lang.String messageId, java.lang.Object[] params)`
`static javax.faces.application.FacesMessage` | `getMessage(java.util.Locale locale, java.lang.String messageId, java.lang.Object[] params)`
`static javax.faces.application.FacesMessage` | `getMessage(java.util.ResourceBundle bundle, java.lang.String messageId, java.lang.Object[] params)`
`static javax.faces.application.FacesMessage` | `getMessage(java.lang.String bundleBaseName, java.util.Locale locale, java.lang.String messageId, java.lang.Object[] params)`
`static javax.faces.application.FacesMessage` | `getMessage(java.lang.String messageId, java.lang.Object[] params)`
`static javax.faces.application.FacesMessage` | `getMessage(java.lang.String bundleBaseName, java.lang.String messageId, java.lang.Object[] params)`
`static java.lang.String` | `substituteParams(java.util.Locale locale, java.lang.String msgtext, java.lang.Object[] params)` Uses `MessageFormat` and the supplied parameters to fill in the param placeholders in the String.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getMessage

    public static javax.faces.application.FacesMessage getMessage(javax.faces.application.FacesMessage.Severity severity,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object arg)

  Parameters:
    `severity` - serverity of message
    `messageId` - id of message
    `arg` - arument of message
  Returns:
    generated FacesMessage

### getMessage

    public static javax.faces.application.FacesMessage getMessage(javax.faces.application.FacesMessage.Severity severity,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] args)

  Parameters:
    `severity` - serverity of message
    `messageId` - id of message
    `args` - aruments of message
  Returns:
    generated FacesMessage

### getMessage

    public static javax.faces.application.FacesMessage getMessage(javax.faces.application.FacesMessage.Severity severity,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] args,
                                                                  javax.faces.context.FacesContext facesContext)

### addMessage

    public static void addMessage(javax.faces.application.FacesMessage.Severity severity,
                                  java.lang.String messageId,
                                  java.lang.Object[] args)

### addMessage

    public static void addMessage(javax.faces.application.FacesMessage.Severity severity,
                                  java.lang.String messageId,
                                  java.lang.Object[] args,
                                  javax.faces.context.FacesContext facesContext)

### addMessage

    public static void addMessage(javax.faces.application.FacesMessage.Severity severity,
                                  java.lang.String messageId,
                                  java.lang.Object[] args,
                                  java.lang.String forClientId)

### addMessage

    public static void addMessage(javax.faces.application.FacesMessage.Severity severity,
                                  java.lang.String messageId,
                                  java.lang.Object[] args,
                                  java.lang.String forClientId,
                                  javax.faces.context.FacesContext facesContext)

### substituteParams

    public static java.lang.String substituteParams(java.util.Locale locale,
                                                    java.lang.String msgtext,
                                                    java.lang.Object[] params)

  Uses `MessageFormat` and the supplied parameters to fill in the param placeholders in the String.

  Parameters:
    `locale` - The `Locale` to use when performing the substitution.
    `msgtext` - The original parameterized String.
    `params` - The params to fill in the String with.
  Returns:
    The updated String.

### getMessage

    public static javax.faces.application.FacesMessage getMessage(java.lang.String messageId,
                                                                  java.lang.Object[] params)

### getMessage

    public static javax.faces.application.FacesMessage getMessage(java.util.Locale locale,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] params)

### getMessage

    public static javax.faces.application.FacesMessage getMessage(java.lang.String bundleBaseName,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] params)

  Parameters:
    `bundleBaseName` - baseName of ResourceBundle to load localized messages
    `messageId` - id of message
    `params` - parameters to set at localized message
  Returns:
    generated FacesMessage

### getCurrentLocale

    public static java.util.Locale getCurrentLocale()

  Returns:
    currently applicable Locale for this request.

### getMessage

    public static javax.faces.application.FacesMessage getMessage(javax.faces.application.FacesMessage.Severity severity,
                                                                  java.lang.String bundleBaseName,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] params)

  Parameters:
    `severity` - severity of message
    `bundleBaseName` - baseName of ResourceBundle to load localized messages
    `messageId` - id of message
    `params` - parameters to set at localized message
  Returns:
    generated FacesMessage

### getMessage

    public static javax.faces.application.FacesMessage getMessage(java.lang.String bundleBaseName,
                                                                  java.util.Locale locale,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] params)

  Parameters:
    `bundleBaseName` - baseName of ResourceBundle to load localized messages
    `locale` - current locale
    `messageId` - id of message
    `params` - parameters to set at localized message
  Returns:
    generated FacesMessage

### getMessage

    public static javax.faces.application.FacesMessage getMessage(java.util.ResourceBundle bundle,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] params)

  Parameters:
    `bundle` - ResourceBundle to load localized messages
    `messageId` - id of message
    `params` - parameters to set at localized message
  Returns:
    generated FacesMessage

### getMessage

    public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context,
                                                                  java.lang.String messageId)

  Parameters:
    `context` -
    `messageId` -
  Returns:
    generated FacesMessage

### getMessage

    public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context,
                                                                  java.lang.String messageId,
                                                                  java.lang.Object[] params)

  Parameters:
    `context` -
    `messageId` -
    `params` -
  Returns:
    generated FacesMessage

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 The Apache Software Foundation. All Rights Reserved.