KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > xml > ScopeReader


1 package org.jbpm.bpel.xml;
2
3 import org.w3c.dom.Attr JavaDoc;
4 import org.w3c.dom.Element JavaDoc;
5
6 import org.jbpm.bpel.def.Activity;
7 import org.jbpm.bpel.def.Scope;
8
9 /**
10  * @author Juan Cantú
11  * @version $Revision: 1.7 $ $Date: 2005/06/16 19:15:34 $
12  */

13 public class ScopeReader extends ActivityReader {
14
15   protected Activity createActivity() {
16     return new Scope();
17   }
18   
19   protected void readActivity(Activity activity, Element JavaDoc scopeElement) {
20     Scope localScope = (Scope) activity;
21     // FIXME id should be set by the database
22
localScope.setId(localScope.hashCode());
23     
24     Attr JavaDoc isolatedAttr = scopeElement.getAttributeNode(BpelConstants.ATTR_ISOLATED);
25     boolean isolated = bpelReader.readTBoolean(isolatedAttr, Boolean.FALSE).booleanValue();
26     localScope.setIsolated(isolated);
27     bpelReader.readScope(scopeElement, localScope);
28   }
29 }
30
Popular Tags