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 handling
SystemProperty
objects.-
Field Summary
Modifier and TypeFieldDescriptionprotected ModelItemTypeExtensionPoint
Content properties types extension pointCollection of the displayable properties.Collection of the searchable properties.static final String
The extension point role.Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Get the IDs of the properties that can be displayed.Get the IDs of the properties that can be searched on.void
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.void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The extension point role. -
_contentPropertyTypeExtensionPoint
Content properties types extension point -
_displayProps
Collection of the displayable properties. -
_searchProps
Collection of the searchable properties.
-
-
Constructor Details
-
SystemPropertyExtensionPoint
public SystemPropertyExtensionPoint()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractThreadSafeComponentExtensionPoint<SystemProperty>
- Throws:
ServiceException
-
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
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
Get the IDs of the properties that can be displayed.- Returns:
- The Collection of properties that can be displayed.
-
getSearchProperties
Get the IDs of the properties that can be searched on.- Returns:
- The Collection of properties that can be searched on.
-
isDisplayable
Tests if a property exists and is displayable.- Parameters:
name
- The property name.- Returns:
true
if the property exists and is displayable.
-
isSearchable
Tests if a property exists and is searchable.- Parameters:
name
- The property name.- Returns:
true
if the property exists and is searchable.
-