it.eng.spagobi.container.strategy
Class LightNavigatorContextRetrieverStrategy

java.lang.Object
  extended by it.eng.spagobi.container.strategy.LightNavigatorContextRetrieverStrategy
All Implemented Interfaces:
IContextRetrieverStrategy

public class LightNavigatorContextRetrieverStrategy
extends java.lang.Object
implements IContextRetrieverStrategy

TO BE USED ONLY INSIDE SPAGOBI CORE, NOT INSIDE EXTERNAL ENGINES. This strategy create/retrieve/destroy the context using the LightNavigationManager.LIGHT_NAVIGATOR_ID attribute contained into the Spago request SourceBean object. The context is put on ISessionContainer object with a key that has a fix part "SPAGOBI_SESSION_ATTRIBUTE" and a dynamic part, the LightNavigationManager.LIGHT_NAVIGATOR_ID request attribute; if this attribute is missing, the key used to put context on session is the static string "SPAGOBI_SESSION_ATTRIBUTE".

Author:
Zerbetto (davide.zerbetto@eng.it)

Constructor Summary
LightNavigatorContextRetrieverStrategy(it.eng.spago.base.SourceBean request)
          Look for the LightNavigationManager.LIGHT_NAVIGATOR_ID attribute on request to get the key for context storage on session.
 
Method Summary
 Context createContext(ISessionContainer sessionContainer)
          Creates a new context and puts it on the input ISessionContainer instance
 void destroyContextsOlderThan(ISessionContainer session, int minutes)
          Destroys all the contexts on the input ISessionContainer instance older than the number of minutes specified at input.
 void destroyCurrentContext(ISessionContainer sessionContainer)
          Destroys the current context on the input ISessionContainer instance
 Context getContext(ISessionContainer sessionContainer)
          Retrieves the context from the input ISessionContainer instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightNavigatorContextRetrieverStrategy

public LightNavigatorContextRetrieverStrategy(it.eng.spago.base.SourceBean request)
Look for the LightNavigationManager.LIGHT_NAVIGATOR_ID attribute on request to get the key for context storage on session.

Parameters:
request - The Spago SourceBean service request object
Method Detail

getContext

public Context getContext(ISessionContainer sessionContainer)
Retrieves the context from the input ISessionContainer instance

Specified by:
getContext in interface IContextRetrieverStrategy

createContext

public Context createContext(ISessionContainer sessionContainer)
Creates a new context and puts it on the input ISessionContainer instance

Specified by:
createContext in interface IContextRetrieverStrategy

destroyCurrentContext

public void destroyCurrentContext(ISessionContainer sessionContainer)
Destroys the current context on the input ISessionContainer instance

Specified by:
destroyCurrentContext in interface IContextRetrieverStrategy

destroyContextsOlderThan

public void destroyContextsOlderThan(ISessionContainer session,
                                     int minutes)
Destroys all the contexts on the input ISessionContainer instance older than the number of minutes specified at input.

Specified by:
destroyContextsOlderThan in interface IContextRetrieverStrategy