|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the methods that a simple property file
manager needs to implement. Properties are thought of as belonging to a
domain. The domain is the name of the properties file without the
.properties
extension.
Method Summary | |
Properties |
getProperties(String forDomain)
Returns all the Properties associated with a given domain. |
String |
getProperty(String forDomain,
String propertyName)
Searches for the property with the specified property name within the given domain. |
String |
getProperty(String forDomain,
String propertyName,
String defaultValue)
Searches for the property with the specified property name within the given domain. |
File |
getPropertyDirectory()
Returns the property directory where property files are stored. |
void |
setProperty(String forDomain,
String propertyName,
String propertyValue)
This method sets the given property for a said domain Each time setProperty is called it writes to the file and refreshes the cache If the entry exists the value is changed otherwise a new value is added. |
Method Detail |
public File getPropertyDirectory()
File
.public Properties getProperties(String forDomain)
Properties
associated with a given domain.
forDomain
- The domain name.
public String getProperty(String forDomain, String propertyName)
null
if the
property is not found.
forDomain
- The domain name.propertyName
- The key to search for.
public void setProperty(String forDomain, String propertyName, String propertyValue)
forDomain
- The domain name.propertyName
- The key to search for.propertyValue
- The new value for the property name (key) or null.public String getProperty(String forDomain, String propertyName, String defaultValue)
forDomain
- The domain name.propertyName
- The key to search for.defaultValue
- The value to return if the property key is not found.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |