cookxml.common.setter
Class ResourceBundleSetter

java.lang.Object
  extended bycookxml.common.setter.ResourceBundleSetter
All Implemented Interfaces:
Setter

public class ResourceBundleSetter
extends Object
implements Setter

This setter sets the current resource bundle to be used. It also setups the StringHook such that resources can be referenced within the XML document.

Since:
CookXml 1.0
See Also:
ResourceBundleStringHook

Field Summary
static String SEPARATOR
           
 
Method Summary
static Setter getInstance()
           
static ResourceBundle getResourceBundle(String input)
          Get the resource bundle from the input, which consists of the resource bundle path and the locale information, separated by the ";" character.
 void setAttribute(String tag, String attr, Object obj, Object value, DecodeEngine decodeEngine)
          set the attribute of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

public static String SEPARATOR
Method Detail

getInstance

public static Setter getInstance()

setAttribute

public void setAttribute(String tag,
                         String attr,
                         Object obj,
                         Object value,
                         DecodeEngine decodeEngine)
                  throws SetterException
Description copied from interface: Setter
set the attribute of the object.

Specified by:
setAttribute in interface Setter
Parameters:
tag - the tag of the element
attr - the name of the attribute
obj - the object associated with the element
value - the value of the object. We didn't use the String type because it is entirely possible for an object of the child elements to call the setter.
decodeEngine - the decodeengine that is being used.
Throws:
SetterException

getResourceBundle

public static ResourceBundle getResourceBundle(String input)
Get the resource bundle from the input, which consists of the resource bundle path and the locale information, separated by the ";" character.

Parameters:
input - the resource location and locale for the resource bundle
Returns:
the ResourceBundle loaded.