com.unitesk.atp.messages
Class MessageStringManager
java.lang.Object
com.unitesk.atp.text.localize.ConstantStringManager
com.unitesk.atp.text.localize.PatternStringManager
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageStringManager
public MessageStringManager()
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.