com.softwareag.centrasite.appl.framework
Class SessionContext

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.SessionContext

public class SessionContext
extends java.lang.Object

This class serves as a container for the session data of an application. Use this class to configure and later retrieve BeanPool and Manager instances.


Method Summary
 BeanPool createBeanPool()
          Creates a new instance of BeanPool.
 BeanPool createBeanPool(boolean createNewCurrentBeanPool)
          Creates a new instance of BeanPool or returns the already existing beanPool.
static SessionContext createInstance(Configuration configuration)
          Creates a SessionContext instance using the given configuration.
static SessionContext createInstance(Configuration configuration, IOCProvider provider)
          Creates a SessionContext instance using the given configuration and IOCProvider.
static SessionContext createInstance(IOCProvider pContext, RegistryProvider pProvider)
          Creates a SessionContext instance using the given RegistryProvider and the given context.
static SessionContext createInstance(RegistryProvider pProvider)
          Creates a SessionContext instance using the given RegistryProvider.
<M extends Manager<?>>
M
findManager(java.lang.Class<M> pClass)
          Retrieves and initializes a manager of the given type.
 BeanPool getBeanPool()
          Deprecated. use getCurrentBeanPool()
 Configuration getConfiguration()
          Return the configuration.
 BeanPool getCurrentBeanPool()
          Obtains the current bean pool.
 LCMAdminManager getLCMAdminManager()
          Returns an instance of LCMAdminManager
 RegistryBeanGenerator getRegistryBeanGenerator()
          Retrieves the RegistryBeanGenerator instance for the current session.
 RevisionManager getRevisionManager()
          Retrieves the RevisionManager instance for the current session.
 TypeManager getTypeManager()
          Retrieves the TypeManager instance for the current session.
 VersionManager getVersionManager()
           
 void releaseCurrentBeanPool()
          Releases the current bean pool.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInstance

public static SessionContext createInstance(RegistryProvider pProvider)
Creates a SessionContext instance using the given RegistryProvider.


createInstance

public static SessionContext createInstance(Configuration configuration)
Creates a SessionContext instance using the given configuration.


createInstance

public static SessionContext createInstance(Configuration configuration,
                                            IOCProvider provider)
Creates a SessionContext instance using the given configuration and IOCProvider.


createInstance

public static SessionContext createInstance(IOCProvider pContext,
                                            RegistryProvider pProvider)
Creates a SessionContext instance using the given RegistryProvider and the given context.


getConfiguration

public Configuration getConfiguration()
                               throws CSAppFrameworkException
Return the configuration.

Returns:
the configuration
Throws:
CSAppFrameworkException

getBeanPool

public BeanPool getBeanPool()
Deprecated. use getCurrentBeanPool()

Retrieves the BeanPool instance for this session. Returns the first created BeanPool.


createBeanPool

public BeanPool createBeanPool()
Creates a new instance of BeanPool.

Returns:
a BeanPool instance.

createBeanPool

public BeanPool createBeanPool(boolean createNewCurrentBeanPool)
Creates a new instance of BeanPool or returns the already existing beanPool. If createNewBeanPool is set to true a new instance will be created whether or not a beanPool instance is already present.

Parameters:
createNewCurrentBeanPool - - whether or not to change the current bean pool
Returns:
a BeanPool instance.

getCurrentBeanPool

public BeanPool getCurrentBeanPool()
Obtains the current bean pool. The definition of what exactly "current" means is controlled by the CurrentBeanPoolContext impl configured for use.

Returns:
The current bean pool.

releaseCurrentBeanPool

public void releaseCurrentBeanPool()
Releases the current bean pool. The call is directly delegated to CurrentBeanPoolContext.cleanupCurrentBeanPool() method of the configured CurrentBeanPoolContext instance.


getTypeManager

public TypeManager getTypeManager()
Retrieves the TypeManager instance for the current session.


getRevisionManager

public RevisionManager getRevisionManager()
Retrieves the RevisionManager instance for the current session.


getRegistryBeanGenerator

public RegistryBeanGenerator getRegistryBeanGenerator()
Retrieves the RegistryBeanGenerator instance for the current session.


findManager

public <M extends Manager<?>> M findManager(java.lang.Class<M> pClass)
                                 throws java.lang.Exception
Retrieves and initializes a manager of the given type.

Throws:
java.lang.Exception

getLCMAdminManager

public LCMAdminManager getLCMAdminManager()
Returns an instance of LCMAdminManager

Returns:
LCMAdminManager

getVersionManager

public VersionManager getVersionManager()