Package org.ametys.web.site
Class SiteConfigurationExtensionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
-
- org.ametys.web.site.SiteConfigurationExtensionPoint
-
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<SiteParameterWrapper>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class SiteConfigurationExtensionPoint extends AbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
Extension point holding allSiteParameterWrapper
definitions.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ROLE
Avalon Role-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description SiteConfigurationExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_addParameter(String pluginName, String featureName, Configuration configuration)
Declare a site parameter.void
addExtension(String id, String pluginName, String featureName, Configuration configuration)
Add an extension to this point.void
dispose()
Dispose the manager before restarting itSiteParameterWrapper
getExtension(String id)
Returns the named extensionSet<String>
getExtensionsIds()
Returns a Set containing the ids of all known extensionsboolean
hasExtension(String id)
Returns true if the named extension existsvoid
initialize()
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.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, contextualize
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
SiteConfigurationExtensionPoint
public SiteConfigurationExtensionPoint()
-
-
Method Detail
-
initialize
public void initialize() throws Exception
- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
- Throws:
Exception
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
- Throws:
ServiceException
-
dispose
public void dispose()
Dispose the manager before restarting it- Specified by:
dispose
in interfaceDisposable
- Overrides:
dispose
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
-
hasExtension
public boolean hasExtension(String id)
Description copied from interface:ExtensionPoint
Returns true if the named extension exists- Specified by:
hasExtension
in interfaceExtensionPoint<SiteParameterWrapper>
- Overrides:
hasExtension
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
- Parameters:
id
- the unique id of the extension- Returns:
- true if the named extension exists
-
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<SiteParameterWrapper>
- Overrides:
addExtension
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
- 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
-
_addParameter
protected void _addParameter(String pluginName, String featureName, Configuration configuration) throws ConfigurationException
Declare a site parameter.- Parameters:
pluginName
- The name of the plugin declaring the extension.featureName
- the name of the featureconfiguration
- The parameter configuration.- Throws:
ConfigurationException
- if configuration is not complete.
-
getExtension
public SiteParameterWrapper getExtension(String id)
Description copied from interface:ExtensionPoint
Returns the named extension- Specified by:
getExtension
in interfaceExtensionPoint<SiteParameterWrapper>
- Overrides:
getExtension
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
- 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<SiteParameterWrapper>
- Overrides:
getExtensionsIds
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
- Returns:
- a Set containing the ids of all known extensions
-
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<SiteParameterWrapper>
- Overrides:
initializeExtensions
in classAbstractThreadSafeComponentExtensionPoint<SiteParameterWrapper>
- Throws:
Exception
- if something wrong occurs
-
-