Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Class Members | Related Pages

PropertySetter Class Reference

List of all members.

Public Member Functions

 PropertySetter (helpers::ObjectPtr obj)
void setProperties (helpers::Properties &properties, const String &prefix)
void setProperty (const String &name, const String &value)

Static Public Member Functions

void setProperties (helpers::ObjectPtr obj, helpers::Properties &properties, const String &prefix)

Detailed Description

General purpose Object property setter. Clients repeatedly invokes setProperty(name,value) in order to invoke setters on the Object specified in the constructor.

Usage:

PropertySetter ps(anObject);
ps.set("name", "Joe");
ps.set("age", "32");
ps.set("isMale", "true");
will cause the invocations anObject->setOption("name", "Joe"), anObject->setOption("age", "32") and anObject->setOption("isMale", "true") if the spi::OptionHandler interface is supported by anObject.


Constructor & Destructor Documentation

PropertySetter helpers::ObjectPtr  obj  ) 
 

Create a new PropertySetter for the specified Object. This is done in prepartion for invoking setProperty one or more times.

Parameters:
obj the object for which to set properties


Member Function Documentation

void setProperties helpers::Properties &  properties,
const String &  prefix
 

Set the properites for the object that match the prefix passed as parameter.

void setProperties helpers::ObjectPtr  obj,
helpers::Properties &  properties,
const String &  prefix
[static]
 

Set the properties of an object passed as a parameter in one go. The properties are parsed relative to a prefix.

Parameters:
obj The object to configure.
properties A java.util.Properties containing keys and values.
prefix Only keys having the specified prefix will be set.

void setProperty const String &  name,
const String &  value
 

Set a property on this PropertySetter's Object. If the underlying Object supports the spi::OptionHandler interface, the setOption method is called.

Parameters:
name name of the property
value String value of the property


The documentation for this class was generated from the following files:
Generated on Sat Jul 22 10:25:22 2006 for log4cxx by  doxygen 1.3.9.1