1 16 package org.apache.cocoon.woody.binding; 17 18 import org.apache.cocoon.woody.binding.JXPathBindingManager.Assistant; 19 import org.apache.cocoon.woody.util.DomHelper; 20 import org.w3c.dom.Element ; 21 22 33 public class InsertBeanJXPathBindingBuilder extends JXPathBindingBuilderBase { 34 35 39 public JXPathBindingBase buildBinding(Element bindingElm, Assistant assistant) throws BindingException { 40 41 try { 42 CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm); 43 44 String className = 45 DomHelper.getAttribute(bindingElm, "classname"); 46 String addMethod = 47 DomHelper.getAttribute(bindingElm, "addmethod"); 48 49 return new InsertBeanJXPathBinding(commonAtts, className, addMethod); 50 } catch (BindingException e) { 51 throw e; 52 } catch (Exception e) { 53 throw new BindingException("Error building a insert-bean binding defined at " + DomHelper.getLocation(bindingElm), e); 54 } 55 } 56 } 57 | Popular Tags |