|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.runtime.session.NakedObjectSessionDefault
public class NakedObjectSessionDefault
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.
NakedObjectSessionFactory| Constructor Summary | |
|---|---|
NakedObjectSessionDefault(NakedObjectSessionFactory sessionFactory,
AuthenticationSession authenticationSession,
PersistenceSession persistenceSession,
UserProfile userProfile)
|
|
| Method Summary | |
|---|---|
void |
appendState(ToString asString)
|
void |
close()
Closes session. |
void |
closeAll()
Shuts down all components. |
void |
debug(DebugString debug)
|
void |
debugAll(DebugString debug)
|
void |
debugState(DebugString debug)
|
AuthenticationSession |
getAuthenticationSession()
Returns the security session representing this user for this execution context. |
NakedObjectConfiguration |
getConfiguration()
Convenience method. |
NakedObjectTransaction |
getCurrentTransaction()
Convenience method that returns the NakedObjectTransaction of the session, if any. |
DeploymentType |
getDeploymentType()
Convenience method. |
java.lang.String |
getId()
Returns an descriptive identifier for this NakedObjectSessionDefault. |
PersistenceSession |
getPersistenceSession()
The PersistenceSession within this NakedObjectSession. |
NakedObjectSessionFactory |
getSessionFactory()
The creating factory. |
protected long |
getSessionOpenTime()
|
SpecificationLoader |
getSpecificationLoader()
Convenience method. |
TemplateImageLoader |
getTemplateImageLoader()
Convenience method. |
UserProfile |
getUserProfile()
Returns the adapted Perspective for the user
who is using this NakedObjectSession. |
void |
open()
|
void |
takeSnapshot()
|
void |
testSetObjectPersistor(PersistenceSession objectPersistor)
Should only be called in tests. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NakedObjectSessionDefault(NakedObjectSessionFactory sessionFactory,
AuthenticationSession authenticationSession,
PersistenceSession persistenceSession,
UserProfile userProfile)
| Method Detail |
|---|
public void open()
open in interface SessionScopedComponentpublic void close()
close in interface SessionScopedComponentpublic void closeAll()
closeAll in interface NakedObjectSessionpublic NakedObjectSessionFactory getSessionFactory()
NakedObjectSessionfactory.
Note that from the factory we can get to
the NakedObjectsSystem, and thus other ApplicationScopedComponents.
getSessionFactory in interface NakedObjectSessionpublic DeploymentType getDeploymentType()
public NakedObjectConfiguration getConfiguration()
public SpecificationLoader getSpecificationLoader()
public TemplateImageLoader getTemplateImageLoader()
public AuthenticationSession getAuthenticationSession()
getAuthenticationSession in interface NakedObjectSessionpublic java.lang.String getId()
NakedObjectSessionDefault.
getId in interface NakedObjectSessionpublic PersistenceSession getPersistenceSession()
NakedObjectSessionPersistenceSession within this NakedObjectSession.
Would have been created by the owning factory's
getPersistenceSession in interface NakedObjectSessionpublic UserProfile getUserProfile()
NakedObjectSessionadapted Perspective for the user
who is using this NakedObjectSession.
getUserProfile in interface NakedObjectSessionprotected long getSessionOpenTime()
public NakedObjectTransaction getCurrentTransaction()
NakedObjectTransaction of the session, if any.
getCurrentTransaction in interface NakedObjectSessionpublic void testSetObjectPersistor(PersistenceSession objectPersistor)
public java.lang.String toString()
toString in class java.lang.Objectpublic void debugAll(DebugString debug)
debugAll in interface NakedObjectSessionpublic void debug(DebugString debug)
debug in interface NakedObjectSessionpublic void takeSnapshot()
public void appendState(ToString asString)
public void debugState(DebugString debug)
debugState in interface NakedObjectSession
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||