Difference between revisions of "Properties"

 
Line 1: Line 1:
 
Components often want to store and retrieve configuration settings between invocations. An API is provided for this purpose.
 
Components often want to store and retrieve configuration settings between invocations. An API is provided for this purpose.
  
Configuration is handled by the setting and getting of properties using the
+
Configuration is handled by the setting and getting of properties using the [{{SERVER}}/workbench/api/org/geworkbench/engine/properties/PropertyManager.html <tt>org.geworkbench.engine.properties.PropertyManager</tt>] class. A singleton instance is available to process requests.
 +
 
 +
The two important methods of this class are:
 +
<pre>
 +
public void setProperty(Class component, String key, String value) throws IOException
 +
</pre>
 +
and
 +
<pre>
 +
public String getProperty(Class component, String key, String defaultValue) throws IOException
 +
</pre>

Revision as of 16:55, 12 October 2006

Components often want to store and retrieve configuration settings between invocations. An API is provided for this purpose.

Configuration is handled by the setting and getting of properties using the org.geworkbench.engine.properties.PropertyManager class. A singleton instance is available to process requests.

The two important methods of this class are:

public void setProperty(Class component, String key, String value) throws IOException

and

public String getProperty(Class component, String key, String defaultValue) throws IOException