Package org.ametys.cms.search.model
Class SystemPropertyExtensionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<SystemProperty>
-
- org.ametys.cms.search.model.SystemPropertyExtensionPoint
-
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<SystemProperty>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class SystemPropertyExtensionPoint extends AbstractThreadSafeComponentExtensionPoint<SystemProperty>
Extension point handlingSystemProperty
objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
_displayProps
Collection of the displayable properties.protected List<String>
_searchProps
Collection of the searchable properties.static String
ROLE
The extension point role.-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description SystemPropertyExtensionPoint()
-
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.protected void
addSystemProperty(String pluginName, String featureName, Configuration configuration)
Declare a new system property.List<String>
getDisplayProperties()
Get the IDs of the properties that can be displayed.List<String>
getSearchProperties()
Get the IDs of the properties that can be searched on.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.boolean
isDisplayable(String name)
Tests if a property exists and is displayable.boolean
isSearchable(String name)
Tests if a property exists and is searchable.-
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
-
_displayProps
protected List<String> _displayProps
Collection of the displayable properties.
-
_searchProps
protected List<String> _searchProps
Collection of the searchable properties.
-
-
Constructor Detail
-
SystemPropertyExtensionPoint
public SystemPropertyExtensionPoint()
-
-
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<SystemProperty>
- Overrides:
addExtension
in classAbstractThreadSafeComponentExtensionPoint<SystemProperty>
- 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
-
addSystemProperty
protected void addSystemProperty(String pluginName, String featureName, Configuration configuration) throws ConfigurationException
Declare a new system property.- Parameters:
pluginName
- The name of the plugin declaring the extensionfeatureName
- The feature name.configuration
- The configuration of the extension- Throws:
ConfigurationException
- if configuration if not complete
-
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<SystemProperty>
- Overrides:
initializeExtensions
in classAbstractThreadSafeComponentExtensionPoint<SystemProperty>
- Throws:
Exception
- if something wrong occurs
-
getDisplayProperties
public List<String> getDisplayProperties()
Get the IDs of the properties that can be displayed.- Returns:
- The Collection of properties that can be displayed.
-
getSearchProperties
public List<String> getSearchProperties()
Get the IDs of the properties that can be searched on.- Returns:
- The Collection of properties that can be searched on.
-
isDisplayable
public boolean isDisplayable(String name)
Tests if a property exists and is displayable.- Parameters:
name
- The property name.- Returns:
true
if the property exists and is displayable.
-
isSearchable
public boolean isSearchable(String name)
Tests if a property exists and is searchable.- Parameters:
name
- The property name.- Returns:
true
if the property exists and is searchable.
-
-