Package org.ametys.core.ui
Class AbstractClientSideExtensionPoint<T extends ClientSideElement>
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<T>
-
- org.ametys.core.ui.AbstractClientSideExtensionPoint<T>
-
- Type Parameters:
T
- The client side element implementation
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<T>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
- Direct Known Subclasses:
AdminSkinActionExtensionPoint
,CreateSkinActionExtensionPoint
,HTMLExpertToolbarExtensionPoint
,ImportModelActionExtensionPoint
,ImportSkinActionExtensionPoint
,MenuSkinActionExtensionPoint
,MessageTargetFactoriesManager
,RelationsManager
,RepositoryViewExtensionPoint
,RibbonControlsManager
,RibbonManager
,RibbonTabsManager
,RightAssignmentContextExtensionPoint
,StaticFileImportsManager
,UIToolsFactoriesManager
public abstract class AbstractClientSideExtensionPoint<T extends ClientSideElement> extends AbstractThreadSafeComponentExtensionPoint<T>
Implementation of an ExtensionPoint for client side elements.
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description AbstractClientSideExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 extensionSet<String>
getExtensionsIds()
Returns a Set containing the ids of all known extensionsvoid
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.void
registerRibbonManager(AbstractClientSideExtensionPoint<T> manager)
Register a new ribbon manager whose extensions will also be managed by this RibbonControlsManagervoid
unregisterRibbonManager(AbstractClientSideExtensionPoint<T> manager)
Remove a previously registered ribbon manager-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, contextualize, dispose, hasExtension, initialize, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
AbstractClientSideExtensionPoint
public AbstractClientSideExtensionPoint()
-
-
Method Detail
-
addExtension
public void addExtension(String id, String pluginName, String featureName, 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<T extends ClientSideElement>
- Overrides:
addExtension
in classAbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
- Parameters:
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 added- Throws:
ConfigurationException
- when a configuration problem occurs
-
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<T extends ClientSideElement>
- Overrides:
initializeExtensions
in classAbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
- Throws:
Exception
- if something wrong occurs
-
registerRibbonManager
public void registerRibbonManager(AbstractClientSideExtensionPoint<T> manager)
Register a new ribbon manager whose extensions will also be managed by this RibbonControlsManager- Parameters:
manager
- The manager to register
-
unregisterRibbonManager
public void unregisterRibbonManager(AbstractClientSideExtensionPoint<T> manager)
Remove a previously registered ribbon manager- Parameters:
manager
- The manager to remove
-
getExtension
public T getExtension(String id)
Description copied from interface:ExtensionPoint
Returns the named extension- Specified by:
getExtension
in interfaceExtensionPoint<T extends ClientSideElement>
- Overrides:
getExtension
in classAbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
- Parameters:
id
- the unique id of the extension- Returns:
- the named extension
-
getExtensionsIds
public Set<String> getExtensionsIds()
Description copied from interface:ExtensionPoint
Returns a Set containing the ids of all known extensions- Specified by:
getExtensionsIds
in interfaceExtensionPoint<T extends ClientSideElement>
- Overrides:
getExtensionsIds
in classAbstractThreadSafeComponentExtensionPoint<T extends ClientSideElement>
- Returns:
- a Set containing the ids of all known extensions
-
findDependency
public List<ClientSideElement> findDependency(String pattern)
Find a dependency of this manager from the Client side elements it knows.- Parameters:
pattern
- The matching pattern to find the dependency.- Returns:
- The dependency, or null if no Client side element matched.
-
-