FileDocCategorySizeDatePackage
Strings.javaAPI DocGlassfish v2 API3730Fri May 04 22:24:10 BST 2007com.sun.enterprise.admin.mbeans.custom

Strings

public class Strings extends Object
author
bnevins

Fields Summary
private List
bundles
Constructors Summary
Strings(String fqnPropsList)

		for(String fqnProps : fqnPropsList)
			addBundle(fqnProps);
	
Methods Summary
voidaddBundle(java.lang.String fqnProps)

		// format: "com.elf.foo.LogStrings"
        try
        {
            bundles.add(ResourceBundle.getBundle(fqnProps));
        }
        catch(Exception e)
        {
			// should throw ???
        }
	
java.lang.Stringget(java.lang.String indexString)

		// grab the first property that matches...
		for(ResourceBundle bundle : bundles)
		{
			try
			{
				return bundle.getString(indexString);
			}
			catch (Exception e)
			{
				// not an error...
			}
		}
		// it is not an error to have no key...
		return indexString;
    
java.lang.Stringget(java.lang.String indexString, java.lang.Object objects)

        indexString = get(indexString);
        
        try
        {
            MessageFormat mf = new MessageFormat(indexString);
            return mf.format(objects);
        }
        catch(Exception e)
        {
            return indexString;
        }
    
java.util.ListgetBundles()

        //for testing purposes
        return bundles;