org.apache.tomcat.maven.common.messages
Class DefaultMessagesProvider

java.lang.Object
  extended by org.apache.tomcat.maven.common.messages.DefaultMessagesProvider
All Implemented Interfaces:
MessagesProvider

@Component(role=MessagesProvider.class)
public class DefaultMessagesProvider
extends Object
implements MessagesProvider

Since:
2.0
Author:
Olivier Lamy

Constructor Summary
DefaultMessagesProvider()
           
 
Method Summary
 String getMessage(String key)
          Gets the message for the given key from this packages resource bundle.
 String getMessage(String key, Object... params)
          Gets the message for the given key from this packages resource bundle and formats it with the given parameter.
 ResourceBundle getResourceBundle()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessagesProvider

public DefaultMessagesProvider()
Method Detail

getResourceBundle

public ResourceBundle getResourceBundle()

getMessage

public String getMessage(String key)
Gets the message for the given key from this packages resource bundle.

Specified by:
getMessage in interface MessagesProvider
Parameters:
key - the key for the required message
Returns:
the message

getMessage

public String getMessage(String key,
                         Object... params)
Gets the message for the given key from this packages resource bundle and formats it with the given parameter.

Specified by:
getMessage in interface MessagesProvider
Parameters:
key - the key for the required message
params - the parameters to be used to format the message with
Returns:
the formatted message


Copyright © 2005–2014 The Apache Software Foundation. All rights reserved.