org.nakedobjects.runtime.session
Class NakedObjectSessionFactoryAbstract

java.lang.Object
  extended by org.nakedobjects.runtime.session.NakedObjectSessionFactoryAbstract
All Implemented Interfaces:
ApplicationScopedComponent, Component, NakedObjectSessionFactory
Direct Known Subclasses:
NakedObjectSessionFactoryDefault

public abstract class NakedObjectSessionFactoryAbstract
extends java.lang.Object
implements NakedObjectSessionFactory

Creates an implementation of NakedObjectSessionFactory.openSession(AuthenticationSession) to create an NakedObjectSession, but delegates to subclasses to actually obtain the components that make up that NakedObjectSession.

The idea is that one subclass can use the InstallerLookup design to lookup installers for components (and hence create the components themselves), whereas another subclass might simply use Spring (or another DI container) to inject in the components according to some Spring-configured application context.


Constructor Summary
NakedObjectSessionFactoryAbstract(DeploymentType deploymentType, NakedObjectConfiguration configuration, SpecificationLoader specificationLoader, TemplateImageLoader templateImageLoader, AuthenticationManager authenticationManager, AuthorizationManager authorizationManager, UserProfileLoader userProfileLoader, PersistenceSessionFactory persistenceSessionFactory, java.util.List<java.lang.Object> serviceList)
           
 
Method Summary
 AuthenticationManager getAuthenticationManager()
          The AuthenticationManager that will be used to authenticate and create AuthenticationSessions within the NakedObjectSession.
 AuthorizationManager getAuthorizationManager()
          The AuthorizationManager that will be used to authorize access to domain objects.
 NakedObjectConfiguration getConfiguration()
          The application-scoped NakedObjectConfiguration.
 DeploymentType getDeploymentType()
          The application-scoped DeploymentType.
 PersistenceSessionFactory getPersistenceSessionFactory()
          The PersistenceSessionFactory that will be used to create PersistenceSession within the NakedObjectSession.
 java.util.List<java.lang.Object> getServices()
           
 SpecificationLoader getSpecificationLoader()
          The application-scoped SpecificationLoader.
 TemplateImageLoader getTemplateImageLoader()
          The application-scoped TemplateImageLoader.
 UserProfileLoader getUserProfileLoader()
           
 void init()
          Wires components as necessary, and then initializes all.
 NakedObjectSession openSession(AuthenticationSession authenticationSession)
          Creates and opens the NakedObjectSession.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NakedObjectSessionFactoryAbstract

public NakedObjectSessionFactoryAbstract(DeploymentType deploymentType,
                                         NakedObjectConfiguration configuration,
                                         SpecificationLoader specificationLoader,
                                         TemplateImageLoader templateImageLoader,
                                         AuthenticationManager authenticationManager,
                                         AuthorizationManager authorizationManager,
                                         UserProfileLoader userProfileLoader,
                                         PersistenceSessionFactory persistenceSessionFactory,
                                         java.util.List<java.lang.Object> serviceList)
Method Detail

init

public void init()
Wires components as necessary, and then initializes all.

Specified by:
init in interface ApplicationScopedComponent

shutdown

public void shutdown()
Specified by:
shutdown in interface ApplicationScopedComponent

openSession

public NakedObjectSession openSession(AuthenticationSession authenticationSession)
Description copied from interface: NakedObjectSessionFactory
Creates and opens the NakedObjectSession.

Specified by:
openSession in interface NakedObjectSessionFactory

getConfiguration

public NakedObjectConfiguration getConfiguration()
Description copied from interface: NakedObjectSessionFactory
The application-scoped NakedObjectConfiguration.

Specified by:
getConfiguration in interface NakedObjectSessionFactory

getDeploymentType

public DeploymentType getDeploymentType()
Description copied from interface: NakedObjectSessionFactory
The application-scoped DeploymentType.

Specified by:
getDeploymentType in interface NakedObjectSessionFactory

getSpecificationLoader

public SpecificationLoader getSpecificationLoader()
Description copied from interface: NakedObjectSessionFactory
The application-scoped SpecificationLoader.

Specified by:
getSpecificationLoader in interface NakedObjectSessionFactory

getTemplateImageLoader

public TemplateImageLoader getTemplateImageLoader()
Description copied from interface: NakedObjectSessionFactory
The application-scoped TemplateImageLoader.

Specified by:
getTemplateImageLoader in interface NakedObjectSessionFactory

getAuthenticationManager

public AuthenticationManager getAuthenticationManager()
Description copied from interface: NakedObjectSessionFactory
The AuthenticationManager that will be used to authenticate and create AuthenticationSessions within the NakedObjectSession.

Specified by:
getAuthenticationManager in interface NakedObjectSessionFactory

getAuthorizationManager

public AuthorizationManager getAuthorizationManager()
Description copied from interface: NakedObjectSessionFactory
The AuthorizationManager that will be used to authorize access to domain objects.

Specified by:
getAuthorizationManager in interface NakedObjectSessionFactory

getPersistenceSessionFactory

public PersistenceSessionFactory getPersistenceSessionFactory()
Description copied from interface: NakedObjectSessionFactory
The PersistenceSessionFactory that will be used to create PersistenceSession within the NakedObjectSession.

Specified by:
getPersistenceSessionFactory in interface NakedObjectSessionFactory

getUserProfileLoader

public UserProfileLoader getUserProfileLoader()
Specified by:
getUserProfileLoader in interface NakedObjectSessionFactory

getServices

public java.util.List<java.lang.Object> getServices()
Specified by:
getServices in interface NakedObjectSessionFactory


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.