T
- The client side element implementationpublic abstract class AbstractClientSideExtensionPoint<T extends ClientSideElement> extends AbstractThreadSafeComponentExtensionPoint<T>
Modifier and Type | Class and Description |
---|---|
private class |
AbstractClientSideExtensionPoint.ReferencingExtension |
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
_configurationPlugins |
private Map<String,Configuration> |
_configurations |
private boolean |
_initialized |
private List<AbstractClientSideExtensionPoint.ReferencingExtension> |
_referencingExtensions |
private List<AbstractClientSideExtensionPoint<T>> |
_registeredManagers |
_cocoonManager, _context, _manager
Constructor and Description |
---|
AbstractClientSideExtensionPoint() |
Modifier and Type | Method and Description |
---|---|
private void |
_addReferencingExtension(String id,
String pluginName,
String featureName,
Configuration configuration) |
private void |
_contexutalizeConfiguration(MutableConfiguration configuration,
String pluginName) |
private Configuration |
_getConfiguration(String id) |
private Configuration |
_getContexutalizedConfiguration(Configuration configuration,
String pluginName) |
private void |
_getMerdedChildsConfiguration(Configuration configuration,
MutableConfiguration base) |
private void |
_lazyInitializeReferencingExtension(AbstractClientSideExtensionPoint.ReferencingExtension ext,
Map<String,AbstractClientSideExtensionPoint.ReferencingExtension> refExtIds,
List<String> processing) |
private void |
_mergeChildsConfiguration(Configuration configuration,
MutableConfiguration base) |
void |
addExtension(String id,
String pluginName,
String featureName,
Configuration configuration)
Add an extension to this point.
|
List<ClientSideElement> |
findDependency(String pattern)
Find a dependency of this manager from the Client side elements it knows.
|
T |
getExtension(String id)
Returns the named extension
|
Set<String> |
getExtensionsIds()
Returns a Set containing the ids of all known extensions
|
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. |
void |
registerRibbonManager(AbstractClientSideExtensionPoint<T> manager)
Register a new ribbon manager whose extensions will also be managed by this RibbonControlsManager
|
void |
unregisterRibbonManager(AbstractClientSideExtensionPoint<T> manager)
Remove a previously registered ribbon manager
|
addComponent, contextualize, dispose, hasExtension, initialize, service
getLogger, setLogger
private Map<String,Configuration> _configurations
private Map<String,String> _configurationPlugins
private List<AbstractClientSideExtensionPoint<T extends ClientSideElement>> _registeredManagers
private List<AbstractClientSideExtensionPoint.ReferencingExtension> _referencingExtensions
private boolean _initialized
public AbstractClientSideExtensionPoint()
public void addExtension(String id, String pluginName, String featureName, Configuration configuration) throws ConfigurationException
ExtensionPoint
addExtension
in interface ExtensionPoint<T extends ClientSideElement>
addExtension
in class AbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
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 occursprivate void _addReferencingExtension(String id, String pluginName, String featureName, Configuration configuration) throws ConfigurationException
ConfigurationException
private Configuration _getConfiguration(String id) throws ConfigurationException
ConfigurationException
private Configuration _getContexutalizedConfiguration(Configuration configuration, String pluginName) throws ConfigurationException
ConfigurationException
private void _contexutalizeConfiguration(MutableConfiguration configuration, String pluginName) throws ConfigurationException
ConfigurationException
private void _getMerdedChildsConfiguration(Configuration configuration, MutableConfiguration base) throws ConfigurationException
ConfigurationException
private void _mergeChildsConfiguration(Configuration configuration, MutableConfiguration base) throws ConfigurationException
ConfigurationException
public void initializeExtensions() throws Exception
ExtensionPoint
addExtension()
calls.initializeExtensions
in interface ExtensionPoint<T extends ClientSideElement>
initializeExtensions
in class AbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
Exception
- if something wrong occursprivate void _lazyInitializeReferencingExtension(AbstractClientSideExtensionPoint.ReferencingExtension ext, Map<String,AbstractClientSideExtensionPoint.ReferencingExtension> refExtIds, List<String> processing) throws ConfigurationException
ConfigurationException
public void registerRibbonManager(AbstractClientSideExtensionPoint<T> manager)
manager
- The manager to registerpublic void unregisterRibbonManager(AbstractClientSideExtensionPoint<T> manager)
manager
- The manager to removepublic T getExtension(String id)
ExtensionPoint
getExtension
in interface ExtensionPoint<T extends ClientSideElement>
getExtension
in class AbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
id
- the unique id of the extensionpublic Set<String> getExtensionsIds()
ExtensionPoint
getExtensionsIds
in interface ExtensionPoint<T extends ClientSideElement>
getExtensionsIds
in class AbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
public List<ClientSideElement> findDependency(String pattern)
pattern
- The matching pattern to find the dependency.