public class SitemapConfigurationExtensionPoint extends AbstractLogEnabled implements ExtensionPoint<Configuration[]>, Component
Modifier and Type | Field and Description |
---|---|
private static Collection<String> |
__COMPONENTS |
private Map<String,Configuration[]> |
_extensions |
private Map<String,Collection<Configuration>> |
_sitemapConfigurations |
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
SitemapConfigurationExtensionPoint() |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(String id,
String pluginName,
String featureName,
Configuration configuration)
Add an extension to this point.
|
Collection<Configuration> |
getConfigurations(String component)
Returns all the Configurations for a given sitemap component type
|
Configuration[] |
getExtension(String id)
Returns the named extension
|
Set<String> |
getExtensionsIds()
Returns a Set containing the ids of all known extensions
|
boolean |
hasExtension(String id)
Returns true if the named extension exists
|
void |
initializeExtensions()
Finalize the initialization of the extensions.
This method is called after all addExtension() calls.This is the last step before the actual startup of the application. |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private static final Collection<String> __COMPONENTS
private Map<String,Collection<Configuration>> _sitemapConfigurations
private Map<String,Configuration[]> _extensions
public SitemapConfigurationExtensionPoint()
public void addExtension(String id, String pluginName, String featureName, Configuration configuration) throws ConfigurationException
ExtensionPoint
addExtension
in interface ExtensionPoint<Configuration[]>
id
- the unique identifier of the extension.pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)configuration
- the information about the extension to be addedConfigurationException
- when a configuration problem occurspublic Configuration[] getExtension(String id)
ExtensionPoint
getExtension
in interface ExtensionPoint<Configuration[]>
id
- the unique id of the extensionpublic Set<String> getExtensionsIds()
ExtensionPoint
getExtensionsIds
in interface ExtensionPoint<Configuration[]>
public boolean hasExtension(String id)
ExtensionPoint
hasExtension
in interface ExtensionPoint<Configuration[]>
id
- the unique id of the extensionpublic void initializeExtensions() throws Exception
ExtensionPoint
addExtension()
calls.initializeExtensions
in interface ExtensionPoint<Configuration[]>
Exception
- if something wrong occurspublic Collection<Configuration> getConfigurations(String component)
component
- a sitemap component type (eg. "action", "generator", ...)