org.springframework.extensions.webscripts
Class AbstractMessageHelper

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractMessageHelper
Direct Known Subclasses:
MessageMethod, ScriptMessage

public class AbstractMessageHelper
extends Object

Author:
Kevin Roast Base class for returning an I18N message string for a WebScript.

Returns an I18N message resolved for the current locale and specified message ID.

Firstly the service resource for the parent WebScript will be used for the lookup, followed by the global webscripts.properties resource bundle.


Constructor Summary
AbstractMessageHelper(WebScript webscript)
          Constructor
 
Method Summary
protected  String resolveMessage(String id, Object... args)
          Get an I18Ned message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMessageHelper

public AbstractMessageHelper(WebScript webscript)
Constructor

Parameters:
webscript - The WebScript to lookup resources against first
Method Detail

resolveMessage

protected final String resolveMessage(String id,
                                      Object... args)
Get an I18Ned message.

Parameters:
id - The message Id
args - The optional list of message arguments
Returns:
resolved message string or the original ID if unable to find


Copyright © 2009 SpringSource, Inc. All Rights Reserved.