Package org.ametys.plugins.repository
Class AmetysObjectFactoryExtensionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<AmetysObjectFactory>
-
- org.ametys.plugins.repository.AmetysObjectFactoryExtensionPoint
-
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<AmetysObjectFactory>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class AmetysObjectFactoryExtensionPoint extends AbstractThreadSafeComponentExtensionPoint<AmetysObjectFactory>
ExtensionPoint
hosting allAmetysObjectFactory
.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Set<String>>
_nodetypeDefinitions
private Map<String,AmetysObjectFactory>
_nodetypes
private Map<String,AmetysObjectFactory>
_schemes
static String
ROLE
Avalon Role-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description AmetysObjectFactoryExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExtension(String id, String pluginName, String pluginId, Configuration configuration)
Add an extension to this point.AmetysObjectFactory
getFactoryForNodetype(String nodetype)
Returns theAmetysObjectFactory
corresponding to the given nodetype.AmetysObjectFactory
getFactoryForScheme(String scheme)
Returns theAmetysObjectFactory
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 alladdExtension()
calls.
This is the last step before the actual startup of the application.-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_schemes
private Map<String,AmetysObjectFactory> _schemes
-
_nodetypes
private Map<String,AmetysObjectFactory> _nodetypes
-
_nodetypeDefinitions
private Map<String,Set<String>> _nodetypeDefinitions
-
-
Constructor Detail
-
AmetysObjectFactoryExtensionPoint
public AmetysObjectFactoryExtensionPoint()
-
-
Method Detail
-
initializeExtensions
public void initializeExtensions() throws Exception
Description copied from interface:ExtensionPoint
Finalize the initialization of the extensions.
This method is called after alladdExtension()
calls.
This is the last step before the actual startup of the application.- Specified by:
initializeExtensions
in interfaceExtensionPoint<AmetysObjectFactory>
- Overrides:
initializeExtensions
in classAbstractThreadSafeComponentExtensionPoint<AmetysObjectFactory>
- Throws:
Exception
- if something wrong occurs
-
addExtension
public void addExtension(String id, String pluginName, String pluginId, Configuration configuration) throws ConfigurationException
Description copied from interface:ExtensionPoint
Add an extension to this point. Each implementation knows the meaning of the given configuration.- Specified by:
addExtension
in interfaceExtensionPoint<AmetysObjectFactory>
- Overrides:
addExtension
in classAbstractThreadSafeComponentExtensionPoint<AmetysObjectFactory>
- Parameters:
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 added- Throws:
ConfigurationException
- when a configuration problem occurs
-
getNodeTypeDefinitions
public Map<String,Set<String>> getNodeTypeDefinitions()
Returns the declared nodetypes definitions.- Returns:
- the declared nodetypes definitions.
-
getFactoryForScheme
public AmetysObjectFactory getFactoryForScheme(String scheme)
Returns theAmetysObjectFactory
corresponding to the given scheme.- Parameters:
scheme
- the scheme.- Returns:
- the
AmetysObjectFactory
ornull
if not found.
-
getFactoryForNodetype
public AmetysObjectFactory getFactoryForNodetype(String nodetype)
Returns theAmetysObjectFactory
corresponding to the given nodetype.- Parameters:
nodetype
- the nodetype.- Returns:
- the
AmetysObjectFactory
ornull
if not found.
-
-