com.unitesk.atp.messages
Class MessageStringManager

java.lang.Object
  extended by com.unitesk.atp.text.localize.ConstantStringManager
      extended by com.unitesk.atp.text.localize.PatternStringManager
          extended by com.unitesk.atp.messages.MessageStringManager
All Implemented Interfaces:
StringManager

public class MessageStringManager
extends PatternStringManager

Message string manager.

Version:
$Id: MessageStringManager.java,v 1.1 2004/10/09 06:34:30 all-x Exp $
Author:
Alexey Demakov

Field Summary
 
Fields inherited from class com.unitesk.atp.text.localize.ConstantStringManager
class_to_bundle, classLoader, locale
 
Constructor Summary
MessageStringManager()
           
 
Method Summary
 String getString(Class cls, String name)
          Get localized string for the specified class.
 String getString(Class cls, String name, Object obj)
          Get localized string for the specified class and object.
 String getString(MessageContext context)
           
 String getString(String name, Object obj)
          Get localized string for the specified object.
 
Methods inherited from class com.unitesk.atp.text.localize.PatternStringManager
getPattern, getPattern, setResource, setResourceClass, substitute
 
Methods inherited from class com.unitesk.atp.text.localize.ConstantStringManager
getBundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageStringManager

public MessageStringManager()
Method Detail

getString

public String getString(Class cls,
                        String name,
                        Object obj)
Description copied from class: PatternStringManager
Get localized string for the specified class and object.

This method calls super implementation, treats returned value as pattern and substitute its parameters by attributes of the specified object.

Specified by:
getString in interface StringManager
Overrides:
getString in class PatternStringManager
Parameters:
cls - The specified class.
name - The name of localized string for this class.
obj - The specified object.
Returns:
Localized string.

getString

public String getString(String name,
                        Object obj)
Description copied from class: PatternStringManager
Get localized string for the specified object.

This method calls super implementation, treats returned value as pattern and substitute its parameters by attributes of the specified object.

Specified by:
getString in interface StringManager
Overrides:
getString in class PatternStringManager
Parameters:
name - The name of localized string for this object.
obj - The specified object.
Returns:
Localized string or null if it is not found.

getString

public String getString(Class cls,
                        String name)
Description copied from class: ConstantStringManager
Get localized string for the specified class. The first time this method is called for the specified class it uses getBundle( cls ) to obtain resource bundle. Then gets string name from this bundle and customize it with respect to obj.

Specified by:
getString in interface StringManager
Overrides:
getString in class ConstantStringManager
Parameters:
cls - The specified class.
name - The name of localized string for this class.
Returns:
Localized string or null if it is not found.

getString

public String getString(MessageContext context)


Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.