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
Fields Modifier and Type Field Description protected Context
_context
The context.protected ThreadSafeComponentManager<Enumerator>
_enumeratorManager
Manager component for enumeratorsprotected ServiceManager
_manager
The service manager-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description SearchClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 widgetprotected Map<String,Object>
_configureWidgetParams(Configuration configuration)
Configures the widgetvoid
configure(Configuration configuration)
void
contextualize(Context context)
void
dispose()
List<ClientSideElement.Script>
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 parameters-
Methods 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 Detail
-
_enumeratorManager
protected ThreadSafeComponentManager<Enumerator> _enumeratorManager
Manager component for enumerators
-
_manager
protected ServiceManager _manager
The service manager
-
-
Constructor Detail
-
SearchClientSideElement
public SearchClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- 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
protected void _configureSearchCriteria(Configuration configuration) throws ConfigurationException
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
protected void _configureColumns(Configuration configuration) throws ConfigurationException
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
protected void _configureProperties(Configuration configuration) throws ConfigurationException
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
protected I18nizableText _configureLabel(Configuration configuration) throws ConfigurationException
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
protected String _configureWidget(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.
-
_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
protected void _configurePageSize(Configuration configuration) throws ConfigurationException
Configures the result page size.- Parameters:
configuration
- the configuration to use.- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureSearchUrl
protected void _configureSearchUrl(Configuration configuration) throws ConfigurationException
Configure the URL used for search- Parameters:
configuration
- The configuration to use.- Throws:
ConfigurationException
- if the configuration is not valid.
-
_configureExportUrl
protected void _configureExportUrl(Configuration configuration) throws ConfigurationException
Configure the URL used for XSL export- Parameters:
configuration
- The configuration to use.- Throws:
ConfigurationException
- if the configuration is not valid.
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceDisposable
-
-