Package org.jbpm.pvm.internal.xml

Examples of org.jbpm.pvm.internal.xml.Bindings


      } else {
        parse.addProblem("class is a required attribute in a binding "+XmlUtil.toString(bindingElement), documentElement);
      }
     
      if (binding!=null) {
        Bindings bindings = parse.findObject(Bindings.class);
        bindings.addBinding(binding);
      }
    }
   
    return null;
  }
View Full Code Here


    // read the operations elements
    List<Operation> operations = null;
    List<Element> elements = XmlUtil.elements(element);
   
    Set<String> operationTagNames = null;
    Bindings bindings = parser.getBindings();
    if (bindings!=null) {
      operationTagNames = bindings.getTagNames(WireParser.CATEGORY_OPERATION);
    } else {
      operationTagNames = Collections.EMPTY_SET;
    }

    for (Element childElement: elements) {
View Full Code Here

    schemaResources.add("jpdl-4.0.xsd");
    setSchemaResources(schemaResources);
  }

  protected void parseBindings() {
    Bindings bindings = new Bindings();
    setBindings(bindings);

    for (String activityResource: DEFAULT_ACTIVITIES_RESOURCES) {
      Enumeration<URL> resourceUrls = ReflectUtil.getResources(null, activityResource);
      if (resourceUrls.hasMoreElements()) {
        while (resourceUrls.hasMoreElements()) {
          URL resourceUrl = resourceUrls.nextElement();
          log.trace("loading jpdl activities from resource: "+resourceUrl);
          List<JpdlBinding> activityBindings = (List<JpdlBinding>) bindingsParser.createParse()
            .setUrl(resourceUrl)
            .execute()
            .checkErrors("jpdl activities from "+resourceUrl.toString())
            .getDocumentObject();
         
          for (JpdlBinding binding: activityBindings) {
            binding.setCategory(CATEGORY_ACTIVITY);
            bindings.addBinding(binding);
          }
        }
      } else {
        log.trace("skipping unavailable jpdl activities resource: "+activityResource);
      }
    }

    for (String eventListenerResource: DEFAULT_EVENTLISTENERS_RESOURCES) {
      Enumeration<URL> resourceUrls = ReflectUtil.getResources(null, eventListenerResource);
      if (resourceUrls.hasMoreElements()) {
        while (resourceUrls.hasMoreElements()) {
          URL resourceUrl = resourceUrls.nextElement();
          log.trace("loading jpdl eventlisteners from resource: "+resourceUrl);
          List<JpdlBinding> activityBindings = (List<JpdlBinding>) bindingsParser.createParse()
            .setUrl(resourceUrl)
            .execute()
            .checkErrors("jpdl eventlisteners from "+resourceUrl.toString())
            .getDocumentObject();
         
          for (JpdlBinding binding: activityBindings) {
            binding.setCategory(CATEGORY_EVENT_LISTENER);
            bindings.addBinding(binding);
          }
        }
      } else {
        log.trace("skipping unavailable jpdl eventlistener resource: "+eventListenerResource);
      }
View Full Code Here

    // read the operations elements
    List<Operation> operations = null;
    List<Element> elements = XmlUtil.elements(element);
   
    Set<String> operationTagNames = null;
    Bindings bindings = parser.getBindings();
    if (bindings!=null) {
      operationTagNames = bindings.getTagNames(WireParser.CATEGORY_OPERATION);
    } else {
      operationTagNames = Collections.EMPTY_SET;
    }

    for (Element childElement: elements) {
View Full Code Here

      } else {
        parse.addProblem("class is a required attribute in a binding "+XmlUtil.toString(bindingElement), documentElement);
      }
     
      if (binding!=null) {
        Bindings bindings = parse.contextStackFind(Bindings.class);
        bindings.addBinding(binding);
      }
    }
   
    return null;
  }
View Full Code Here

    parseBindings();
    setSchemaResources(SCHEMA_RESOURCES);
  }

  protected void parseBindings() {
    this.bindings = new Bindings();

    for (String activityResource: DEFAULT_BINDING_RESOURCES) {
      Enumeration<URL> resourceUrls = getResources(activityResource);
      if (resourceUrls.hasMoreElements()) {
        while (resourceUrls.hasMoreElements()) {
View Full Code Here

public class JpdlBindingsParser extends Parser {

  private static final Log log = Log.getLog(JpdlBindingsParser.class.getName());
 
  public Object parseDocumentElement(Element documentElement, Parse parse) {
    Bindings bindings = (Bindings) parse.contextMapGet(Parse.CONTEXT_KEY_BINDINGS);
    parse.setDocumentObject(bindings);
   
    for (Element bindingElement : XmlUtil.elements(documentElement)) {
      Binding binding = instantiateBinding(bindingElement, parse);
      bindings.addBinding(binding);
    }
   
    return bindings;
  }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.xml.Bindings

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.