|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.runtime.installers.InstallerAbstract
org.nakedobjects.runtime.persistence.PersistenceMechanismInstallerAbstract
public abstract class PersistenceMechanismInstallerAbstract
An abstract implementation of PersistenceMechanismInstaller that will
lookup the AdapterFactory and ObjectFactory from the supplied
NakedObjectConfiguration.
If none can be found, then will default to the PojoAdapterFactory and
ObjectFactoryBasic respectively.
| Field Summary |
|---|
| Fields inherited from interface org.nakedobjects.runtime.persistence.PersistenceMechanismInstaller |
|---|
TYPE |
| Constructor Summary | |
|---|---|
PersistenceMechanismInstallerAbstract(java.lang.String name)
|
|
PersistenceMechanismInstallerAbstract(java.lang.String type,
java.lang.String name)
For subclasses that need to specify a different type. |
|
| Method Summary | |
|---|---|
protected AdapterFactory |
createAdapterFactory(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementation of AdapterFactory. |
protected AdapterManagerExtended |
createAdapterManager(NakedObjectConfiguration configuration)
Hook method to return AdapterManagerExtended. |
protected DomainObjectContainer |
createContainer(NakedObjectConfiguration configuration)
Hook method to return a DomainObjectContainer. |
protected ObjectFactory |
createObjectFactory(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementation of ObjectFactory. |
protected OidGenerator |
createOidGenerator(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementation of OidGenerator |
PersistenceSession |
createPersistenceSession(PersistenceSessionFactory persistenceSessionFactory)
Creates a PersistenceSession that is initialized with the
various hook methods. |
protected abstract PersistenceSession |
createPersistenceSession(PersistenceSessionFactory persistenceSessionFactory,
AdapterManagerExtended adapterManager,
AdapterFactory adapterFactory,
ObjectFactory objectFactory,
OidGenerator oidGenerator,
ServicesInjector servicesInjector)
Mandatory hook method called by createPersistenceSession(PersistenceSessionFactory),
passing the components created by the other (optional) hooks. |
protected RuntimeContext |
createRuntimeContext(NakedObjectConfiguration configuration)
Hook method to return a RuntimeContext. |
protected ServicesInjector |
createServicesInjector(NakedObjectConfiguration configuration)
Hook method to allow subclasses to specify a different implementation of ServicesInjector |
protected InstallerLookup |
getInstallerLookup()
|
void |
setInstallerLookup(InstallerLookup installerLookup)
By virtue of being InstallerLookupAware. |
| Methods inherited from class org.nakedobjects.runtime.installers.InstallerAbstract |
|---|
addConfigurationResources, getConfiguration, getConfigurationResources, getName, getType, init, setConfiguration, setConfigurationBuilder, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nakedobjects.runtime.persistence.PersistenceMechanismInstaller |
|---|
createPersistenceSessionFactory |
| Methods inherited from interface org.nakedobjects.metamodel.commons.component.Installer |
|---|
getConfigurationResources, getName, getType |
| Methods inherited from interface org.nakedobjects.metamodel.commons.component.ApplicationScopedComponent |
|---|
init, shutdown |
| Constructor Detail |
|---|
public PersistenceMechanismInstallerAbstract(java.lang.String name)
public PersistenceMechanismInstallerAbstract(java.lang.String type,
java.lang.String name)
| Method Detail |
|---|
public PersistenceSession createPersistenceSession(PersistenceSessionFactory persistenceSessionFactory)
PersistenceSession that is initialized with the
various hook methods.
createPersistenceSession in interface PersistenceSessionFactoryDelegatecreatePersistenceSession(PersistenceSessionFactory, AdapterManagerExtended, AdapterFactory, ObjectFactory, OidGenerator, ServicesInjector),
createAdapterFactory(NakedObjectConfiguration),
createAdapterManager(NakedObjectConfiguration),
createContainer(NakedObjectConfiguration),
createOidGenerator(NakedObjectConfiguration),
createRuntimeContext(NakedObjectConfiguration),
createServicesInjector(NakedObjectConfiguration)
protected abstract PersistenceSession createPersistenceSession(PersistenceSessionFactory persistenceSessionFactory,
AdapterManagerExtended adapterManager,
AdapterFactory adapterFactory,
ObjectFactory objectFactory,
OidGenerator oidGenerator,
ServicesInjector servicesInjector)
createPersistenceSession(PersistenceSessionFactory),
passing the components created by the other (optional) hooks.
createPersistenceSession(PersistenceSessionFactory)protected AdapterFactory createAdapterFactory(NakedObjectConfiguration configuration)
AdapterFactory.
By default, looks up implementation from provided
NakedObjectConfiguration using
PersistenceConstants.ADAPTER_FACTORY_CLASS_NAME. If no
implementation is specified, then defaults to
.
protected ObjectFactory createObjectFactory(NakedObjectConfiguration configuration)
ObjectFactory.
By default, looks up implementation from provided
NakedObjectConfiguration using
PersistenceConstants.OBJECT_FACTORY_CLASS_NAME. If no
implementation is specified, then defaults to
.
protected ServicesInjector createServicesInjector(NakedObjectConfiguration configuration)
ServicesInjector
By default, looks up implementation from provided
NakedObjectConfiguration using
PersistenceConstants.SERVICES_INJECTOR_CLASS_NAME. If no
implementation is specified, then defaults to
.
protected OidGenerator createOidGenerator(NakedObjectConfiguration configuration)
OidGenerator
By default, looks up implementation from provided
NakedObjectConfiguration using
PersistenceConstants.OID_GENERATOR_CLASS_NAME. If no
implementation is specified, then defaults to
.
protected AdapterManagerExtended createAdapterManager(NakedObjectConfiguration configuration)
AdapterManagerExtended.
By default returns an AdapterManagerDefault.
protected RuntimeContext createRuntimeContext(NakedObjectConfiguration configuration)
RuntimeContext.
By default, returns a RuntimeContextFromSession.
protected DomainObjectContainer createContainer(NakedObjectConfiguration configuration)
DomainObjectContainer.
By default, looks up implementation from provided
NakedObjectConfiguration using
PersistenceConstants.DOMAIN_OBJECT_CONTAINER_CLASS_NAME. If no
implementation is specified, then defaults to
.
public void setInstallerLookup(InstallerLookup installerLookup)
InstallerLookupAware.
setInstallerLookup in interface InstallerLookupAwareprotected InstallerLookup getInstallerLookup()
setInstallerLookup(InstallerLookup)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||