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