public class ServletPropertyMgr extends PropertyMgr
ThreadSafety: This class is thread safe and can be used by multiple threads concurrently.
Constructor and Description |
---|
ServletPropertyMgr(javax.servlet.ServletContext context) |
Modifier and Type | Method and Description |
---|---|
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.
|
get, getBoolean, getInt, getRequired, getRequiredBoolean, getRequiredInt, setUsage
public ServletPropertyMgr(javax.servlet.ServletContext context) throws IOException
context
- the ServletContext
to load init parameters from.IOException
public String get(String name)
PropertyMgr
get
in class PropertyMgr
name
- the property keypublic void save()
PropertyMgr
save
in class PropertyMgr
public String set(String name, String backup)
PropertyMgr
set
in class PropertyMgr
name
- the property keybackup
- the property value