org.jbpm.wire.binding
Class InvokeBinding

java.lang.Object
  extended by org.jbpm.wire.binding.InvokeBinding
All Implemented Interfaces:
Binding

public class InvokeBinding
extends java.lang.Object
implements Binding

Defines a InvokeOperation

A invoke is defined by a <invoke> xml element.

This element has a attribute "method", which specifies the name of the method to invoke.

This element contains a list of child elements that defines ArgDescriptors. (see WireParser ) This list of ArgDescriptors will be used to create the arguments of the invoked method.

Example

Consider the following class:
 public class Foo {
   String bar = "";
   public void appendToBar(String text) {
     bar += text;
   }
 }
The following Xml declaration will create an object 'o' of class 'Foo' (see ObjectDescriptor), and invoke the method o.appendToBar with the value hello as a parameter.
 <objects>
   <object name='o' class='Foo'>
     <invoke method='appendToBar'>
       <arg>
        <string value='hello' />
       </arg>
     </invoke>
   </object>
 </objects>
The resulting value of o.bar will be hello.

Author:
Tom Baeyens, Guillaume Porcher (documentation)
See Also:
WireParser, ObjectBinding

Constructor Summary
InvokeBinding()
           
 
Method Summary
 java.lang.Object parse(org.w3c.dom.Element element, Parse parse, Parser parser)
          translates the given element into a domain model java object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvokeBinding

public InvokeBinding()
Method Detail

parse

public java.lang.Object parse(org.w3c.dom.Element element,
                              Parse parse,
                              Parser parser)
Description copied from interface: Binding
translates the given element into a domain model java object. Use the parse to report problems.

Specified by:
parse in interface Binding
Returns:
the domain model java object.
See Also:
Parser