org.deegree.client.core.utils
Class MessageUtils

java.lang.Object
  extended by org.deegree.client.core.utils.MessageUtils

public class MessageUtils
extends Object

MessageUtils

Version:
$Revision: $, $Date: $
Author:
Lyn Buesching, last edited by: $Author: lyn $

Constructor Summary
MessageUtils()
           
 
Method Summary
static javax.faces.application.FacesMessage getFacesMessage(javax.faces.application.FacesMessage.Severity severity, String key, Object... args)
           
static String getResourceText(String bundleName, String key, Object... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageUtils

public MessageUtils()
Method Detail

getResourceText

public static String getResourceText(String bundleName,
                                     String key,
                                     Object... args)
Parameters:
bundleName - the name of the resource bundle, must not be null
key - the message key, must not be null
args - a list of arguments
Returns:
the formated text, or ?key?, if the resource bundle or key does not exist

getFacesMessage

public static javax.faces.application.FacesMessage getFacesMessage(javax.faces.application.FacesMessage.Severity severity,
                                                                   String key,
                                                                   Object... args)
Parameters:
severity - the severity level of the message, must not be null
key - the message key, must not be null
args - a list of arguments
Returns:
A faces message with the given severity. The text of the FacesMessage will be searched in three locations: 1. in the application bundle 2. in the the deegree bundle 3. in the JSF bundle The first of the undle conatining the KEY will be choosed to take the message summary (KEY) and message detail (KEY_detail).


Copyright © 2011. All Rights Reserved.