01: /*
02: * Created on Apr 12, 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.core.vm.AXInterpretator;
12:
13: import org.xdev.base.xssl.XSSLReturn;
14:
15: /**
16: * @author AYegorov
17: *
18: * To change the template for this generated type comment go to
19: * Window>Preferences>Java>Code Generation>Code and Comments
20: */
21: public class TransactionArguments extends XSSLReturn {
22: public static final int SYSTEM = 0;
23: public static final int COMMAND_LINE = 1;
24:
25: public static final String ARGUMENT_TYPE = "argument";
26: public static final String ARGUMENT_NAME = "argument-name";
27: public static final String ARGUMENT_INDEX = "argument-index";
28:
29: private Object transactionArgument = null;
30:
31: /**
32: * @param id
33: */
34: public TransactionArguments(String id) {
35: super (id);
36: // XXX Auto-generated constructor stub
37: }
38:
39: /**
40: * @param id
41: * @param properties
42: */
43: public TransactionArguments(String id, HashMap properties) {
44: super (id, properties);
45: // XXX Auto-generated constructor stub
46: }
47:
48: /* (non-Javadoc)
49: * @see org.xdev.base.core.object.Configuration#getValue()
50: */
51: public Object getObjectValue() {
52: // XXX Auto-generated method stub
53: return null;
54: }
55:
56: /* (non-Javadoc)
57: * @see org.xdev.base.xssl.XSSLAction#set()
58: */
59: protected void set() throws Exception {
60: switch (this
61: .getIntegerProperty(TransactionArguments.ARGUMENT_TYPE)) {
62: case TransactionArguments.SYSTEM:
63:
64: transactionArgument = System.getProperty(this
65: .getProperty(TransactionArguments.ARGUMENT_NAME));
66:
67: break;
68: case TransactionArguments.COMMAND_LINE:
69:
70: AXInterpretator interp = (AXInterpretator) this
71: .getTransactionController();
72:
73: transactionArgument = interp
74: .getArgument(this
75: .getIntegerProperty(TransactionArguments.ARGUMENT_INDEX));
76:
77: break;
78: }
79: }
80:
81: }
|