KickJava   Java API By Example, From Geeks To Geeks.

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


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.To;
10
11 /**
12  * <code>&lt;to&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 ToProperty extends To {
19   
20   private static final long serialVersionUID = 1L;
21   private VariableDefinition variable;
22   private QName JavaDoc property;
23
24   public void assign(Token token, Object JavaDoc value) {
25     MessageVariableInstance instance = (MessageVariableInstance) variable.getInstance(token);
26     instance.setProperty(property, value);
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