Package org.jbpm.pvm.internal.wire.descriptor

Examples of org.jbpm.pvm.internal.wire.descriptor.CollectionDescriptor


  public AbstractCollectionBinding(String tagName) {
    super(tagName);
  }

  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);
    }
   
    Boolean isSynchronized = XmlUtil.attributeBoolean(element, "synchronized", false, parse);
    if (isSynchronized!=null) {
      descriptor.setSynchronized(isSynchronized.booleanValue());
    }
   
    List<Descriptor> valueDescriptors = new ArrayList<Descriptor>();
    List<Element> elements = XmlUtil.elements(element);
    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


  public AbstractCollectionBinding(String tagName) {
    super(tagName);
  }

  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);
    }
   
    Boolean isSynchronized = XmlUtil.attributeBoolean(element, "synchronized", false, parse);
    if (isSynchronized!=null) {
      descriptor.setSynchronized(isSynchronized.booleanValue());
    }
   
    List<Descriptor> valueDescriptors = new ArrayList<Descriptor>();
    List<Element> elements = XmlUtil.elements(element);
    for (Element valueElement: elements) {
      Descriptor valueDescriptor = (Descriptor) parser.parseElement(valueElement, parse, WireParser.CATEGORY_DESCRIPTOR);
      if (valueDescriptor!=null) {
        valueDescriptors.add(valueDescriptor);
      } else {
        parse.addProblem("unrecognized element: "+XmlUtil.toString(valueElement));
      }
    }
    descriptor.setValueDescriptors(valueDescriptors);
    return descriptor;
  }
View Full Code Here

    if (historySessionsDescriptor==null) {
      historySessionsDescriptor = new HistorySessionDescriptor();
      parse.contextMapPut(KEY_HISTORY_SESSIONS_DESCRIPTOR, historySessionsDescriptor);
    }
   
    CollectionDescriptor listDescriptor = (CollectionDescriptor) LIST_BINDING.parse(element, parse, parser);
    historySessionsDescriptor.add(listDescriptor);

    return historySessionsDescriptor;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.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.