Package org.ametys.runtime.model
Interface ModelItem
- 
- All Superinterfaces:
- Comparable<ModelItem>,- Labelable,- ModifiableLabelable
 - All Known Subinterfaces:
- RestrictedModelItem<T>
 - All Known Implementing Classes:
- AbstractModelItem,- AttributeDefinition,- CompositeDefinition,- ContentAttributeDefinition,- ContentRestrictedCompositeDefinition,- ContentRestrictedRepeaterDefinition,- ElementDefinition,- ModelItemGroup,- RepeaterDefinition,- RichTextAttributeDefinition,- ServiceParameter,- ViewParameter
 
 public interface ModelItem extends ModifiableLabelable, Comparable<ModelItem> Interface for model items
- 
- 
Field SummaryFields Modifier and Type Field Description static StringITEM_PATH_SEPARATORSeparator used for item paths in definitions
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddItemChecker(ItemCheckerDescriptor itemChecker)Add an item checker to the groupDisableConditionsgetDisableConditions()Retrieves the disable condition.Set<ItemCheckerDescriptor>getItemCheckers()Returns theItemCheckerDescriptors associated with this group.ModelgetModel()Retrieves the model of the itemModelItemGroupgetParent()Retrieves the parent of the itemStringgetPath()Retrieves the path of the model itemStringgetPluginName()Retrieves the name of the plugin declaring this element.ModelItemTypegetType()Retrieves the type.StringgetWidget()Retrieves the widget to use for rendering.Map<String,I18nizableText>getWidgetParameters()Get the widget's parametersvoidsetDisableConditions(DisableConditions disableConditions)Sets the disable condition.voidsetModel(Model model)Sets the model of the elementvoidsetParent(ModelItemGroup parent)Sets the parent of the itemvoidsetPluginName(String pluginName)Set the name of the plugin declaring this element.voidsetType(ModelItemType type)Set the type.voidsetWidget(String widget)Set the widget.voidsetWidgetParameters(Map<String,I18nizableText> params)Set the widget's parametersMap<String,Object>toJSON(DefinitionContext context)Converts the model item in a JSON mapvoidtoSAX(ContentHandler contentHandler, DefinitionContext context)Generates SAX events for the model item- 
Methods inherited from interface java.lang.ComparablecompareTo
 - 
Methods inherited from interface org.ametys.runtime.util.LabelablegetDescription, getLabel, getName
 - 
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelablesetDescription, setLabel, setName
 
- 
 
- 
- 
- 
Field Detail- 
ITEM_PATH_SEPARATORstatic final String ITEM_PATH_SEPARATOR Separator used for item paths in definitions- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getItemCheckersSet<ItemCheckerDescriptor> getItemCheckers() Returns theItemCheckerDescriptors associated with this group.- Returns:
- the ItemCheckerDescriptors associated with this group.
 
 - 
addItemCheckervoid addItemChecker(ItemCheckerDescriptor itemChecker) Add an item checker to the group- Parameters:
- itemChecker- the item checker to add
 
 - 
setModelvoid setModel(Model model) Sets the model of the element- Parameters:
- model- the model to set
 
 - 
getParentModelItemGroup getParent() Retrieves the parent of the item- Returns:
- the parent group
 
 - 
setParentvoid setParent(ModelItemGroup parent) Sets the parent of the item- Parameters:
- parent- the parent to set
 
 - 
toJSONMap<String,Object> toJSON(DefinitionContext context) throws ProcessingException Converts the model item in a JSON map- Parameters:
- context- the context of the definition
- Returns:
- The model item as a JSON map, or an empty map
- Throws:
- ProcessingException- If an error occurs when converting the model item
 
 - 
toSAXvoid toSAX(ContentHandler contentHandler, DefinitionContext context) throws SAXException Generates SAX events for the model item- Parameters:
- contentHandler- the- ContentHandlerthat will receive the SAX events
- context- the context of the definition
- Throws:
- SAXException- if an error occurs during the SAX events generation
 
 - 
getTypeModelItemType getType() Retrieves the type.- Returns:
- the type.
 
 - 
setTypevoid setType(ModelItemType type) Set the type.- Parameters:
- type- the type.
 
 - 
getPluginNameString getPluginName() Retrieves the name of the plugin declaring this element.- Returns:
- the plugin name.
 
 - 
setPluginNamevoid setPluginName(String pluginName) Set the name of the plugin declaring this element.- Parameters:
- pluginName- the plugin name.
 
 - 
getWidgetString getWidget() Retrieves the widget to use for rendering.- Returns:
- the widget or nullif none is defined.
 
 - 
getWidgetParametersMap<String,I18nizableText> getWidgetParameters() Get the widget's parameters- Returns:
- the widget's parameters
 
 - 
setWidgetParametersvoid setWidgetParameters(Map<String,I18nizableText> params) Set the widget's parameters- Parameters:
- params- the parameters to set
 
 - 
getDisableConditionsDisableConditions getDisableConditions() Retrieves the disable condition.- Returns:
- the disable condition or nullif none is defined.
 
 - 
setDisableConditionsvoid setDisableConditions(DisableConditions disableConditions) Sets the disable condition.- Parameters:
- disableConditions- the disable condition.
 
 
- 
 
-