public class AmetysObjectFactoryExtensionPoint extends AbstractThreadSafeComponentExtensionPoint<AmetysObjectFactory>
ExtensionPoint
hosting all AmetysObjectFactory
.Modifier and Type | Field and Description |
---|---|
private Map<String,Set<String>> |
_nodetypeDefinitions |
private Map<String,AmetysObjectFactory> |
_nodetypes |
private Map<String,AmetysObjectFactory> |
_schemes |
static String |
ROLE
Avalon Role
|
_cocoonManager, _context, _manager
Constructor and Description |
---|
AmetysObjectFactoryExtensionPoint() |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(String id,
String pluginName,
String pluginId,
Configuration configuration)
Add an extension to this point.
|
AmetysObjectFactory |
getFactoryForNodetype(String nodetype)
Returns the
AmetysObjectFactory corresponding to the given nodetype. |
AmetysObjectFactory |
getFactoryForScheme(String scheme)
Returns the
AmetysObjectFactory corresponding to the given scheme. |
Map<String,Set<String>> |
getNodeTypeDefinitions()
Returns the declared nodetypes definitions.
|
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. |
addComponent, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize, service
getLogger, setLogger
private Map<String,AmetysObjectFactory> _schemes
private Map<String,AmetysObjectFactory> _nodetypes
private Map<String,Set<String>> _nodetypeDefinitions
public AmetysObjectFactoryExtensionPoint()
public void initializeExtensions() throws Exception
ExtensionPoint
addExtension()
calls.initializeExtensions
in interface ExtensionPoint<AmetysObjectFactory>
initializeExtensions
in class AbstractThreadSafeComponentExtensionPoint<AmetysObjectFactory>
Exception
- if something wrong occurspublic void addExtension(String id, String pluginName, String pluginId, Configuration configuration) throws ConfigurationException
ExtensionPoint
addExtension
in interface ExtensionPoint<AmetysObjectFactory>
addExtension
in class AbstractThreadSafeComponentExtensionPoint<AmetysObjectFactory>
id
- the unique identifier of the extension.pluginName
- Unique identifier for the plugin hosting the extensionpluginId
- Unique feature identifier (unique for a given pluginName)configuration
- the information about the extension to be addedConfigurationException
- when a configuration problem occurspublic Map<String,Set<String>> getNodeTypeDefinitions()
public AmetysObjectFactory getFactoryForScheme(String scheme)
AmetysObjectFactory
corresponding to the given scheme.scheme
- the scheme.AmetysObjectFactory
or null
if not found.public AmetysObjectFactory getFactoryForNodetype(String nodetype)
AmetysObjectFactory
corresponding to the given nodetype.nodetype
- the nodetype.AmetysObjectFactory
or null
if not found.