Class DefaultSearchModelCriterionViewItem
java.lang.Object
org.ametys.runtime.model.ViewElement
org.ametys.cms.search.ui.model.impl.DefaultSearchModelCriterionViewItem
- All Implemented Interfaces:
SearchModelCriterionViewItem<ElementDefinition>
,ModelViewItem<ElementDefinition>
,ViewItem
,Labelable
,ModifiableLabelable
public class DefaultSearchModelCriterionViewItem
extends ViewElement
implements SearchModelCriterionViewItem<ElementDefinition>
Represents a view item referencing a criterion definition of a
SearchModel
-
Field Summary
Fields inherited from interface org.ametys.runtime.model.ModelViewItem
DEFAULT_ITEM_TAG_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Copy the current view item in the given one.Create an instance ofViewItem
boolean
isHidden()
Determines if the criterion is hiddenvoid
setHidden
(boolean hidden) Set the hidden property of the criteriatoJSON
(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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
Methods inherited from interface org.ametys.runtime.model.ModelViewItem
getDefinition, setDefinition, setName
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel
-
Constructor Details
-
DefaultSearchModelCriterionViewItem
public DefaultSearchModelCriterionViewItem()
-
-
Method Details
-
isHidden
Description copied from interface:SearchModelCriterionViewItem
Determines if the criterion is hidden- Specified by:
isHidden
in interfaceSearchModelCriterionViewItem<ElementDefinition>
- Returns:
true
if the criterion is hidden
-
setHidden
Description copied from interface:SearchModelCriterionViewItem
Set the hidden property of the criteria- Specified by:
setHidden
in interfaceSearchModelCriterionViewItem<ElementDefinition>
- Parameters:
hidden
- true to hide the search criteria
-
createInstance
Description copied from interface:ViewItem
Create an instance ofViewItem
- Specified by:
createInstance
in interfaceViewItem
- Overrides:
createInstance
in classViewElement
- Returns:
- the created instance
-
toJSON
Description copied from interface:ViewItem
Converts the view item in a JSON map- Specified by:
toJSON
in interfaceViewItem
- Overrides:
toJSON
in 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
-
copyTo
Description copied from interface:ViewItem
Copy the current view item in the given one. If the view item is an accessor, its view items are not copied- Specified by:
copyTo
in interfaceViewItem
- Overrides:
copyTo
in classViewElement
- Parameters:
item
- the copy
-