com.tonbeller.wcf.utils
Class I18nReplacer

java.lang.Object
  extended bycom.tonbeller.wcf.utils.I18nReplacer

public abstract class I18nReplacer
extends java.lang.Object

replaces attribute values in a DOM tree with values from a resource bundle Attribute value must start with "fmt:", e.g. "fmt:akey" will replace the string "fmt:akey" with the value of found for "akey" in the resource bundle.

Author:
av

Field Summary
static java.lang.String PREFIX
           
 
Constructor Summary
I18nReplacer()
           
 
Method Summary
static I18nReplacer instance(java.util.ResourceBundle resb)
           
static I18nReplacer instance(Resources res)
           
protected abstract  java.lang.String internalReplace(java.lang.String key)
           
 java.lang.String replace(java.lang.String value)
           
 void replaceAll(org.w3c.dom.Node root)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final java.lang.String PREFIX
See Also:
Constant Field Values
Constructor Detail

I18nReplacer

public I18nReplacer()
Method Detail

instance

public static I18nReplacer instance(java.util.ResourceBundle resb)

instance

public static I18nReplacer instance(Resources res)

internalReplace

protected abstract java.lang.String internalReplace(java.lang.String key)

replace

public java.lang.String replace(java.lang.String value)

replaceAll

public void replaceAll(org.w3c.dom.Node root)