1 7 package de.laures.cewolf.storage; 8 9 import java.util.Date ; 10 11 import de.laures.cewolf.ChartImage; 12 13 19 public class SessionStorageItem 20 { 21 String cid = null; 22 ChartImage chart = null; 23 Date timeout = null; 24 25 public SessionStorageItem( ChartImage theChart, String theCid, Date theTimeout ) 26 { 27 chart = theChart; 28 cid = theCid; 29 timeout = theTimeout; 30 } 31 32 public String toString() 33 { 34 return ("SSI: id:"+cid+" expires:"+timeout); 35 } 36 public final boolean isExpired(Date currentTime) 37 { 38 return currentTime.after(timeout); 39 } 40 43 public ChartImage getChart() 44 { 45 return chart; 46 } 47 51 public void setChart( ChartImage chart ) 52 { 53 this.chart = chart; 54 } 55 58 public String getCid() 59 { 60 return cid; 61 } 62 66 public void setCid( String cid ) 67 { 68 this.cid = cid; 69 } 70 73 public SessionStorageItem() 74 { 75 super(); 76 } 78 79 82 public Date getTimeout() 83 { 84 return timeout; 85 } 86 90 public void setTimeout( Date timeout ) 91 { 92 this.timeout = timeout; 93 } 94 } | Popular Tags |