public abstract class InstallerAbstract extends Object implements Installer, IsisConfigurationBuilderAware, IsisConfigurationAware
| Constructor and Description |
|---|
InstallerAbstract(String type,
String name)
Subclasses should pass in the type defined as a constant in the
subinterface of Installer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConfigurationResources(List<String> configurationResources)
Optional hook method to allow subclasses to specify any additional config
resources.
|
IsisConfiguration |
getConfiguration()
Returns a snapshot of the current configuration provided by the
injected
IsisConfigurationBuilder. |
List<String> |
getConfigurationResources()
Returns [type.properties, type_name.properties.
|
String |
getName()
The name (qualified by type).
|
String |
getType()
The type of the installer, meaning the component type, and consistent
with the long option of the command line flag where applicable.
|
void |
init()
Default implementation does nothing.
|
protected static List<Class<?>> |
listOf(Class<?>... classes)
Helper for subclasses implementing
Installer.getTypes(). |
protected static List<Class<?>> |
listOf(List<Class<?>> classList,
Class<?>... classes)
Helper for subclasses implementing
Installer.getTypes(). |
void |
setConfiguration(IsisConfiguration configuration)
Either this method or
setConfigurationBuilder(IsisConfigurationBuilder) should be
called prior to calling getConfiguration(). |
void |
setConfigurationBuilder(IsisConfigurationBuilder isisConfigurationBuilder)
Either this method or
setConfiguration(IsisConfiguration) should
be called prior to calling getConfiguration(). |
void |
shutdown()
Default implementation does nothing.
|
public InstallerAbstract(String type, String name)
For example, PersistenceMechanismInstaller has a constant PersistenceMechanismInstaller#TYPE. Any implementation of PersistenceMechanismInstaller should pass this constant value up to this constructor.
public String getType()
InstallerExamples are authentication or persistor.
Because all implementations of a given subinterface of Installer
should return the same value for this method, by convention these
subinterfaces define a constant which the implementation can just return.
Used, with Installer.getName(), to determine the config files and config
keys for this installer.
getType in interface InstallerInstaller.getConfigurationResources()public String getName()
Installer
Used, with Installer.getType(), to determine the config files and config
keys for this installer.
getName in interface InstallerInstaller.getConfigurationResources()public List<String> getConfigurationResources()
For example, [persistor.properties, persistor_in-memory.properties].
getConfigurationResources in interface InstallergetType(),
getName()protected void addConfigurationResources(List<String> configurationResources)
public void init()
init in interface ApplicationScopedComponentpublic void shutdown()
shutdown in interface ApplicationScopedComponentpublic void setConfigurationBuilder(IsisConfigurationBuilder isisConfigurationBuilder)
setConfiguration(IsisConfiguration) should
be called prior to calling getConfiguration().
If a configuration has
already been provided, then throws IllegalStateException.
setConfigurationBuilder in interface IsisConfigurationBuilderAwarepublic void setConfiguration(IsisConfiguration configuration)
setConfigurationBuilder(IsisConfigurationBuilder) should be
called prior to calling getConfiguration().
If a configuration builder has already been provided, then throws
IllegalStateException.
setConfiguration in interface IsisConfigurationAwarepublic IsisConfiguration getConfiguration()
injected
IsisConfigurationBuilder.
Implementation note: the implementation is in fact just
InstallerLookupDefault.
protected static List<Class<?>> listOf(Class<?>... classes)
Installer.getTypes().Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.