ru.sstu.web.core
Class Messages

java.lang.Object
  extended by ru.sstu.web.core.Messages
Direct Known Subclasses:
JsfMessages

public abstract class Messages
extends Object

Messages class provides access to message properties.

Since:
Web 1.0
Author:
Alexander_Ignatov, Denis_Murashev

Constructor Summary
Messages()
           
 
Method Summary
protected  String[] getBundles()
           
 String getString(String resourceId)
          Get the resource string with the given ID from the default bundle.
 String getString(String resourceId, Object... params)
          Get the resource string with the given ID and parameters from the default bundle.
abstract  String getString(String bundle, String resourceId, Object... params)
          Get the resource string with the given ID and parameters from the bundle.
protected  void setBundles(String[] bundles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages()
Method Detail

getString

public String getString(String resourceId)
Get the resource string with the given ID from the default bundle.

Parameters:
resourceId - resource ID
Returns:
message summary

getString

public String getString(String resourceId,
                        Object... params)
Get the resource string with the given ID and parameters from the default bundle.

Parameters:
resourceId - resource ID
params - parameters
Returns:
message summary

getString

public abstract String getString(String bundle,
                                 String resourceId,
                                 Object... params)
Get the resource string with the given ID and parameters from the bundle.

Parameters:
bundle - resource bundle
resourceId - resource ID
params - parameters
Returns:
message summary

getBundles

protected String[] getBundles()
Returns:
the bundles

setBundles

protected void setBundles(String[] bundles)
Parameters:
bundles - the bundles to set


Copyright © 2011 TFI branch of Engels Instutute of Technology. All Rights Reserved.