com.opensymphony.module.propertyset
Class PropertySetCloner
java.lang.Object
com.opensymphony.module.propertyset.PropertySetCloner
- public class PropertySetCloner
- extends java.lang.Object
The PropertySetCloner is used to copy all the properties from one PropertySet into another.
Example
EJBPropertySet source = new EJBPropertySet("ejb/PropertyStore","MyEJB",7);
XMLPropertySet dest = new XMLPropertySet();
PropertySetCloner cloner = new PropertySetCloner();
cloner.setSource( source );
cloner.setDestination( dest );
cloner.cloneProperties();
dest.save( new FileWriter("propertyset-MyEJB-7.xml") );
The above example demonstrates how a PropertySetCloner can be used to export properties
stores in an EJBPropertySet to an XML file.
If the destination PropertySet contains any properties, they will be cleared before
the source properties are copied across.
- Version:
- $Revision: 1.2 $
- Author:
- Joe Walnes
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertySetCloner
public PropertySetCloner()
setDestination
public void setDestination(PropertySet destination)
getDestination
public PropertySet getDestination()
setSource
public void setSource(PropertySet source)
getSource
public PropertySet getSource()
cloneProperties
public void cloneProperties()
throws PropertyException
- Throws:
PropertyException
|