Java EE 5 SDK

com.sun.appserv.management.util.misc
Class PropertiesStringSource

java.lang.Object
  extended by com.sun.appserv.management.util.misc.StringSourceBase
      extended by com.sun.appserv.management.util.misc.PropertiesStringSource
All Implemented Interfaces:
StringSource

public class PropertiesStringSource
extends StringSourceBase
implements StringSource

An abstraction for getting a String, given an id string.


Field Summary
static String STRINGS_NAME
           
 
Constructor Summary
PropertiesStringSource(File propsFile, StringSource delegate)
           
PropertiesStringSource(Properties props, StringSource delegate)
           
 
Method Summary
 String getString(String id, String defaultValue)
          Get the String referred to by 'id'.
 
Methods inherited from class com.sun.appserv.management.util.misc.StringSourceBase
getString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.appserv.management.util.misc.StringSource
getString
 

Field Detail

STRINGS_NAME

public static final String STRINGS_NAME
See Also:
Constant Field Values
Constructor Detail

PropertiesStringSource

public PropertiesStringSource(Properties props,
                              StringSource delegate)

PropertiesStringSource

public PropertiesStringSource(File propsFile,
                              StringSource delegate)
                       throws IOException
Throws:
IOException
Method Detail

getString

public String getString(String id,
                        String defaultValue)
Description copied from interface: StringSource
Get the String referred to by 'id'.

Specified by:
getString in interface StringSource
Overrides:
getString in class StringSourceBase
Parameters:
id - the id (key) for the String
defaultValue - the default value to be returned if string was not found
Returns:
the String, or defaultValue if not found

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.