org.nees.metadata.service.store
Class AbstractNMDSStoreSessionFactory

java.lang.Object
  extended byorg.nees.util.sessions.SessionFactory
      extended byorg.nees.util.sessions.AuthenticatedSessionFactory
          extended byorg.nees.metadata.service.NMDSSessionFactory
              extended byorg.nees.metadata.service.store.AbstractNMDSStoreSessionFactory
Direct Known Subclasses:
NMDSStoreSessionFactory, PretendNMDSSessionFactory

public abstract class AbstractNMDSStoreSessionFactory
extends NMDSSessionFactory

Creates a functional NMDSStoreSession.


Constructor Summary
AbstractNMDSStoreSessionFactory()
          Create and configure a factory.
AbstractNMDSStoreSessionFactory(AuthenticIdentity id)
          Create and configure a factory.
 
Method Summary
protected abstract  CASAdapter getCASAdapter()
          Implement this to get a CAS adapter for the session
 CASAdminAdapter getCASAdminAdapter()
          In case you need to modify group membership, this will get you the CAS admin adapter.
 CASPullAdapter getCASPullAdapter()
          In case you need to muck with CAS, this will get you the CAS pull adapter.
abstract  Session newSession()
          Get a session for the given user's identity
 void releaseSession(Session s)
          Optional.
 
Methods inherited from class org.nees.util.sessions.AuthenticatedSessionFactory
getIdentity, newSession, setIdentity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNMDSStoreSessionFactory

public AbstractNMDSStoreSessionFactory(AuthenticIdentity id)
Create and configure a factory.

Parameters:
id - the user id

AbstractNMDSStoreSessionFactory

public AbstractNMDSStoreSessionFactory()
Create and configure a factory.

Method Detail

newSession

public abstract Session newSession()
                            throws SessionCreationException
Get a session for the given user's identity

Specified by:
newSession in class SessionFactory
Returns:
an NMDSStoreSession
Throws:
SessionCreationException

getCASAdapter

protected abstract CASAdapter getCASAdapter()
Implement this to get a CAS adapter for the session


getCASPullAdapter

public CASPullAdapter getCASPullAdapter()
In case you need to muck with CAS, this will get you the CAS pull adapter.


getCASAdminAdapter

public CASAdminAdapter getCASAdminAdapter()
In case you need to modify group membership, this will get you the CAS admin adapter. Note that any group membership changes require that you close and re-open the session.


releaseSession

public void releaseSession(Session s)
Description copied from class: SessionFactory
Optional. Release resources associated with a session. The default implementation does nothing.

Overrides:
releaseSession in class SessionFactory
Parameters:
s - the session to release