public class LegacyComponentsConfigurer extends Object implements ComponentConfigurer
ComponentFactory
which is used to
instantiate the desired implementation, or the path to a node in the repository (in the form of
repository:/path/to/node
or /path/to/node
, which defaults to the config
repository). In the latter case, the component is constructed via
ObservedComponentFactory
and reflects (through observation) the contents of the
given path.
This behaviour exists for backwards compatibility reasons, prefer configuring your components in a module
descriptor instead, inside a components tag.
In order to remain backwards compatible implementations are added both as type mappings and as components and then
always scoped as lazy singletons.Modifier and Type | Field and Description |
---|---|
protected static String[] |
EXCLUDED_BY_DEFAULT |
static String |
EXCLUDED_KEYS_PROPERTY |
Constructor and Description |
---|
LegacyComponentsConfigurer() |
Modifier and Type | Method and Description |
---|---|
protected <T> void |
addComponent(ComponentProviderConfiguration componentProviderConfiguration,
String key,
String value) |
protected Class<?> |
classForName(String value) |
void |
doWithConfiguration(ComponentProvider parentComponentProvider,
ComponentProviderConfiguration configuration) |
protected <T> ProviderConfiguration<T> |
getComponentFactory(Class<T> type,
Class<? extends ComponentFactory<T>> factoryClass) |
protected <T> ImplementationConfiguration |
getImplementation(Class<T> type,
Class<? extends T> implementation) |
protected <T> ConfiguredComponentConfiguration<T> |
getObserved(Class<T> type,
String workspaceAndPath) |
public static final String EXCLUDED_KEYS_PROPERTY
protected static final String[] EXCLUDED_BY_DEFAULT
public void doWithConfiguration(ComponentProvider parentComponentProvider, ComponentProviderConfiguration configuration)
doWithConfiguration
in interface ComponentConfigurer
protected <T> void addComponent(ComponentProviderConfiguration componentProviderConfiguration, String key, String value)
protected <T> ImplementationConfiguration getImplementation(Class<T> type, Class<? extends T> implementation)
protected <T> ProviderConfiguration<T> getComponentFactory(Class<T> type, Class<? extends ComponentFactory<T>> factoryClass)
protected <T> ConfiguredComponentConfiguration<T> getObserved(Class<T> type, String workspaceAndPath)
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.