fc.web.servlet
Class ServletPropertyMgr

java.lang.Object
  extended by fc.util.PropertyMgr
      extended by fc.web.servlet.ServletPropertyMgr

public class ServletPropertyMgr
extends PropertyMgr

Loads properties for a servlet. Intended to be used in application/context scope by all servlets belonging to one web context/application.

ThreadSafety: This class is thread safe and can be used by multiple threads concurrently.

Version:
1.0 12/30/2001

Constructor Summary
ServletPropertyMgr(javax.servlet.ServletContext context)
           
 
Method Summary
 String get(String name)
          Returns the property associated with the specified key or null if the property was not found.
 void save()
          Saves any properties that were set previously.
 String set(String name, String backup)
          Sets the property associated with the specified key.
 
Methods inherited from class fc.util.PropertyMgr
get, getBoolean, getInt, getRequired, getRequiredBoolean, getRequiredInt, setUsage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletPropertyMgr

public ServletPropertyMgr(javax.servlet.ServletContext context)
                   throws IOException
Parameters:
context - the ServletContext to load init parameters from.
Throws:
IOException
Method Detail

get

public String get(String name)
Description copied from class: PropertyMgr
Returns the property associated with the specified key or null if the property was not found.

Specified by:
get in class PropertyMgr
Parameters:
name - the property key

save

public void save()
Description copied from class: PropertyMgr
Saves any properties that were set previously. This method does not need to be called if properties were only read, however if any property was modified or added, it is essential to call this method to save any such changes.

Specified by:
save in class PropertyMgr

set

public String set(String name,
                  String backup)
Description copied from class: PropertyMgr
Sets the property associated with the specified key.

Specified by:
set in class PropertyMgr
Parameters:
name - the property key
backup - the property value
Returns:
the previous value of the specified key or null if it did not have one.