01: /*
02: * Created on Apr 13, 2004
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.xdev.base.xssl.manage;
08:
09: import java.util.HashMap;
10:
11: import org.xdev.base.xssl.XSSLAction;
12: import org.xdev.base.xssl.XSSLReturn;
13:
14: /**
15: * @author AYegorov
16: *
17: * To change the template for this generated type comment go to
18: * Window>Preferences>Java>Code Generation>Code and Comments
19: */
20: public class TransactionBreak extends XSSLReturn {
21:
22: /**
23: * @param id
24: */
25: public TransactionBreak(String id) {
26: super (id);
27: // XXX Auto-generated constructor stub
28: }
29:
30: /**
31: * @param id
32: * @param properties
33: */
34: public TransactionBreak(String id, HashMap properties) {
35: super (id, properties);
36: // XXX Auto-generated constructor stub
37: }
38:
39: /* (non-Javadoc)
40: * @see org.xdev.base.core.object.Configuration#getValue()
41: */
42: public Object getObjectValue() {
43: // XXX Auto-generated method stub
44: return null;
45: }
46:
47: /* (non-Javadoc)
48: * @see org.xdev.base.xssl.XSSLAction#set()
49: */
50: protected void set() throws Exception {
51: int level = 1;
52:
53: try {
54: this .getIntegerProperty("level");
55: } catch (Exception ex) {
56: this .logDebug(ex);
57: }
58:
59: XSSLAction parent = this ;
60: XSSLAction root = (XSSLAction) this .getRoot();
61:
62: //for (int i=0; i<level; i++) {
63: while ((level != -1 ? level-- : 1) > 0) {
64: parent = (XSSLAction) parent.getParentComponent();
65:
66: if (parent != null && !parent.equals(this)) {
67: parent.breakExecution();
68: }
69:
70: if (parent.equals(root)) {
71: break;
72: }
73: }
74: }
75:
76: }
|