org.objectweb.telosys.rpl.xml
Interface IXmlWrapper

All Known Implementing Classes:
BigDecimalValueMapper, BooleanValueMapper, DateValueMapper, DoubleValueMapper, FloatValueMapper, IntValueMapper, LongValueMapper, StringValueMapper

public interface IXmlWrapper

Interface to give XML mapping capabilities to a Java object.
It provides bidirectional mapping :
from XML to java object
from Java object to XML


Method Summary
 java.lang.Object createBean()
          Creates an new instance of the b managed by the XML mapper
 java.lang.Class getBeanClass()
          Returns the class of the bean managed by the XML mapper
 void setXmlFieldValue(java.lang.Object bean, java.lang.String sFieldName, java.lang.String sFieldValue)
          Set the given field value in the object field corresponding to the given field name.
 void toXml(java.io.PrintWriter out, java.lang.Object bean, java.lang.String sTagName)
          Print the given bean as XML tag on the given output
 

Method Detail

getBeanClass

public java.lang.Class getBeanClass()
Returns the class of the bean managed by the XML mapper

Returns:
the class

createBean

public java.lang.Object createBean()
Creates an new instance of the b managed by the XML mapper

Returns:
bean instance

setXmlFieldValue

public void setXmlFieldValue(java.lang.Object bean,
                             java.lang.String sFieldName,
                             java.lang.String sFieldValue)
Set the given field value in the object field corresponding to the given field name.

Parameters:
bean - : the bean to update
sFieldName - : the name of the field in the XML flow
sFieldValue - : the value of the field

toXml

public void toXml(java.io.PrintWriter out,
                  java.lang.Object bean,
                  java.lang.String sTagName)
Print the given bean as XML tag on the given output

Parameters:
out -
bean -
sTagName -