01: /*
02: * Created on Aug 2, 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 de.laures.cewolf.storage;
08:
09: import java.util.Date;
10:
11: import de.laures.cewolf.ChartImage;
12:
13: /**
14: * @author brianf
15: *
16: * To change the template for this generated type comment go to Window -
17: * Preferences - Java - Code Generation - Code and Comments
18: */
19: public class SessionStorageItem {
20: String cid = null;
21: ChartImage chart = null;
22: Date timeout = null;
23:
24: public SessionStorageItem(ChartImage theChart, String theCid,
25: Date theTimeout) {
26: chart = theChart;
27: cid = theCid;
28: timeout = theTimeout;
29: }
30:
31: public String toString() {
32: return ("SSI: id:" + cid + " expires:" + timeout);
33: }
34:
35: public final boolean isExpired(Date currentTime) {
36: return currentTime.after(timeout);
37: }
38:
39: /**
40: * @return Returns the chart.
41: */
42: public ChartImage getChart() {
43: return chart;
44: }
45:
46: /**
47: * @param chart
48: * The chart to set.
49: */
50: public void setChart(ChartImage chart) {
51: this .chart = chart;
52: }
53:
54: /**
55: * @return Returns the cid.
56: */
57: public String getCid() {
58: return cid;
59: }
60:
61: /**
62: * @param cid
63: * The cid to set.
64: */
65: public void setCid(String cid) {
66: this .cid = cid;
67: }
68:
69: /**
70: *
71: */
72: public SessionStorageItem() {
73: super ();
74: // TODO Auto-generated constructor stub
75: }
76:
77: /**
78: * @return Returns the timeout.
79: */
80: public Date getTimeout() {
81: return timeout;
82: }
83:
84: /**
85: * @param timeout
86: * The timeout to set.
87: */
88: public void setTimeout(Date timeout) {
89: this.timeout = timeout;
90: }
91: }
|