org.jbpm.wire.binding
Class PropertyBinding

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

public class PropertyBinding
extends java.lang.Object
implements Binding

This Binding specifies PropertyOperation (for property injection).

A property injection is defined by a <property> xml element.

This element must have a attribute "name" or a attribute "setter".

If both attributes are present, the setter method is used.

This element should contain a child element that defines a Descriptor. This descriptor will be used to create the object that will be assigned to the field

Example

Consider the following class:
 public class Foo {
   String bar;
   public void setBar(String bar) {
     this.bar = bar;
   }
 }
The following Xml declaration will create an object 'o' of class 'Foo' (see ObjectDescriptor), and the value hello will be assigned to o.bar by calling the setBar method.
 <objects>
   <object name='o' class='Foo'>
     <property name='bar'>
       <string value='hello' />
     </property>
   </object>
 </objects>

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

Constructor Summary
PropertyBinding()
           
 
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

PropertyBinding

public PropertyBinding()
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