public abstract class AbstractSearchUICriterion extends Parameter<MetadataType> implements SearchUICriterion, Serviceable, Configurable
SearchUIModel.| Modifier and Type | Field and Description |
|---|---|
private String |
_contentTypeId |
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point.
|
private I18nizableText |
_group |
private boolean |
_hidden |
private boolean |
_multiple |
private String |
_onChangeClassName |
private String |
_onInitClassName |
private String |
_onSubmitClassName |
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
protected UserManager |
_userManager
The user manager.
|
protected UserPopulationDAO |
_userPopulationDAO
The user population DAO
|
| Constructor and Description |
|---|
AbstractSearchUICriterion() |
| Modifier and Type | Method and Description |
|---|---|
protected I18nizableText |
_configureI18nizableText(Configuration config,
I18nizableText defaultValue)
Configure an i18nizable text
|
protected boolean |
_initializeValidator(ThreadSafeComponentManager<Validator> validatorManager,
String pluginName,
String role,
Configuration config)
Initialize the validator.
|
void |
configure(Configuration configuration) |
protected void |
configureId(Configuration configuration)
Configure the criterion ID.
|
protected void |
configureLabelsAndGroup(Configuration configuration)
Configure the labels and group.
|
protected void |
configureUIProperties(Configuration configuration)
Configure the standard UI properties (hidden, init class, change class, submit class).
|
protected void |
configureValues(Configuration configuration)
Configure the default value.
|
String |
getChangeClassName()
Get the JS class name to execute on 'change' event
|
String |
getContentTypeId()
Get the content type ID (only when the search criteria is of type CONTENT).
|
I18nizableText |
getFacetLabel(String value,
Locale currentLocale)
Get the label of a facet value.
|
I18nizableText |
getGroup()
Get the group of the search criteria
|
String |
getInitClassName()
Get the JS class name to execute on 'init' event
|
protected MetadataDefinition |
getMetadataDefinition(MetadataIndexingField indexingField,
String[] remainingPathSegments,
List<String> joinPaths,
boolean addLast)
Get the metadata definition from the indexing field and compute the join paths.
|
SearchField |
getSearchField()
Get the
SearchField representing this search criterion. |
String |
getSubmitClassName()
Get the JS class name to execute on 'submit' event
|
boolean |
isHidden()
Determines if the criteria is hidden
|
boolean |
isMultiple()
Determines if the column value is multiple
|
void |
service(ServiceManager manager) |
void |
setChangeClassName(String className)
Set the JS class name to execute on 'change' event
|
void |
setContentTypeId(String contentTypeId)
Set the content type ID (only when the search criteria is of type CONTENT).
|
void |
setGroup(I18nizableText group)
Set the group of the search criteria
|
void |
setHidden(boolean hidden)
Set the hidden property of the criteria
|
void |
setInitClassName(String className)
Set the JS class name to execute on 'init' event
|
void |
setMultiple(boolean multiple)
Set the multiple property
|
void |
setSubmitClassName(String className)
Set the JS class name to execute on 'submit' event
|
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultValue, getDescription, getFieldId, getLabel, getValidator, getWidget, getWidgetParametersgetId, getOperator, getQuery, getQuery, isFacetable, isFacetable, isSortable, isSortablegetEnumerator, getTypeprotected AmetysObjectResolver _resolver
protected ContentTypeExtensionPoint _cTypeEP
protected UserManager _userManager
protected UserPopulationDAO _userPopulationDAO
private String _onInitClassName
private String _onSubmitClassName
private String _onChangeClassName
private boolean _hidden
private boolean _multiple
private I18nizableText _group
private String _contentTypeId
public AbstractSearchUICriterion()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void configure(Configuration configuration) throws ConfigurationException
configure in interface ConfigurableConfigurationExceptionprotected void configureId(Configuration configuration) throws ConfigurationException
configuration - The search criterion configuration.ConfigurationException - If an error occurs.protected void configureLabelsAndGroup(Configuration configuration) throws ConfigurationException
configuration - The search criterion configuration.ConfigurationException - If an error occurs.protected void configureValues(Configuration configuration) throws ConfigurationException
configuration - The search criterion configuration.ConfigurationException - If an error occurs.protected void configureUIProperties(Configuration configuration) throws ConfigurationException
configuration - The search criterion configuration.ConfigurationException - If an error occurs.public String getInitClassName()
getInitClassName in interface SearchUICriterionpublic void setInitClassName(String className)
className - the JS class namepublic String getSubmitClassName()
getSubmitClassName in interface SearchUICriterionpublic void setSubmitClassName(String className)
className - the JS class namepublic String getChangeClassName()
getChangeClassName in interface SearchUICriterionpublic void setChangeClassName(String className)
className - the JS class namepublic I18nizableText getGroup()
getGroup in interface SearchUICriterionnull if the search criteria does not belong to any group, the name of the group otherwisepublic void setGroup(I18nizableText group)
group - the group this search criteria will be added topublic boolean isHidden()
isHidden in interface SearchUICriteriontrue if the criteria is hiddenpublic void setHidden(boolean hidden)
hidden - true to hide the search criteriapublic void setMultiple(boolean multiple)
multiple - the multiple propertypublic boolean isMultiple()
isMultiple in interface Fieldtrue if the value is multiplepublic String getContentTypeId()
getContentTypeId in interface Fieldpublic void setContentTypeId(String contentTypeId)
contentTypeId - the content type ID.public I18nizableText getFacetLabel(String value, Locale currentLocale)
SearchUICriteriongetFacetLabel in interface SearchUICriterionvalue - the facet value.currentLocale - the current localepublic SearchField getSearchField()
SearchCriterionSearchField representing this search criterion.getSearchField in interface SearchCriterionSearchField representing this search criterion.protected boolean _initializeValidator(ThreadSafeComponentManager<Validator> validatorManager, String pluginName, String role, Configuration config) throws ConfigurationException
validatorManager - The validator manager.pluginName - The plugin name.role - The validator role.config - The validator configuration.ConfigurationException - If an error occurs.protected I18nizableText _configureI18nizableText(Configuration config, I18nizableText defaultValue)
config - The Configuration.defaultValue - The default value as an I18nizableText.protected MetadataDefinition getMetadataDefinition(MetadataIndexingField indexingField, String[] remainingPathSegments, List<String> joinPaths, boolean addLast) throws ConfigurationException
indexingField - The initial indexing fieldremainingPathSegments - The path to access the metadata or an another indexing field from the initial indexing fieldjoinPaths - The consecutive's path in case of joint to access the field/metadataaddLast - true to add the last join path element to the list, false otherwise.ConfigurationException - If an error occurs.