Package org.jbpm.wire.descriptor

Examples of org.jbpm.wire.descriptor.CollectionDescriptor


import org.w3c.dom.Element;

public abstract class AbstractCollectionBinding implements Binding {

  public Object parse(Element element, Parse parse, Parser parser) {
    CollectionDescriptor descriptor = createDescriptor();
   
    String className = XmlUtil.attribute(element,"class");
   
    // verify if the given classname is specified and implements the collection interface
    if (verify(className, getCollectionInterface(), parse, parser)) {
      descriptor.setClassName(className);
    }
   
    String synchronizedText = XmlUtil.attribute(element, "synchronized");
    if (synchronizedText!=null) {
      Boolean isSynchronized = XmlUtil.booleanEquals(synchronizedText, Boolean.FALSE);
      descriptor.setSynchronized(isSynchronized);
    }
   
    List<Descriptor> valueDescriptors = new ArrayList<Descriptor>();
    List<Element> elements = XmlUtil.elements(element);
    if (elements!=null) {
      for (Element valueElement: elements) {
        Descriptor valueDescriptor = (Descriptor) parser.parseElement(valueElement, parse, WireParser.CATEGORY_DESCRIPTOR);
        if (valueDescriptor!=null) {
          valueDescriptors.add(valueDescriptor);
        }
      }
    }
    descriptor.setValueDescriptors(valueDescriptors);
    return descriptor;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.wire.descriptor.CollectionDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.