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