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.4 $
Author:
Joe Walnes

Constructor Summary
PropertySetCloner()
           
 
Method Summary
 void cloneProperties()
           
 PropertySet getDestination()
           
 PropertySet getSource()
           
 void setDestination(PropertySet destination)
           
 void setSource(PropertySet source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySetCloner

public PropertySetCloner()
Method Detail

getSource

public PropertySet getSource()

setSource

public void setSource(PropertySet source)

getDestination

public PropertySet getDestination()

setDestination

public void setDestination(PropertySet destination)

cloneProperties

public void cloneProperties()
                     throws PropertyException

See www.opensymphony.com for more information.