org.nakedobjects.runtime.session
Interface NakedObjectSession

All Superinterfaces:
Component, SessionScopedComponent
All Known Implementing Classes:
NakedObjectSessionDefault

public interface NakedObjectSession
extends SessionScopedComponent

Analogous to a Hibernate Session, holds the current set of components for a specific execution context (such as on a thread).

The NakedObjectsContext class (in nof-core) is responsible for locating the current execution context.

See Also:
NakedObjectSessionFactory

Method Summary
 void closeAll()
          Normal lifecycle is managed using callbacks in SessionScopedComponent.
 void debug(DebugString debug)
           
 void debugAll(DebugString debug)
           
 void debugState(DebugString debug)
           
 AuthenticationSession getAuthenticationSession()
          Returns the AuthenticationSession representing this user for this NakedObjectSession.
 NakedObjectTransaction getCurrentTransaction()
           
 java.lang.String getId()
          A descriptive identifier for this NakedObjectSession.
 PersistenceSession getPersistenceSession()
          The PersistenceSession within this NakedObjectSession.
 NakedObjectSessionFactory getSessionFactory()
          The creating factory.
 UserProfile getUserProfile()
          Returns the adapted Perspective for the user who is using this NakedObjectSession.
 
Methods inherited from interface org.nakedobjects.metamodel.commons.component.SessionScopedComponent
close, open
 

Method Detail

getSessionFactory

NakedObjectSessionFactory getSessionFactory()
The creating factory.

Note that from the factory we can get to the NakedObjectsSystem, and thus other ApplicationScopedComponents.


closeAll

void closeAll()
Normal lifecycle is managed using callbacks in SessionScopedComponent. This method is to allow the outer ApplicationScopedComponents to shutdown, closing any and all running NakedObjectSessions.


getId

java.lang.String getId()
A descriptive identifier for this NakedObjectSession.


getAuthenticationSession

AuthenticationSession getAuthenticationSession()
Returns the AuthenticationSession representing this user for this NakedObjectSession.


getPersistenceSession

PersistenceSession getPersistenceSession()
The PersistenceSession within this NakedObjectSession.

Would have been created by the owning factory's


getUserProfile

UserProfile getUserProfile()
Returns the adapted Perspective for the user who is using this NakedObjectSession.


getCurrentTransaction

NakedObjectTransaction getCurrentTransaction()

debugAll

void debugAll(DebugString debug)

debug

void debug(DebugString debug)

debugState

void debugState(DebugString debug)


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