|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.controller.objects.DIFSession
public class DIFSession
Base implementation of a DIF Session. Should be extended by each specific channel session. (i.e. DIFSessionHTTPImpl)
Field Summary | |
---|---|
static String |
REMOTE_AUTHENTICATION_PROVIDER_LOGIN
The session key indicating that authentication was performed by a remote provider |
static String |
REMOTE_AUTHENTICATION_PROVIDER_LOGOUT
The session key indicating that authentication was performed by a remote provider |
Constructor Summary | |
---|---|
DIFSession(String sessionID)
Default constructor. |
|
DIFSession(String sessionID,
DIFUserInSession user)
One-argument constructor that receives an user. |
Method Summary | |
---|---|
void |
addAttribute(String key,
Object value)
Stores a new attribute in the session. |
boolean |
containsAttribute(String key)
Stores a new attribute in the session. |
void |
forceKeepAlive()
Touches the session so it remains active. |
Object |
getAttribute(String key)
Retrieves a given attributes by id. |
Map<String,Object> |
getAttributes()
Retrieves all session attributes. |
long |
getFirstAccessTime()
Inspector for the 'firstAccessTime' property. |
String |
getLanguage()
|
long |
getLastAccessTime()
Inspector for the 'lastAccessTime' property. |
INavigationHistory |
getNavigationHistory()
Provides the current session navigation history objet |
String |
getSessionID()
|
long |
getSessionTimeOut()
Inspector for the session time-out value. |
DIFUserInSession |
getUser()
Gets the user in session. |
boolean |
hasExpiredAfterTimeOut()
The criteria for a timed out session is that the last access time plus the session time out must be higher than the current time. |
boolean |
hasTimedOut()
The criteria for a timed out session is that the last access time plus the session time out must be higher than the current time. |
boolean |
isLogged()
Checks if the session has a logged user |
boolean |
isMarkedForRemoval()
|
void |
keepAlive()
Sets the 'lastAccesTime' property to "now". |
void |
setAttributes(Map<String,Object> attributes)
Sets all session attributes. |
void |
setLanguage(String language)
|
void |
setLastAccessTime(long lastAccessTime)
Modifier for the 'lastAccessTime' property. |
void |
setMarkedForRemoval(Boolean markedForRemoval)
Marks the session to be removed |
void |
setSessionTimeOut(long sessionTimeOut)
Sets the session time-out value. |
void |
setUser(DIFUserInSession user)
Sets the user in session. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REMOTE_AUTHENTICATION_PROVIDER_LOGIN
public static final String REMOTE_AUTHENTICATION_PROVIDER_LOGOUT
Constructor Detail |
---|
public DIFSession(String sessionID)
sessionID
- the session unique identifierpublic DIFSession(String sessionID, DIFUserInSession user)
sessionID
- the session unique identifieruser
- a DIF userMethod Detail |
---|
public void addAttribute(String key, Object value)
IDIFSession
addAttribute
in interface IDIFSession
key
- the key of the attributevalue
- the value of the new attributeIDIFSession.addAttribute(java.lang.String, java.lang.Object)
public boolean containsAttribute(String key)
IDIFSession
containsAttribute
in interface IDIFSession
key
- the key of the attribute
IDIFSession.containsAttribute(java.lang.String)
public void forceKeepAlive()
IPrivateDIFSession
forceKeepAlive
in interface IPrivateDIFSession
IPrivateDIFSession.forceKeepAlive()
public Object getAttribute(String key)
IDIFSession
getAttribute
in interface IDIFSession
key
- the key of the attribute
IDIFSession.getAttribute(java.lang.String)
public Map<String,Object> getAttributes()
IDIFSession
getAttributes
in interface IDIFSession
IDIFSession.getAttributes()
public long getFirstAccessTime()
public String getLanguage()
getLanguage
in interface IDIFSession
IDIFSession.getLanguage()
public long getLastAccessTime()
public INavigationHistory getNavigationHistory()
IDIFSession
getNavigationHistory
in interface IDIFSession
IDIFSession.getNavigationHistory()
public String getSessionID()
getSessionID
in interface IDIFSession
IDIFSession.getSessionID()
public long getSessionTimeOut()
IDIFSession
getSessionTimeOut
in interface IDIFSession
IDIFSession.getSessionTimeOut()
public DIFUserInSession getUser()
IDIFSession
getUser
in interface IDIFSession
IDIFSession.getUser()
public boolean hasExpiredAfterTimeOut()
IPrivateDIFSession
hasExpiredAfterTimeOut
in interface IPrivateDIFSession
IPrivateDIFSession.hasExpiredAfterTimeOut()
public boolean hasTimedOut()
hasTimedOut
in interface IDIFSession
IDIFSession.hasTimedOut()
public boolean isLogged()
IDIFSession
isLogged
in interface IDIFSession
IDIFSession.isLogged()
public boolean isMarkedForRemoval()
isMarkedForRemoval
in interface IDIFSession
IDIFSession.isMarkedForRemoval()
public void keepAlive()
keepAlive
in interface IPrivateDIFSession
IPrivateDIFSession.keepAlive()
public void setAttributes(Map<String,Object> attributes)
IDIFSession
setAttributes
in interface IDIFSession
attributes
- the session attributes to setIDIFSession.setAttributes(Map)
public void setLanguage(String language)
setLanguage
in interface IDIFSession
language
- the language to setIDIFSession.setLanguage(java.lang.String)
public void setLastAccessTime(long lastAccessTime)
lastAccessTime
- the 'lastAccessTime' new value to setpublic void setMarkedForRemoval(Boolean markedForRemoval)
IPrivateDIFSession
setMarkedForRemoval
in interface IPrivateDIFSession
markedForRemoval
- public void setSessionTimeOut(long sessionTimeOut)
IDIFSession
setSessionTimeOut
in interface IDIFSession
sessionTimeOut
- the session time out new value to setIDIFSession.setSessionTimeOut(long)
public void setUser(DIFUserInSession user)
IDIFSession
setUser
in interface IDIFSession
user
- the user to setIDIFSession.setUser(pt.digitalis.dif.controller.objects.DIFUserInSession)
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |