org.openrdf.elmo.tapestry
Class HiveMindSesameManager

java.lang.Object
  extended by org.openrdf.elmo.sesame.SesameManager
      extended by org.openrdf.elmo.tapestry.HiveMindSesameManager
All Implemented Interfaces:
EntityManager, ThreadCleanupListener, ElmoManager

public class HiveMindSesameManager
extends SesameManager
implements ThreadCleanupListener

Convents the properties used in a HiveMind repository to SesameBeanManager's properties. This class converts repository -> connection, threadLocale -> locale, QueryLanguageName -> QueryLanguage. This class also closesthe connection when the thread is discarded.

Author:
James Leigh

Constructor Summary
HiveMindSesameManager()
           
 
Method Summary
 String getLanguage()
           
 Locale getLocale()
          Locale this manager was created with.
 void init()
           
 boolean isOpen()
          If this manager currently has an open connection to the repository.
 void setQueryLanguageName(String ql)
           
 void setRepository(Repository repository)
           
 void setRoles(Collection<Class<?>> roles)
          Registers all the given roles with their default subject type.
 void setThreadEventNotifier(ThreadEventNotifier threadEventNotifier)
           
 void setThreadLocale(ThreadLocale threadLocale)
           
 void threadDidCleanup()
           
 
Methods inherited from class org.openrdf.elmo.sesame.SesameManager
asQName, clear, close, close, contains, create, create, createMemento, createNamedQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, designate, designate, designate, designate, designate, designateEntity, designateEntity, find, find, find, findAll, flush, getConnection, getDelegate, getFlushMode, getInstance, getLiteralManager, getLocalizedValue, getReference, getResourceManager, getRoleMapper, getTransaction, getValue, joinTransaction, lock, merge, persist, redoMemento, refresh, remove, removeDesignation, removeDesignation, rename, rename, setConnection, setFlushMode, setLiteralManager, setLocale, setResourceManager, setRoleMapper, undoMemento
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiveMindSesameManager

public HiveMindSesameManager()
Method Detail

setRoles

public void setRoles(Collection<Class<?>> roles)
Registers all the given roles with their default subject type.

Parameters:
roles -

setRepository

public void setRepository(Repository repository)
                   throws RepositoryException
Throws:
RepositoryException

setQueryLanguageName

public void setQueryLanguageName(String ql)

setThreadEventNotifier

public void setThreadEventNotifier(ThreadEventNotifier threadEventNotifier)

setThreadLocale

public void setThreadLocale(ThreadLocale threadLocale)

init

public void init()
          throws RepositoryException
Throws:
RepositoryException

threadDidCleanup

public void threadDidCleanup()
Specified by:
threadDidCleanup in interface ThreadCleanupListener

getLocale

public Locale getLocale()
Description copied from interface: ElmoManager
Locale this manager was created with.

Specified by:
getLocale in interface ElmoManager
Overrides:
getLocale in class SesameManager
Returns:
Locale or null

getLanguage

public String getLanguage()
Overrides:
getLanguage in class SesameManager

isOpen

public boolean isOpen()
Description copied from interface: ElmoManager
If this manager currently has an open connection to the repository.

Specified by:
isOpen in interface EntityManager
Specified by:
isOpen in interface ElmoManager
Overrides:
isOpen in class SesameManager
Returns:
true if the connection is open.


Copyright © 2004-2008 Aduna. All Rights Reserved.