Package org.jbpm.wire

Examples of org.jbpm.wire.WireDefinition


    return wireContext.keys();
  }
 
  public void add(Descriptor descriptor) {
    if (wireContext==null) {
      wireContext = new WireContext(new WireDefinition());
    }
    wireContext.getWireDefinition().addDescriptor(descriptor);
  }
View Full Code Here


  }
 
  // object builders //////////////////////////////////////////////////////////

  protected T constructFromDescriptor() {
    WireDefinition wireDefinition = new WireDefinition();
    wireDefinition.addDescriptor("o", descriptor);
    WireContext wireContext = new WireContext(wireDefinition);
    return (T) wireContext.get("o");
  }
View Full Code Here

   * @see Parser#parseDocumentElement(Element, Parse)
   */
  public Object parseDocumentElement(Element documentElement, Parse parse) {
    List<Element> elements = XmlUtil.elements(documentElement);

    WireDefinition wireDefinition = new WireDefinition();
    wireDefinition.setClassLoader(classLoader);
   
    if (elements!=null) {
      parse.pushObject(wireDefinition);
      try {
        for (Element descriptorElement: elements) {
View Full Code Here

          }
        }
      }
     
      // add the descriptor
      WireDefinition wireDefinition = parse.findObject(WireDefinition.class);
      wireDefinition.addDescriptor(descriptor);
    }
    return object;
  }
View Full Code Here

    } else {
      wireContext = targetWireContext;
    }

    if (wireEvents) {
      WireDefinition wireDefinition = wireContext.getWireDefinition();
     
      // if there are objectNames specified
      if (objectNames!=null) {
        // subscribe to the descriptors for the all objectNames
        for (String objectName: objectNames) {
          Descriptor descriptor = wireDefinition.getDescriptor(objectName);
          subscribe(listener, descriptor);
        }
       
      // if no objectNames are specified, subscribe to all the descriptors
      } else {
        Set<Descriptor> descriptors = new HashSet<Descriptor>(wireDefinition.getDescriptors().values());
        for(Descriptor descriptor: descriptors) {
          subscribe(listener, descriptor);
        }
      }
View Full Code Here

    if (defaultEnvironmentFactory==null) {
      defaultEnvironmentFactory = new DefaultEnvironmentFactory();
      parse.pushObject(defaultEnvironmentFactory);
    }

    WireDefinition applicationWireDefinition = getApplicationWireDefinition(documentElement, parse);
    WireDefinition blockWireDefinition = getBlockWireDefinition(documentElement, parse);

    // create the application wire context from the definition
    WireContext applicationWireContext = new WireContext(applicationWireDefinition, DefaultEnvironment.CONTEXTNAME_APPLICATION);
    // propagate the parser classloader to the application context
    applicationWireContext.setClassLoader(classLoader);
View Full Code Here

TOP

Related Classes of org.jbpm.wire.WireDefinition

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.