|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.config.internal.PropertiesConfiguration
public class PropertiesConfiguration
| Constructor Summary | |
|---|---|
PropertiesConfiguration()
|
|
PropertiesConfiguration(ResourceStreamSource resourceStreamSource)
|
|
| Method Summary | |
|---|---|
void |
add(java.util.Properties properties)
Add the properties from an existing Properties object. |
void |
add(java.lang.String key,
java.lang.String value)
Adds a key-value pair to this set of properties |
NakedObjectConfiguration |
createSubset(java.lang.String prefix)
Creates a new NakedObjectConfiguration containing the properties starting with the specified prefix. |
void |
debugData(DebugString str)
Debug details describing the object being investigated |
java.lang.String |
debugTitle()
The title for the debug information |
boolean |
getBoolean(java.lang.String name)
Gets the boolean value for the specified name where no value or 'on' will result in true being returned; anything gives false. |
boolean |
getBoolean(java.lang.String name,
boolean defaultValue)
Gets the boolean value for the specified name. |
java.awt.Color |
getColor(java.lang.String name)
Gets the color for the specified name. |
java.awt.Color |
getColor(java.lang.String name,
java.awt.Color defaultValue)
Gets the color for the specified name. |
java.awt.Font |
getFont(java.lang.String name)
Gets the font for the specified name. |
java.awt.Font |
getFont(java.lang.String name,
java.awt.Font defaultValue)
Gets the font for the specified name. |
int |
getInteger(java.lang.String name)
Gets the number value for the specified name. |
int |
getInteger(java.lang.String name,
int defaultValue)
Gets the number value for the specified name. |
java.lang.String[] |
getList(java.lang.String name)
Returns a list of entries for the single configuration property with the specified name. |
NakedObjectConfiguration |
getProperties(java.lang.String withPrefix)
Creates a new NakedObjectConfiguration containing the properties starting with the specified prefix. |
ResourceStreamSource |
getResourceStreamSource()
The ResourceStreamSource that was used to build this configuration. |
java.lang.String |
getString(java.lang.String name)
Returns the configuration property with the specified name. |
java.lang.String |
getString(java.lang.String name,
java.lang.String defaultValue)
|
boolean |
hasProperty(java.lang.String name)
|
void |
injectInto(java.lang.Object candidate)
Will inject itself into the candidate if the candidate implements the corresponding *Aware type. |
boolean |
isEmpty()
|
java.util.Enumeration<java.lang.String> |
propertyNames()
|
int |
size()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesConfiguration()
public PropertiesConfiguration(ResourceStreamSource resourceStreamSource)
| Method Detail |
|---|
public ResourceStreamSource getResourceStreamSource()
NakedObjectConfigurationResourceStreamSource that was used to build this configuration.
This replaces the old rootPath() method.
getResourceStreamSource in interface NakedObjectConfigurationConfigurationBuilder.getResourceStreamSource()public void add(java.util.Properties properties)
public void add(java.lang.String key,
java.lang.String value)
add in interface NakedObjectConfigurationpublic NakedObjectConfiguration createSubset(java.lang.String prefix)
NakedObjectConfigurationNakedObjectConfiguration.getProperties(String) method, except the property names have their prefixes removed.
createSubset in interface NakedObjectConfigurationNakedObjectConfiguration.getProperties(String)public boolean getBoolean(java.lang.String name)
getBoolean in interface NakedObjectConfigurationname - the property name
public boolean getBoolean(java.lang.String name,
boolean defaultValue)
getBoolean in interface NakedObjectConfigurationname - the property namedefaultValue - the value to use as a defaultpublic java.awt.Color getColor(java.lang.String name)
getColor in interface NakedObjectConfigurationname - the property name
public java.awt.Color getColor(java.lang.String name,
java.awt.Color defaultValue)
getColor in interface NakedObjectConfigurationname - the property namedefaultValue - the value to use as a defaultpublic void debugData(DebugString str)
DebugInfo
debugData in interface DebugInfopublic java.lang.String debugTitle()
DebugInfo
debugTitle in interface DebugInfopublic java.awt.Font getFont(java.lang.String name)
getFont in interface NakedObjectConfigurationname - the property name
public java.awt.Font getFont(java.lang.String name,
java.awt.Font defaultValue)
getFont in interface NakedObjectConfigurationname - the property namedefaultValue - the color to use as a defaultpublic int getInteger(java.lang.String name)
getInteger in interface NakedObjectConfigurationname - the property name
public int getInteger(java.lang.String name,
int defaultValue)
getInteger in interface NakedObjectConfigurationname - the property namedefaultValue - the value to use as a defaultpublic java.lang.String[] getList(java.lang.String name)
NakedObjectConfigurationIf there is no matching property then returns an empty array.
getList in interface NakedObjectConfigurationpublic NakedObjectConfiguration getProperties(java.lang.String withPrefix)
NakedObjectConfigurationNakedObjectConfiguration.createSubset(String) method except the names of the properties are not
altered when copied.
getProperties in interface NakedObjectConfigurationNakedObjectConfiguration.createSubset(String)public java.lang.String getString(java.lang.String name)
getString in interface NakedObjectConfiguration
public java.lang.String getString(java.lang.String name,
java.lang.String defaultValue)
getString in interface NakedObjectConfigurationpublic boolean hasProperty(java.lang.String name)
hasProperty in interface NakedObjectConfigurationpublic boolean isEmpty()
isEmpty in interface NakedObjectConfigurationpublic java.util.Enumeration<java.lang.String> propertyNames()
propertyNames in interface NakedObjectConfigurationpublic int size()
size in interface NakedObjectConfigurationpublic java.lang.String toString()
toString in class java.lang.Objectpublic void injectInto(java.lang.Object candidate)
Injectable
injectInto in interface Injectable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||