it.eng.spagobi.container
Class Context

java.lang.Object
  extended by it.eng.spagobi.container.Context
All Implemented Interfaces:
java.io.Serializable

public class Context
extends java.lang.Object
implements java.io.Serializable

This class has an objects container (a simple Map) and a last usage date. Objects are stored with a key that is a String.

Author:
Zerbetto (davide.zerbetto@eng.it)
See Also:
Serialized Form

Constructor Summary
Context()
           
 
Method Summary
 java.lang.Object get(java.lang.String key)
           
 java.util.List getKeys()
          Returns all the string keys of the stored objects as a list
 java.util.Calendar getLastUsageDate()
           
 boolean isOlderThan(int minutes)
          Return true if this instance is older than the minutes given as input, i.e.
 void remove(java.lang.String key)
           
 void set(java.lang.String key, java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context()
Method Detail

getLastUsageDate

public java.util.Calendar getLastUsageDate()

get

public java.lang.Object get(java.lang.String key)

getKeys

public java.util.List getKeys()
Returns all the string keys of the stored objects as a list

Returns:
all the string keys of the stored objects as a list

set

public void set(java.lang.String key,
                java.lang.Object object)

remove

public void remove(java.lang.String key)

isOlderThan

public boolean isOlderThan(int minutes)
Return true if this instance is older than the minutes given as input, i.e. last usage date is before the given minutes number

Parameters:
minutes - The number of minutes
Returns:
true if this instance is older than the minutes given as input, i.e. last usage date is before the given minutes number