Package org.jbpm.pvm.internal.wire.operation

Examples of org.jbpm.pvm.internal.wire.operation.FieldOperation


    addInjection(fieldName, new EnvDescriptor(type));
  }

  /** add a field injection based on a descriptor */
  public void addInjection(String fieldName, Descriptor descriptor) {
    FieldOperation injectionOperation = new FieldOperation();
    injectionOperation.setFieldName(fieldName);
    injectionOperation.setDescriptor(descriptor);
    addOperation(injectionOperation);
  }
View Full Code Here


  public FieldBinding() {
    super("field");
  }

  public Object parse(Element element, Parse parse, Parser parser) {
    FieldOperation fieldOperation = new FieldOperation();
    if (element.hasAttribute("name")) {
      fieldOperation.setFieldName(element.getAttribute("name"));
    } else {
      parse.addProblem("field must have name : "+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) {
        fieldOperation.setDescriptor(descriptor);
      } else {
        parse.addProblem("unknown descriptor element "+descriptorElement.getTagName()+" inside field operation: "+XmlUtil.toString(element), element);
      }
    } else {
      parse.addProblem("field must have 1 descriptor element out of "+parser.getBindings().getTagNames(WireParser.CATEGORY_DESCRIPTOR)+" as content: "+XmlUtil.toString(element), element);
View Full Code Here

      objectDescriptor.addInjection("deployers", listDescriptor);
     
    } else {
      // merge the new deployment managers with the existing ones
      objectDescriptor = (ObjectDescriptor) wireDefinition.getDescriptor(descriptorName);
      FieldOperation injection = (FieldOperation) objectDescriptor.getOperations().get(0);
      ListDescriptor existingDescriptor = (ListDescriptor) injection.getDescriptor();
      List<Descriptor> valueDescriptors = existingDescriptor.getValueDescriptors();
      valueDescriptors.addAll(listDescriptor.getValueDescriptors());
    }

    return objectDescriptor;
View Full Code Here

    addInjection(fieldName, new EnvDescriptor(type));
  }

  /** add a field injection based on a descriptor */
  public void addInjection(String fieldName, Descriptor descriptor) {
    FieldOperation injectionOperation = new FieldOperation();
    injectionOperation.setFieldName(fieldName);
    injectionOperation.setDescriptor(descriptor);
    addOperation(injectionOperation);
  }
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.wire.operation.FieldOperation

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.