01: /*
02: * Created on Dec 2, 2003
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: import java.util.Observable;
11:
12: import org.xdev.base.core.object.Configuration;
13: import org.xdev.base.xssl.XSSLAction;
14: import org.xdev.base.xssl.XSSLActionIterator;
15:
16: import org.xdev.base.xssl.*;
17:
18: /**
19: * @author AYegorov
20: *
21: * To change the template for this generated type comment go to
22: * Window>Preferences>Java>Code Generation>Code and Comments
23: */
24: public final class TransactionFinalizer extends XSSLActionIterator
25: implements ITransactionTriggerable {
26:
27: /**
28: * @param id
29: */
30: public TransactionFinalizer(String id) {
31: super (id);
32: // TODO Auto-generated constructor stub
33: }
34:
35: /**
36: * @param id
37: * @param properties
38: */
39: public TransactionFinalizer(String id, HashMap properties) {
40: super (id, properties);
41: // TODO Auto-generated constructor stub
42: }
43:
44: /* (non-Javadoc)
45: * @see org.xdev.base.transaction.AbstractTransactionIterator#invoke(org.xdev.base.transaction.AbstractTransaction)
46: */
47: protected void invoke(XSSLAction component) throws Exception {
48: this .logDebug("Finalizing: " + component);
49:
50: if (component.getClass().equals(XReference.class)) {
51: Object comp = ((XReference) component).getObjectValue();
52:
53: this .logDebug("Finalizing Referred: " + comp);
54:
55: if (comp instanceof XSSLAction) {
56: component = (XSSLAction) comp;
57: }
58: }
59:
60: if (component != null
61: && component instanceof ITransactionFinalizable) {
62: ((ITransactionFinalizable) component).doFinalize();
63:
64: this .logDebug(component + " Finalized");
65: }
66: }
67:
68: /* (non-Javadoc)
69: * @see org.xdev.base.transaction.AbstractTransactionResult#set()
70: */
71: protected void set() throws Exception {
72: }
73:
74: /* (non-Javadoc)
75: * @see org.xdev.base.xssl.manage.ITransactionTriggerable#trigger(java.util.Observable, java.lang.Object)
76: */
77: public Object trigger(Configuration o, Object parameter)
78: throws Exception {
79: return null;
80: }
81:
82: }
|