Class AbstractSearchUIColumn
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<MetadataType>
-
- org.ametys.cms.search.ui.model.impl.AbstractSearchUIColumn
-
- All Implemented Interfaces:
Field
,ResultField
,SearchUIColumn
- Direct Known Subclasses:
MetadataSearchUIColumn
,SystemSearchUIColumn
public abstract class AbstractSearchUIColumn extends Parameter<MetadataType> implements SearchUIColumn
This class represents a result column
-
-
Constructor Summary
Constructors Constructor Description AbstractSearchUIColumn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected I18nizableText
_configureI18nizableText(Configuration config, I18nizableText defaultValue)
Configure an i18nizable textString
getContentTypeId()
Get the content type ID (only when the search criteria is of type CONTENT).String
getConverter()
Get the JS class name for converting field's valueString
getDefaultSorter()
If the column should be the default sorter 'ASC' or 'DESC'.String
getRenderer()
Get the JS class name for rendererSearchField
getSearchField()
Get theSearchField
representing this result field.int
getWidth()
The column's widthboolean
isEditable()
Determines if the property is editableboolean
isHidden()
Determines if the column is hidden by defaultboolean
isMultiple()
Get the multiple status of the field.boolean
isSortable()
Determines if the column is sortablevoid
setContentTypeId(String contentTypeId)
Set the content type ID (only when the search criteria is of type CONTENT).void
setConverter(String converter)
Set the JS class name for converting field's valuevoid
setDefaultSorter(String defaultSorter)
Set the default sorter properyvoid
setEditable(boolean editable)
Set the editable propertyvoid
setHidden(boolean hidden)
Set the hidden propertyvoid
setMultiple(boolean multiple)
Set the multiple propertyvoid
setRenderer(String renderer)
Set the JS class name for renderervoid
setSortable(boolean sortable)
Set the sortable propertyvoid
setWidth(int width)
Set the column's width-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.search.model.Field
getEnumerator, getType
-
Methods inherited from interface org.ametys.cms.search.model.ResultField
getFullValue, getId, getValue
-
Methods inherited from interface org.ametys.cms.search.ui.model.SearchUIColumn
getDescription, getLabel, getSubColumns, getValidator, getWidget, getWidgetParameters
-
-
-
-
Constructor Detail
-
AbstractSearchUIColumn
public AbstractSearchUIColumn()
-
-
Method Detail
-
getWidth
public int getWidth()
Description copied from interface:SearchUIColumn
The column's width- Specified by:
getWidth
in interfaceSearchUIColumn
- Returns:
- The width
-
setWidth
public void setWidth(int width)
Set the column's width- Parameters:
width
- The width to set
-
isHidden
public boolean isHidden()
Description copied from interface:SearchUIColumn
Determines if the column is hidden by default- Specified by:
isHidden
in interfaceSearchUIColumn
- Returns:
true
if the column is hidden by default
-
setHidden
public void setHidden(boolean hidden)
Set the hidden property- Parameters:
hidden
-true
to hidden the columns by default
-
isEditable
public boolean isEditable()
Description copied from interface:SearchUIColumn
Determines if the property is editable- Specified by:
isEditable
in interfaceSearchUIColumn
- Returns:
true
if the property is editable
-
setSortable
public void setSortable(boolean sortable)
Set the sortable property- Parameters:
sortable
-true
to authorized sort
-
isSortable
public boolean isSortable()
Description copied from interface:SearchUIColumn
Determines if the column is sortable- Specified by:
isSortable
in interfaceSearchUIColumn
- Returns:
true
if the column is sortable
-
setDefaultSorter
public void setDefaultSorter(String defaultSorter)
Set the default sorter propery- Parameters:
defaultSorter
- If the column should be a default sorter, 'ASC' for ascending 'DESC' for descending. Null otherwise.
-
getDefaultSorter
public String getDefaultSorter()
Description copied from interface:SearchUIColumn
If the column should be the default sorter 'ASC' or 'DESC'. Null otherwise.- Specified by:
getDefaultSorter
in interfaceSearchUIColumn
- Returns:
- 'ASC', 'DESC' or null
-
setEditable
public void setEditable(boolean editable)
Set the editable property- Parameters:
editable
-true
to authorized edition
-
getRenderer
public String getRenderer()
Description copied from interface:SearchUIColumn
Get the JS class name for renderer- Specified by:
getRenderer
in interfaceSearchUIColumn
- Returns:
- The renderer
-
setRenderer
public void setRenderer(String renderer)
Set the JS class name for renderer- Parameters:
renderer
- The renderer
-
getConverter
public String getConverter()
Description copied from interface:SearchUIColumn
Get the JS class name for converting field's value- Specified by:
getConverter
in interfaceSearchUIColumn
- Returns:
- The convert JS class name
-
setConverter
public void setConverter(String converter)
Set the JS class name for converting field's value- Parameters:
converter
- The convert JS class name
-
isMultiple
public boolean isMultiple()
Description copied from interface:Field
Get the multiple status of the field.- Specified by:
isMultiple
in interfaceField
- Returns:
true
if the field can have multiple values,false
otherwise.
-
setMultiple
public void setMultiple(boolean multiple)
Set the multiple property- Parameters:
multiple
- the multiple property
-
getContentTypeId
public String getContentTypeId()
Get the content type ID (only when the search criteria is of type CONTENT).- Specified by:
getContentTypeId
in interfaceField
- Returns:
- the content type ID.
-
setContentTypeId
public void setContentTypeId(String contentTypeId)
Set the content type ID (only when the search criteria is of type CONTENT).- Parameters:
contentTypeId
- the content type ID.
-
getSearchField
public SearchField getSearchField()
Description copied from interface:ResultField
Get theSearchField
representing this result field.- Specified by:
getSearchField
in interfaceResultField
- Returns:
- The
SearchField
representing this result field.
-
_configureI18nizableText
protected I18nizableText _configureI18nizableText(Configuration config, I18nizableText defaultValue)
Configure an i18nizable text- Parameters:
config
- The Configuration.defaultValue
- The default value as an I18nizableText.- Returns:
- The i18nizable text
-
-