01: /*
02: * Created on Sep 24, 2004
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package org.xdev.base.xssl.util;
08:
09: import java.util.HashMap;
10:
11: import org.xdev.base.xssl.XSSLReturn;
12:
13: /**
14: * @author Administrator
15: *
16: * TODO To change the template for this generated type comment go to
17: * Window - Preferences - Java - Code Style - Code Templates
18: */
19: public class SystemProperty extends XSSLReturn {
20:
21: private Object returnValue = null;
22:
23: /**
24: * @param id
25: */
26: public SystemProperty(String id) {
27: super (id);
28: // TODO Auto-generated constructor stub
29: }
30:
31: /**
32: * @param id
33: * @param properties
34: */
35: public SystemProperty(String id, HashMap properties) {
36: super (id, properties);
37: // TODO Auto-generated constructor stub
38: }
39:
40: /* (non-Javadoc)
41: * @see org.xdev.base.core.object.Configuration#getObjectValue()
42: */
43: public Object getObjectValue() {
44: return this .returnValue;
45: }
46:
47: /* (non-Javadoc)
48: * @see org.xdev.base.xssl.XSSLAction#set()
49: */
50: protected void set() throws Exception {
51: if (this .hasProperty("value")) {
52: System.setProperty(this .getProperty("name"), this
53: .getProperty("value"));
54: } else {
55: this .returnValue = System.getProperty(this
56: .getProperty("name"));
57: }
58: }
59:
60: }
|