1 29 30 package com.caucho.config.jaxb; 31 32 import com.caucho.config.AttributeStrategy; 33 import com.caucho.config.ConfigException; 34 import com.caucho.config.NodeBuilder; 35 import com.caucho.xml.QName; 36 37 import org.w3c.dom.Node ; 38 39 import java.lang.reflect.InvocationTargetException ; 40 import java.util.HashMap ; 41 42 public class CollectionWrapperProperty extends JaxbProperty { 43 private CollectionWrapperType _wrapperType 44 = new CollectionWrapperType(); 45 46 public CollectionWrapperProperty() 47 { 48 } 49 50 public HashMap <String ,AttributeStrategy> getAttributeMap() 51 { 52 return _wrapperType.getAttributeMap(); 53 } 54 55 63 public void configureAttribute(NodeBuilder builder, 64 Object bean, 65 QName name, 66 String value) 67 throws ConfigException 68 { 69 } 70 71 79 public void configureElement(NodeBuilder builder, 80 Object bean, 81 QName name, 82 Node node) 83 throws ConfigException 84 { 85 try { 86 _wrapperType.configureBean(builder, bean, node); 87 } catch (RuntimeException e) { 88 throw e; 89 } catch (InvocationTargetException e) { 90 throw builder.error(e.getCause(), node); 91 } catch (Exception e) { 92 throw builder.error(e, node); 93 } 94 } 95 } 96 | Popular Tags |