KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > def > assign > FromProperty


1 package org.jbpm.bpel.def.assign;
2
3 import javax.xml.namespace.QName JavaDoc;
4
5 import org.jbpm.graph.exe.Token;
6
7 import org.jbpm.bpel.data.def.VariableDefinition;
8 import org.jbpm.bpel.data.exe.MessageVariableInstance;
9 import org.jbpm.bpel.def.Assign;
10
11 /**
12  * <code>&lt;from&gt;</code> variant that explicitly manipulates message
13  * properties occurring in variables.
14  * @see "WS-BPEL 2.0 &sect;9.3"
15  * @author Alejandro Guízar
16  * @version $Revision: 1.4 $ $Date: 2005/05/31 00:49:53 $
17  */

18 public class FromProperty extends Assign.From {
19   
20   private static final long serialVersionUID = 1L;
21   private VariableDefinition variable;
22   private QName JavaDoc property;
23
24   public Object JavaDoc extract(Token token) {
25     MessageVariableInstance instance = (MessageVariableInstance) variable.getInstance(token);
26     return instance.getProperty(property);
27   }
28   
29   public VariableDefinition getVariable() {
30     return variable;
31   }
32   
33   public void setVariable(VariableDefinition variable) {
34     this.variable = variable;
35   }
36   
37   public QName JavaDoc getProperty() {
38     return property;
39   }
40   
41   public void setProperty(QName JavaDoc property) {
42     this.property = property;
43   }
44 }
45
Popular Tags