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.util;
08:
09: import java.text.SimpleDateFormat;
10: import java.util.HashMap;
11:
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 CurrentTimeStamp extends XSSLReturn {
21: private Object timeStamp = null;
22:
23: private SimpleDateFormat sdf = new SimpleDateFormat();
24:
25: /**
26: * @param id
27: */
28: public CurrentTimeStamp(String id) {
29: super (id);
30: }
31:
32: /**
33: * @param id
34: * @param properties
35: */
36: public CurrentTimeStamp(String id, HashMap properties) {
37: super (id, properties);
38: }
39:
40: /* (non-Javadoc)
41: * @see org.xdev.base.core.object.Configuration#getValue()
42: */
43: public Object getObjectValue() {
44: return this .timeStamp;
45: }
46:
47: /* (non-Javadoc)
48: * @see org.xdev.base.xssl.XSSLAction#set()
49: */
50: protected void set() throws Exception {
51: sdf.applyPattern(this .getProperty("date-pattern"));
52:
53: this .timeStamp = sdf.format(new java.util.Date(System
54: .currentTimeMillis()));
55: }
56:
57: }
|