Package org.jbpm.pvm.internal.wire

Examples of org.jbpm.pvm.internal.wire.Descriptor


      descriptor.setConfigurationName(element.getAttribute("configuration"));

    // if hibernate session factory binding has sub elements, we assume that
    // it is an inline configuration declaration
    } else if (!XmlUtil.elements(element).isEmpty()) {
      Descriptor configurationDescriptor = (Descriptor) super.parse(element, parse, parser);
      descriptor.setConfigurationDescriptor(configurationDescriptor);
    }

    return descriptor;
  }
View Full Code Here


      } catch (JbpmException e) {
        throw new WireException("couldn't get type of '"+(name!=null ? name : className)+"': "+e.getMessage(), e.getCause());
      }
    }
   
    Descriptor descriptor = null;
    if (factoryDescriptor!=null) {
      descriptor = factoryDescriptor;
    } else if (factoryObjectName!=null) {
      descriptor = wireDefinition.getDescriptor(factoryObjectName);
    }

    if (descriptor!=null) {
      Class<?> factoryClass = descriptor.getType(wireDefinition);
      if (factoryClass!=null) {
        Method method = ReflectUtil.findMethod(factoryClass, methodName, argDescriptors, null);
        if (method!=null) {
          return method.getReturnType();
        }
View Full Code Here

    }
   
    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);
View Full Code Here

    CommandService commandService = getCommandService(element, parse, parser);
    commandServiceDescriptor.setCommandService(commandService);
   
    List<Element> interceptorElements = XmlUtil.elements(element);
    for (Element interceptorElement : interceptorElements) {
      Descriptor interceptorDescriptor = (Descriptor) parser.parseElement(interceptorElement, parse, WireParser.CATEGORY_INTERCEPTOR);
      commandServiceDescriptor.addInterceptorDescriptor(interceptorDescriptor);
    }

    return commandServiceDescriptor;
  }
View Full Code Here

    wireDefinition.setClassLoader(classLoader);
   
    parse.pushObject(wireDefinition);
    try {
      for (Element descriptorElement: elements) {
        Descriptor descriptor = (Descriptor) parseElement(descriptorElement, parse, CATEGORY_DESCRIPTOR);
       
        // add the descriptor
        if ( (wireDefinition!=null)
             && (descriptor!=null)
           ) {
View Full Code Here

    Object object = super.parseElement(element, parse, category);
    if ( (object!=null)
         && (object instanceof Descriptor)
       ) {
     
      Descriptor descriptor = (Descriptor) object;
     
      if (descriptor instanceof AbstractDescriptor) {
        AbstractDescriptor abstractDescriptor = (AbstractDescriptor) descriptor;
        if(element.hasAttribute("name")){
          String name = element.getAttribute("name");
View Full Code Here

        argDescriptor.setTypeName(XmlUtil.attribute(argElement, "type"));
        Element descriptorElement = XmlUtil.element(argElement);
        if (descriptorElement==null) {
          parse.addProblem("arg must contain exactly one descriptor element out of "+bindings.getTagNames(category)+" as contents:"+XmlUtil.toString((Element) argElement.getParentNode()), argElement);
        } else {
          Descriptor descriptor = (Descriptor) parseElement(descriptorElement, parse, category);
          argDescriptor.setDescriptor(descriptor);
        }
        args.add(argDescriptor);
      }
    }
View Full Code Here

  public void initialize(Object object, WireContext wireContext) {
    Map<Object,Object> map = (Map<Object,Object>) object;
    try {
      if (keyDescriptors!=null) {
        for (int i=0; i<keyDescriptors.size(); i++) {
          Descriptor keyDescriptor = keyDescriptors.get(i);
          Descriptor valueDescriptor = valueDescriptors.get(i);
          Object key = wireContext.create(keyDescriptor, true);
          Object value = wireContext.create(valueDescriptor, true);
          map.put(key, value);
        }
      }
View Full Code Here

    } else {
      parse.addProblem("property must have name or setter attribute: "+XmlUtil.toString(element), element);
    }
    Element descriptorElement = XmlUtil.element(element);
    if (descriptorElement!=null) {
      Descriptor descriptor = (Descriptor) parser.parseElement(descriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
      if (descriptor!=null) {
        propertyOperation.setDescriptor(descriptor);
      } else {
        parse.addProblem("couldn't parse property content element as a value descriptor: "+XmlUtil.toString(element), element);
      }
View Full Code Here

        parse.addProblem("element 'factory' is specified together with attribute 'factory' in element 'object': "+XmlUtil.toString(element), element);
      }

    } else if (factoryElement!=null) {
      Element factoryDescriptorElement = XmlUtil.element(factoryElement);
      Descriptor factoryDescriptor = (Descriptor) parser.parseElement(factoryDescriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
      descriptor.setFactoryDescriptor(factoryDescriptor);

    } else if (expr!=null) {
      descriptor.setExpr(expr);
      String lang = XmlUtil.attribute(element, "lang");
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.wire.Descriptor

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.