public void set(Dom dom, Object arg) { Dom child = toDom(arg); if(child==null) // remove dom.setNodeElements(xmlName); else // replace dom.setNodeElements(xmlName,child); } }
public void set(Dom dom, Object _arg) { if(!(_arg instanceof List)) throw new IllegalArgumentException("Expecting a list but found "+_arg); List arg = (List)_arg; Dom[] values = new Dom[arg.size()]; int i=0; for (Object o : arg) values[i++] = toDom(o); dom.setNodeElements(xmlName,values); } }
public void set(Dom dom, Object arg) { Dom child = toDom(arg); if(child==null) // remove dom.setNodeElements(xmlName); else // replace dom.setNodeElements(xmlName,child); } }
public void set(Dom dom, Object arg) { Dom child = toDom(arg); if(child==null) // remove dom.setNodeElements(xmlName); else // replace dom.setNodeElements(xmlName,child); } }
public void set(Dom dom, Object arg) { Dom child = toDom(arg); if(child==null) // remove dom.setNodeElements(xmlName); else // replace dom.setNodeElements(xmlName,child); } }
public void set(Dom dom, Object arg) { Dom child = toDom(arg); if(child==null) // remove dom.setNodeElements(xmlName); else // replace dom.setNodeElements(xmlName,child); } }
public void set(Dom dom, Object _arg) { if(!(_arg instanceof List)) throw new IllegalArgumentException("Expecting a list but found "+_arg); List arg = (List)_arg; Dom[] values = new Dom[arg.size()]; int i=0; for (Object o : arg) values[i++] = toDom(o); dom.setNodeElements(xmlName,values); } }
public void set(Dom dom, Object _arg) { if(!(_arg instanceof List)) throw new IllegalArgumentException("Expecting a list but found "+_arg); List arg = (List)_arg; Dom[] values = new Dom[arg.size()]; int i=0; for (Object o : arg) values[i++] = toDom(o); dom.setNodeElements(xmlName,values); } }
public void set(Dom dom, Object _arg) { if(!(_arg instanceof List)) throw new IllegalArgumentException("Expecting a list but found "+_arg); List arg = (List)_arg; Dom[] values = new Dom[arg.size()]; int i=0; for (Object o : arg) values[i++] = toDom(o); dom.setNodeElements(xmlName,values); } }
public void set(Dom dom, Object _arg) { if(!(_arg instanceof List)) throw new IllegalArgumentException("Expecting a list but found "+_arg); List arg = (List)_arg; Dom[] values = new Dom[arg.size()]; int i=0; for (Object o : arg) values[i++] = toDom(o); dom.setNodeElements(xmlName,values); } }
@Override public Object run(Domain writeableDomain) throws PropertyVetoException, TransactionFailure { ConfigBeanProxy child = writeableDomain.createChild(type); Dom domDomain = Dom.unwrap(writeableDomain); final String elementName; try { elementName = GenericCrudCommand.elementName(domDomain.document, Domain.class, type); } catch (ClassNotFoundException e) { throw new TransactionFailure(e.toString()); } if (elementName==null) { String msg = localStrings.getLocalString(TypeResolver.class, "TypeResolver.no_element_of_that_type", "The Domain configuration does not have a sub-element of the type {0}", type.getSimpleName()); throw new TransactionFailure(msg); } domDomain.setNodeElements(elementName, Dom.unwrap(child)); // add to the habitat habitat.addIndex(new ExistingSingletonInhabitant<ConfigBeanProxy>(child), type.getName(), null); return child; } }, domain));
@Override public Object run(Domain writeableDomain) throws PropertyVetoException, TransactionFailure { ConfigBeanProxy child = writeableDomain.createChild(type); Dom domDomain = Dom.unwrap(writeableDomain); final String elementName; try { elementName = GenericCrudCommand.elementName(domDomain.document, Domain.class, type); } catch (ClassNotFoundException e) { throw new TransactionFailure(e.toString()); } if (elementName==null) { String msg = localStrings.getLocalString(TypeResolver.class, "TypeResolver.no_element_of_that_type", "The Domain configuration does not have a sub-element of the type {0}", type.getSimpleName()); throw new TransactionFailure(msg); } domDomain.setNodeElements(elementName, Dom.unwrap(child)); // add to the habitat ServiceLocatorUtilities.addOneConstant(habitat, child, null, type); return child; } }, domain));