1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.JRPrintHyperlinkParameter; 31 import net.sf.jasperreports.engine.util.JRValueStringUtils; 32 33 import org.xml.sax.Attributes ; 34 35 36 44 public class JRPrintHyperlinkParameterValueFactory extends JRBaseFactory 45 { 46 public static final String ELEMENT_hyperlinkParameterValue = "hyperlinkParameterValue"; 47 48 public Object createObject(Attributes attrs) 49 { 50 JRPrintHyperlinkParameter parameter = (JRPrintHyperlinkParameter) digester.peek(); 51 return new JRPrintHyperlinkParameterValue(parameter); 52 } 53 54 public static class JRPrintHyperlinkParameterValue 55 { 56 private final JRPrintHyperlinkParameter parameter; 57 58 public JRPrintHyperlinkParameterValue(JRPrintHyperlinkParameter parameter) 59 { 60 this.parameter = parameter; 61 } 62 63 public void setData(String data) 64 { 65 if (data != null) 66 { 67 Object value = JRValueStringUtils.deserialize(parameter.getValueClass(), data); 68 parameter.setValue(value); 69 } 70 } 71 } 72 73 } 74 | Popular Tags |