pt.digitalis.dif.controller.interfaces
Interface IDIFSession

All Known Subinterfaces:
IPrivateDIFSession
All Known Implementing Classes:
DIFSession

public interface IDIFSession

Defines a public accessible DIF Session

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt
, Pedro Viegas pviegas@digitalis.pt
Created on:
Nov 29, 2007

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.
 Object getAttribute(String key)
          Retrieves a given attributes by id.
 Map<String,Object> getAttributes()
          Retrieves all session attributes.
 String getLanguage()
           
 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 hasTimedOut()
          Checks if session has timed out.
 boolean isLogged()
          Checks if the session has a logged user
 boolean isMarkedForRemoval()
           
 void setAttributes(Map<String,Object> attributes)
          Sets all session attributes.
 void setLanguage(String language)
           
 void setSessionTimeOut(long sessionTimeOut)
          Sets the session time-out value.
 void setUser(DIFUserInSession user)
          Sets the user in session.
 

Method Detail

addAttribute

void addAttribute(String key,
                  Object value)
Stores a new attribute in the session.

Parameters:
key - the key of the attribute
value - the value of the new attribute

containsAttribute

boolean containsAttribute(String key)
Stores a new attribute in the session.

Parameters:
key - the key of the attribute
Returns:
T if the attribute for the given key exists

getAttribute

Object getAttribute(String key)
Retrieves a given attributes by id.

Parameters:
key - the key of the attribute
Returns:
the attribute value

getAttributes

Map<String,Object> getAttributes()
Retrieves all session attributes.

Returns:
the session attributes Map

getLanguage

String getLanguage()
Returns:
the language

getNavigationHistory

INavigationHistory getNavigationHistory()
Provides the current session navigation history objet

Returns:
the navigation history object in session

getSessionID

String getSessionID()
Returns:
the sessionID

getSessionTimeOut

long getSessionTimeOut()
Inspector for the session time-out value.

Returns:
the session time-out value

getUser

DIFUserInSession getUser()
Gets the user in session.

Returns:
the user in session

hasTimedOut

boolean hasTimedOut()
Checks if session has timed out.

Returns:
T if session has timed out, F otherwise

isLogged

boolean isLogged()
Checks if the session has a logged user

Returns:
T if if is logged

isMarkedForRemoval

boolean isMarkedForRemoval()
Returns:
T if the session has been marked for removal

setAttributes

void setAttributes(Map<String,Object> attributes)
Sets all session attributes.

Parameters:
attributes - the session attributes to set

setLanguage

void setLanguage(String language)
Parameters:
language - the language to set

setSessionTimeOut

void setSessionTimeOut(long sessionTimeOut)
Sets the session time-out value.

Parameters:
sessionTimeOut - the session time out new value to set

setUser

void setUser(DIFUserInSession user)
Sets the user in session.

Parameters:
user - the user to set


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.