|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Configurable
An interface to configurable objects defining properties for configuring their behaviour.
Method Summary | |
---|---|
void |
addProperty(int index,
String key,
String value)
Inserts a multivalued property at the specified index. |
void |
addProperty(String key,
String value)
Adds a multivalued property. |
void |
addPropertyFilePath(String path)
Adds a property file path. |
void |
addPropertyFilePath(String path,
String encoding)
Adds a property file path with an encoding. |
void |
clearProperties()
Clears all properties. |
boolean |
containsProperty(String key)
Checks whether a property is defined. |
String |
getConfigKey()
Gets the path finder key for resolving configuration paths. |
String[] |
getProperties(String key)
Gets a multivalued property. |
String |
getProperty(String key)
Gets a property. |
String |
getPropertyFilePath()
Gets the property file path. |
String[] |
getPropertyFilePaths()
Gets the property file paths. |
int |
indexOfProperty(String key,
String value)
Returns the index of a multivalued property value. |
OrderedMap<String,Object> |
propertyMap()
Returns a map of properties. |
OrderedMap<String,Object> |
propertyMap(String prefix)
Returns a map of prefixed properties. |
Object |
removeProperty(String key)
Removes a property. |
boolean |
removeProperty(String key,
String value)
Removes a multivalued property. |
void |
removePropertyFilePath(String path)
Removes a property file path. |
void |
setConfigKey(String key)
Sets the path finder key for resolving configuration paths. |
Object |
setProperties(String key,
String[] values)
Sets a multivalued property. |
Object |
setProperty(String key,
String value)
Sets a property. |
void |
setPropertyFilePath(String path)
Sets the property file path. |
void |
setPropertyFilePath(String path,
String encoding)
Sets the property file path with an encoding. |
void |
setPropertyFilePaths(String[] paths)
Sets the property file paths. |
void |
setPropertyFilePaths(String[] paths,
String... encoding)
Sets the property file paths with encodings. |
void |
storeProperties()
Stores properties to the property file. |
Method Detail |
---|
String getConfigKey()
void setConfigKey(String key)
key
- the path finder key.String getPropertyFilePath()
void setPropertyFilePath(String path)
Note that all previously defined property file paths and properties are cleared.
path
- a property file path.void setPropertyFilePath(String path, String encoding)
path
- a property file path.encoding
- an encoding to use.String[] getPropertyFilePaths()
void setPropertyFilePaths(String[] paths)
paths
- property file paths.void setPropertyFilePaths(String[] paths, String... encoding)
paths
- property file paths.encoding
- encodings to use.void addPropertyFilePath(String path)
path
- a property file path.void addPropertyFilePath(String path, String encoding)
path
- a property file path.encoding
- an encoding to use.void removePropertyFilePath(String path)
path
- the property file path.boolean containsProperty(String key)
key
- the key.
String getProperty(String key)
key
- the key.
Object setProperty(String key, String value)
key
- the key.value
- the value.
String[] getProperties(String key)
key
- the key.
Object setProperties(String key, String[] values)
key
- the key.values
- the values.
Object removeProperty(String key)
key
- the key.
int indexOfProperty(String key, String value)
key
- the key.value
- the value.
void addProperty(String key, String value)
key
- the key.value
- the property.void addProperty(int index, String key, String value)
index
- the index.key
- the key.value
- the value.boolean removeProperty(String key, String value)
key
- the key.value
- the value.
void clearProperties()
OrderedMap<String,Object> propertyMap()
OrderedMap<String,Object> propertyMap(String prefix)
prefix
- the prefix.
void storeProperties() throws IOException
IOException
- on I/O errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |