org.nees.metadata.service.ogsi.client
Class NMDSOGSISessionFactory

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.ogsi.client.NMDSOGSISessionFactory

public class NMDSOGSISessionFactory
extends NMDSSessionFactory

This class is used for testing purposes only. It allows you to create an NMDSSession linked directly to a Mysql implementation and a pseudo-CAS Mysql implementation. The user's identity can be passed in or just asserted.


Constructor Summary
NMDSOGSISessionFactory(AuthenticIdentity id, java.lang.String factoryServiceHandle)
          Create and configure a factory.
NMDSOGSISessionFactory(AuthenticIdentity id, java.lang.String factoryServiceHandle, java.lang.String jdbcUrl, java.lang.String jdbcUser, java.lang.String jdbcPassword, java.lang.String baseTableName)
          Deprecated. use the constructors w/o JDBC parameters
NMDSOGSISessionFactory(java.lang.String factoryServiceHandle)
          Create and configure a factory.
NMDSOGSISessionFactory(java.lang.String factoryServiceHandle, java.lang.String jdbcUrl, java.lang.String jdbcUser, java.lang.String jdbcPassword, java.lang.String baseTableName)
          Deprecated. use the constructors w/o JDBC parameters
 
Method Summary
 CASAdminAdapter getCASAdminAdapter()
          Deprecated. use the CASA client
 CASPullAdapter getCASPullAdapter()
          Deprecated. use the CASA client
 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

NMDSOGSISessionFactory

public NMDSOGSISessionFactory(AuthenticIdentity id,
                              java.lang.String factoryServiceHandle,
                              java.lang.String jdbcUrl,
                              java.lang.String jdbcUser,
                              java.lang.String jdbcPassword,
                              java.lang.String baseTableName)
Deprecated. use the constructors w/o JDBC parameters

Create and configure a factory.

Parameters:
id - the user id
factoryServiceHandle - the GSH of the OGSI NMDSFactoryService
jdbcUrl - the JDBC URL to the Mysql database where your NMDS tables are stored.
jdbcUser - a JDBC user with permission to write to those tables
jdbcPassword - that user's password
baseTableName - the base table name (i.e. if your nmds tables are named "foo_XXX" the base table name is "foo"

NMDSOGSISessionFactory

public NMDSOGSISessionFactory(java.lang.String factoryServiceHandle,
                              java.lang.String jdbcUrl,
                              java.lang.String jdbcUser,
                              java.lang.String jdbcPassword,
                              java.lang.String baseTableName)
Deprecated. use the constructors w/o JDBC parameters

Create and configure a factory.

Parameters:
factoryServiceHandle - the GSH of the OGSI NMDSFactoryService
jdbcUrl - the JDBC URL to the Mysql database where your NMDS tables are stored.
jdbcUser - a JDBC user with permission to write to those tables
jdbcPassword - that user's password
baseTableName - the base table name (i.e. if your nmds tables are named "foo_XXX" the base table name is "foo"

NMDSOGSISessionFactory

public NMDSOGSISessionFactory(AuthenticIdentity id,
                              java.lang.String factoryServiceHandle)
Create and configure a factory.

Parameters:
id - the user id
factoryServiceHandle - the GSH of the OGSI NMDSFactoryService

NMDSOGSISessionFactory

public NMDSOGSISessionFactory(java.lang.String factoryServiceHandle)
Create and configure a factory.

Parameters:
factoryServiceHandle - the GSH of the OGSI NMDSFactoryService
Method Detail

newSession

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

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

getCASPullAdapter

public CASPullAdapter getCASPullAdapter()
Deprecated. use the CASA client

In case you need to muck with CAS, this will get you the CAS pull adapter.


getCASAdminAdapter

public CASAdminAdapter getCASAdminAdapter()
Deprecated. use the CASA client

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