Class ViewElementSearchUIColumn
java.lang.Object
org.ametys.runtime.model.ViewElement
org.ametys.cms.search.ui.model.impl.ViewElementSearchUIColumn
- All Implemented Interfaces:
SearchUIColumn<ElementDefinition>,ModelViewItem<ElementDefinition>,ViewItem,Labelable,ModifiableLabelable
public class ViewElementSearchUIColumn
extends ViewElement
implements SearchUIColumn<ElementDefinition>
This class represents a result column
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if sort is allowed on multiple joinvoidCopy the current view item in the given one.Create an instance ofViewItemGet the JS class name for converting field's valueIf the column should be the default sorter 'ASC' or 'DESC'.Get the JS class name for rendererintgetWidth()The column's widthbooleanDetermines if the property is editablebooleanisHidden()Determines if the column is hidden by defaultbooleanDetermines if the column is sortablevoidsetAllowSortOnMultipleJoin(boolean allowSortOnMultipleJoin) Set the allowSortOnMultipleJoin propertyvoidsetConverter(Optional<String> converter) Set the JS class name for converting field's valuevoidsetDefaultSorter(Optional<String> defaultSorter) Set the default sorter propertyvoidsetEditable(boolean editable) Set the editable propertyvoidsetHidden(boolean hidden) Set the hidden propertyvoidsetRenderer(Optional<String> renderer) Set the JS class name for renderervoidsetSortable(boolean sortable) Set the sortable propertyvoidsetWidth(int width) Set the column's widthtoJSON(DefinitionContext context) Converts the view item in a JSON mapMethods inherited from class org.ametys.runtime.model.ViewElement
equals, equals, getDefinition, getDescription, getLabel, getName, getParent, hashCode, setDefinition, setDescription, setLabel, setParent, toSAX, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getNameMethods inherited from interface org.ametys.runtime.model.ModelViewItem
getDefinition, setDefinition, setNameMethods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel
-
Constructor Details
-
ViewElementSearchUIColumn
public ViewElementSearchUIColumn()
-
-
Method Details
-
getWidth
Description copied from interface:SearchUIColumnThe column's width- Specified by:
getWidthin interfaceSearchUIColumn<ElementDefinition>- Returns:
- The width
-
setWidth
Description copied from interface:SearchUIColumnSet the column's width- Specified by:
setWidthin interfaceSearchUIColumn<ElementDefinition>- Parameters:
width- The width to set
-
isHidden
Description copied from interface:SearchUIColumnDetermines if the column is hidden by default- Specified by:
isHiddenin interfaceSearchUIColumn<ElementDefinition>- Returns:
trueif the column is hidden by default
-
setHidden
Description copied from interface:SearchUIColumnSet the hidden property- Specified by:
setHiddenin interfaceSearchUIColumn<ElementDefinition>- Parameters:
hidden-trueto hidden the columns by default
-
isEditable
Description copied from interface:SearchUIColumnDetermines if the property is editable- Specified by:
isEditablein interfaceSearchUIColumn<ElementDefinition>- Returns:
trueif the property is editable
-
setEditable
Description copied from interface:SearchUIColumnSet the editable property- Specified by:
setEditablein interfaceSearchUIColumn<ElementDefinition>- Parameters:
editable-trueto authorized edition
-
isSortable
Description copied from interface:SearchUIColumnDetermines if the column is sortable- Specified by:
isSortablein interfaceSearchUIColumn<ElementDefinition>- Returns:
trueif the column is sortable
-
setSortable
Description copied from interface:SearchUIColumnSet the sortable property- Specified by:
setSortablein interfaceSearchUIColumn<ElementDefinition>- Parameters:
sortable-trueto authorized sort
-
allowSortOnMultipleJoin
Description copied from interface:SearchUIColumnDetermines if sort is allowed on multiple join- Specified by:
allowSortOnMultipleJoinin interfaceSearchUIColumn<ElementDefinition>- Returns:
trueif sort is allowed on multiple join,falseotherwise
-
setAllowSortOnMultipleJoin
Description copied from interface:SearchUIColumnSet the allowSortOnMultipleJoin property- Specified by:
setAllowSortOnMultipleJoinin interfaceSearchUIColumn<ElementDefinition>- Parameters:
allowSortOnMultipleJoin-trueto authorized sort on multiple join
-
getDefaultSorter
Description copied from interface:SearchUIColumnIf the column should be the default sorter 'ASC' or 'DESC'. Null otherwise.- Specified by:
getDefaultSorterin interfaceSearchUIColumn<ElementDefinition>- Returns:
- 'ASC', 'DESC' or null
-
setDefaultSorter
Description copied from interface:SearchUIColumnSet the default sorter property- Specified by:
setDefaultSorterin interfaceSearchUIColumn<ElementDefinition>- Parameters:
defaultSorter- If the column should be a default sorter, 'ASC' for ascending 'DESC' for descending. Null otherwise.
-
getRenderer
Description copied from interface:SearchUIColumnGet the JS class name for renderer- Specified by:
getRendererin interfaceSearchUIColumn<ElementDefinition>- Returns:
- The renderer
-
setRenderer
Description copied from interface:SearchUIColumnSet the JS class name for renderer- Specified by:
setRendererin interfaceSearchUIColumn<ElementDefinition>- Parameters:
renderer- The renderer
-
getConverter
Description copied from interface:SearchUIColumnGet the JS class name for converting field's value- Specified by:
getConverterin interfaceSearchUIColumn<ElementDefinition>- Returns:
- The convert JS class name
-
setConverter
Description copied from interface:SearchUIColumnSet the JS class name for converting field's value- Specified by:
setConverterin interfaceSearchUIColumn<ElementDefinition>- Parameters:
converter- The convert JS class name
-
createInstance
Description copied from interface:ViewItemCreate an instance ofViewItem- Specified by:
createInstancein interfaceViewItem- Overrides:
createInstancein classViewElement- Returns:
- the created instance
-
toJSON
Description copied from interface:ViewItemConverts the view item in a JSON map- Specified by:
toJSONin interfaceViewItem- Overrides:
toJSONin classViewElement- Parameters:
context- the context of the definitions referenced in this view item and/or its children- Returns:
- The view item as a JSON map
- Throws:
ProcessingException- If an error occurs when converting the view item
-
copyTo
Description copied from interface:ViewItemCopy the current view item in the given one. If the view item is an accessor, its view items are not copied- Specified by:
copyToin interfaceViewItem- Overrides:
copyToin classViewElement- Parameters:
item- the copy
-