Package org.ametys.cms.clientsideelement
Class SearchClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.cms.clientsideelement.SearchClientSideElement
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Disposable
,Configurable
,Contextualizable
,Serviceable
public class SearchClientSideElement
extends StaticClientSideElement
implements Contextualizable, Disposable
Search tool HMI item
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
Field Summary
Modifier and TypeFieldDescriptionprotected Context
The context.protected ThreadSafeComponentManager<Enumerator>
Manager component for enumeratorsprotected ServiceManager
The service managerFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_configureColumn
(Configuration configuration, String prefix) Configures the criteria parametersprotected void
_configureColumns
(Configuration configuration) Configure the columnsprotected void
_configureCriteria
(Configuration configuration, String prefix) Configures the criteria parametersprotected Enumerator
_configureEnumerator
(Configuration configuration, String prefix) Configures the enumeratorprotected void
_configureExportUrl
(Configuration configuration) Configure the URL used for XSL exportprotected I18nizableText
_configureLabel
(Configuration configuration) Configures the label.protected void
_configurePageSize
(Configuration configuration) Configures the result page size.protected void
_configureProperties
(Configuration configuration) Configure the columnsprotected void
_configureProperty
(Configuration configuration, String prefix) Configures the criteria parametersprotected void
_configureSearchCriteria
(Configuration configuration) Configure the search criteriaprotected void
_configureSearchUrl
(Configuration configuration) Configure the URL used for searchprotected String
_configureWidget
(Configuration configuration) Configures the widget_configureWidgetParams
(Configuration configuration) Configures the widgetvoid
configure
(Configuration configuration) void
contextualize
(Context context) void
dispose()
getScripts
(boolean ignoreRights, Map<String, Object> contextParameters) This method return the scripts that will be used on client side.void
service
(ServiceManager smanager) protected void
setEnumeratorValues
(ClientSideElement.Script script, Enumerator enumerator, String prefix) Set the enumerator values in script parametersMethods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, setPluginInfo, toString
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_enumeratorManager
Manager component for enumerators -
_manager
The service manager -
_context
The context.
-
-
Constructor Details
-
SearchClientSideElement
public SearchClientSideElement()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classStaticFileImportsClientSideElement
- Throws:
ConfigurationException
-
getScripts
public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String, Object> contextParameters) Description copied from interface:ClientSideElement
This method return the scripts that will be used on client side. This class will be parametrized by initial and current parameters.- Specified by:
getScripts
in interfaceClientSideElement
- Overrides:
getScripts
in classStaticFileImportsClientSideElement
- Parameters:
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.- Returns:
- The list of scripts or an empty list.
-
_configureSearchCriteria
Configure the search criteria- Parameters:
configuration
- The configuration- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureCriteria
protected void _configureCriteria(Configuration configuration, String prefix) throws ConfigurationException Configures the criteria parameters- Parameters:
configuration
- the item configurationprefix
- the criteria prefix- Throws:
ConfigurationException
- if the configuration is not valid.
-
setEnumeratorValues
protected void setEnumeratorValues(ClientSideElement.Script script, Enumerator enumerator, String prefix) Set the enumerator values in script parameters- Parameters:
script
- The script into which set the parametersenumerator
- The enumeratorprefix
- The parameters prefix
-
_configureColumns
Configure the columns- Parameters:
configuration
- The configuration- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureColumn
protected void _configureColumn(Configuration configuration, String prefix) throws ConfigurationException Configures the criteria parameters- Parameters:
configuration
- the item configurationprefix
- the criteria prefix- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureProperties
Configure the columns- Parameters:
configuration
- The configuration- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureProperty
protected void _configureProperty(Configuration configuration, String prefix) throws ConfigurationException Configures the criteria parameters- Parameters:
configuration
- the item configurationprefix
- the criteria prefix- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureLabel
Configures the label.- Parameters:
configuration
- the configuration to use.- Returns:
- the i18n text.
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureEnumerator
protected Enumerator _configureEnumerator(Configuration configuration, String prefix) throws ConfigurationException Configures the enumerator- Parameters:
configuration
- The configuration to useprefix
- The prefix- Returns:
- The static enumerator or null.
- Throws:
ConfigurationException
- If the configuraiton has an issue
-
_configureWidget
Configures the widget- Parameters:
configuration
- The configuration to use- Returns:
- The widget id
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureWidgetParams
protected Map<String,Object> _configureWidgetParams(Configuration configuration) throws ConfigurationException Configures the widget- Parameters:
configuration
- The configuration to use- Returns:
- The widget id
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configurePageSize
Configures the result page size.- Parameters:
configuration
- the configuration to use.- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureSearchUrl
Configure the URL used for search- Parameters:
configuration
- The configuration to use.- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureExportUrl
Configure the URL used for XSL export- Parameters:
configuration
- The configuration to use.- Throws:
ConfigurationException
- if the configuration is not valid.
-
dispose
- Specified by:
dispose
in interfaceDisposable
-