org.nakedobjects.runtime.installers
Class InstallerAbstract

java.lang.Object
  extended by org.nakedobjects.runtime.installers.InstallerAbstract
All Implemented Interfaces:
ApplicationScopedComponent, Component, Installer, ConfigurationBuilderAware
Direct Known Subclasses:
AuthenticationManagerStandardInstallerAbstract, AuthorizationManagerStandardInstallerAbstract, FileBasedHelpDecoratorInstaller, FixturesInstallerAbstract, InMemoryUserProfileStoreInstaller, JavaReflectorInstaller, NakedObjectsViewerInstallerAbstract, PersistenceMechanismInstallerAbstract, ResourceBasedI18nDecoratorInstaller, ServicesFromConfiguration, ServicesInstallerAbstract, TemplateImageLoaderAwtInstaller, TemplateImageLoaderNoopInstaller, TransactionFacetDecoratorInstallerAbstract

public abstract class InstallerAbstract
extends java.lang.Object
implements Installer, ConfigurationBuilderAware


Constructor Summary
InstallerAbstract(java.lang.String type, java.lang.String name)
          Subclasses should pass in the type defined as a constant in the subinterface of Installer.
 
Method Summary
protected  void addConfigurationResources(java.util.List<java.lang.String> configurationResources)
          Optional hook method to allow subclasses to specify any additional config resources.
 NakedObjectConfiguration getConfiguration()
          Returns a snapshot of the current configuration provided by the injected ConfigurationBuilder.
 java.util.List<java.lang.String> getConfigurationResources()
          Returns [type.properties, type_name.properties.
 java.lang.String getName()
           
 java.lang.String getType()
           
 void init()
          Default implementation does nothing.
 void setConfiguration(NakedObjectConfiguration configuration)
          Either this method or setConfigurationBuilder(ConfigurationBuilder) should be called prior to calling getConfiguration().
 void setConfigurationBuilder(ConfigurationBuilder configurationBuilder)
          Either this method or setConfiguration(NakedObjectConfiguration) should be called prior to calling getConfiguration().
 void shutdown()
          Default implementation does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstallerAbstract

public InstallerAbstract(java.lang.String type,
                         java.lang.String name)
Subclasses should pass in the type defined as a constant in the subinterface of Installer.

For example, PersistenceMechanismInstaller has a constant PersistenceMechanismInstaller.TYPE. Any implementation of PersistenceMechanismInstaller should pass this constant value up to this constructor.

Method Detail

getType

public java.lang.String getType()
Specified by:
getType in interface Installer

getName

public java.lang.String getName()
Specified by:
getName in interface Installer

getConfigurationResources

public java.util.List<java.lang.String> getConfigurationResources()
Returns [type.properties, type_name.properties.

For example, [persistor.properties, persistor_in-memory.properties].

Specified by:
getConfigurationResources in interface Installer
See Also:
getType(), getName()

addConfigurationResources

protected void addConfigurationResources(java.util.List<java.lang.String> configurationResources)
Optional hook method to allow subclasses to specify any additional config resources.


init

public void init()
Default implementation does nothing.

Specified by:
init in interface ApplicationScopedComponent

shutdown

public void shutdown()
Default implementation does nothing.

Specified by:
shutdown in interface ApplicationScopedComponent

setConfigurationBuilder

public void setConfigurationBuilder(ConfigurationBuilder configurationBuilder)
Either this method or setConfiguration(NakedObjectConfiguration) should be called prior to calling getConfiguration().

If a configuration has already been provided, then throws IllegalStateException.

Specified by:
setConfigurationBuilder in interface ConfigurationBuilderAware

setConfiguration

public void setConfiguration(NakedObjectConfiguration configuration)
Either this method or setConfigurationBuilder(ConfigurationBuilder) should be called prior to calling getConfiguration().

If a configuration builder has already been provided, then throws IllegalStateException.


getConfiguration

public NakedObjectConfiguration getConfiguration()
Returns a snapshot of the current configuration provided by the injected ConfigurationBuilder.

Implementation note: the implementation is in fact just InstallerLookupDefault.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.