1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/java/cewolf-1.0/src/main/java/de/laures/cewolf/storage/SessionStorageItem.java Sat Feb 28 21:31:02 2009 +0100
1.3 @@ -0,0 +1,94 @@
1.4 +/*
1.5 + * Created on Aug 2, 2004
1.6 + *
1.7 + * To change the template for this generated file go to
1.8 + * Window - Preferences - Java - Code Generation - Code and Comments
1.9 + */
1.10 +package de.laures.cewolf.storage;
1.11 +
1.12 +import java.util.Date;
1.13 +
1.14 +import de.laures.cewolf.ChartImage;
1.15 +
1.16 +/**
1.17 + * @author brianf
1.18 + *
1.19 + * To change the template for this generated type comment go to Window -
1.20 + * Preferences - Java - Code Generation - Code and Comments
1.21 + */
1.22 +public class SessionStorageItem
1.23 +{
1.24 + String cid = null;
1.25 + ChartImage chart = null;
1.26 + Date timeout = null;
1.27 +
1.28 + public SessionStorageItem( ChartImage theChart, String theCid, Date theTimeout )
1.29 + {
1.30 + chart = theChart;
1.31 + cid = theCid;
1.32 + timeout = theTimeout;
1.33 + }
1.34 +
1.35 + public String toString()
1.36 + {
1.37 + return ("SSI: id:"+cid+" expires:"+timeout);
1.38 + }
1.39 + public final boolean isExpired(Date currentTime)
1.40 + {
1.41 + return currentTime.after(timeout);
1.42 + }
1.43 + /**
1.44 + * @return Returns the chart.
1.45 + */
1.46 + public ChartImage getChart()
1.47 + {
1.48 + return chart;
1.49 + }
1.50 + /**
1.51 + * @param chart
1.52 + * The chart to set.
1.53 + */
1.54 + public void setChart( ChartImage chart )
1.55 + {
1.56 + this.chart = chart;
1.57 + }
1.58 + /**
1.59 + * @return Returns the cid.
1.60 + */
1.61 + public String getCid()
1.62 + {
1.63 + return cid;
1.64 + }
1.65 + /**
1.66 + * @param cid
1.67 + * The cid to set.
1.68 + */
1.69 + public void setCid( String cid )
1.70 + {
1.71 + this.cid = cid;
1.72 + }
1.73 + /**
1.74 + *
1.75 + */
1.76 + public SessionStorageItem()
1.77 + {
1.78 + super();
1.79 + // TODO Auto-generated constructor stub
1.80 + }
1.81 +
1.82 + /**
1.83 + * @return Returns the timeout.
1.84 + */
1.85 + public Date getTimeout()
1.86 + {
1.87 + return timeout;
1.88 + }
1.89 + /**
1.90 + * @param timeout
1.91 + * The timeout to set.
1.92 + */
1.93 + public void setTimeout( Date timeout )
1.94 + {
1.95 + this.timeout = timeout;
1.96 + }
1.97 +}
1.98 \ No newline at end of file