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 handlingSystemPropertyobjects.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>_displayPropsCollection of the displayable properties.protected List<String>_searchPropsCollection of the searchable properties.static StringROLEThe 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 voidaddExtension(String id, String pluginName, String featureName, Configuration configuration)Add an extension to this point.protected voidaddSystemProperty(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.voidinitializeExtensions()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.booleanisDisplayable(String name)Tests if a property exists and is displayable.booleanisSearchable(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:ExtensionPointAdd an extension to this point. Each implementation knows the meaning of the given configuration.- Specified by:
addExtensionin interfaceExtensionPoint<SystemProperty>- Overrides:
addExtensionin 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:ExtensionPointFinalize 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:
initializeExtensionsin interfaceExtensionPoint<SystemProperty>- Overrides:
initializeExtensionsin 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:
trueif 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:
trueif the property exists and is searchable.
-
-