Examples of Descriptor


Examples of org.jbpm.wire.Descriptor

    } else {
      parse.addProblem("field must have name : "+XmlUtil.toString(element));
    }
    Element descriptorElement = XmlUtil.element(element);
    if (descriptorElement!=null) {
      Descriptor descriptor = (Descriptor) parser.parseElement(descriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
      if (descriptor!=null) {
        fieldOperation.setDescriptor(descriptor);
      } else {
        parse.addProblem("unknown descriptor element "+descriptorElement.getTagName()+" inside field operation: "+XmlUtil.toString(element));
      }
View Full Code Here

Examples of org.jbpm.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)!=null) {
      Descriptor configurationDescriptor = (Descriptor) super.parse(element, parse, parser);
      descriptor.setConfigurationDescriptor(configurationDescriptor);
    }

    return descriptor;
  }
View Full Code Here

Examples of org.jbpm.wire.Descriptor

  public Object construct(WireContext wireContext) {
    CommandService interceptedCommandService = commandService;
    if (interceptorDescriptors!=null) {
      for (int i=interceptorDescriptors.size()-1 ; i>=0; i--) {
        Descriptor descriptor = interceptorDescriptors.get(i);
        Interceptor interceptor = (Interceptor) descriptor.construct(wireContext);
        interceptor.setNext(interceptedCommandService);
        interceptedCommandService = interceptor;
      }
    }
    return interceptedCommandService;
View Full Code Here

Examples of org.jbpm.wire.Descriptor

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

Examples of org.jbpm.wire.Descriptor

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

    return commandServiceDescriptor;
View Full Code Here

Examples of org.jbpm.wire.Descriptor

    } else {
      parse.addProblem("property must have name or setter attribute: "+XmlUtil.toString(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));
      }
View Full Code Here

Examples of org.jbpm.wire.Descriptor

      for (Element entryElement: elements) {
        if ("entry".equals(XmlUtil.getTagName(entryElement))) {
          // key
          Element keyElement = XmlUtil.element(entryElement, "key");
          Element keyDescriptorElement = (keyElement!=null ? XmlUtil.element(keyElement) : null);
          Descriptor keyDescriptor = (Descriptor) parser.parseElement(keyDescriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);
          // value
          Element valueElement = XmlUtil.element(entryElement, "value");
          Element valueDescriptorElement = (valueElement!=null ? XmlUtil.element(valueElement) : null);
          Descriptor valueDescriptor = (Descriptor) parser.parseElement(valueDescriptorElement, parse, WireParser.CATEGORY_DESCRIPTOR);

          if ( (keyDescriptor!=null)
               && (valueDescriptor!=null)
             ) {
            keyDescriptors.add(keyDescriptor);
View Full Code Here

Examples of org.jbpm.wire.Descriptor

      } catch (JbpmReflectException e) {
        throw new WireException("couldn't create '"+(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

Examples of org.jbpm.wire.Descriptor

    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

Examples of org.jbpm.wire.Descriptor

        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_DESCRIPTOR)+" as contents:"+XmlUtil.toString((Element) argElement.getParentNode()));
        } else {
          Descriptor descriptor = (Descriptor) parseElement(descriptorElement, parse, CATEGORY_DESCRIPTOR);
          argDescriptor.setDescriptor(descriptor);
        }
        args.add(argDescriptor);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.