org.ow2.weblab.service.normaliser.tika
Class Messages

java.lang.Object
  extended by org.ow2.weblab.service.normaliser.tika.Messages

public abstract class Messages
extends java.lang.Object

A utility class that enable to access the resource bundle and to use MessageFormat parsing for parametrised messages.

Author:
WebLab IPCC Team
Date:
2011-06-16

Method Summary
static java.lang.String getString(java.lang.String key)
          Lookup in the ResourceBundle for the key in parameter.
static java.lang.String getString(java.lang.String key, java.lang.Object... params)
          Lookup in the ResourceBundle for the key in parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static java.lang.String getString(java.lang.String key)
Lookup in the ResourceBundle for the key in parameter.

Parameters:
key - The key in the resource bundle.
Returns:
The value in the resource file.

getString

public static java.lang.String getString(java.lang.String key,
                                         java.lang.Object... params)
Lookup in the ResourceBundle for the key in parameter. The parameters in ellipse are used through the MessageFormat.format(String, Object...) method.

Parameters:
key - The key of the message.
params - The array used by the inner message formatter class to replace informations in the message.
Returns:
The value associated to the key in the property file, or !key!. Using the array in parameter to replace some values.


Copyright © 2004-2012. All Rights Reserved.