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
Interface for model items
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Separator used for item paths in definitions -
Method Summary
Modifier and TypeMethodDescriptionvoid
addItemChecker
(ItemCheckerDescriptor itemChecker) Add an item checker to the groupReturns theItemCheckerDescriptor
s associated with this group.getModel()
Retrieves the model of the itemRetrieves the parent of the itemgetPath()
Retrieves the path of the model itemgetType()
Retrieves the type.void
Sets the model of the elementvoid
setParent
(ModelItemGroup parent) Sets the parent of the itemvoid
setType
(ModelItemType type) Set the type.toJSON
(DefinitionContext context) Converts the model item in a JSON mapMethods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
Methods inherited from interface org.ametys.runtime.util.ModifiableLabelable
setDescription, setLabel, setName
-
Field Details
-
ITEM_PATH_SEPARATOR
Separator used for item paths in definitions- See Also:
-
-
Method Details
-
getItemCheckers
Returns theItemCheckerDescriptor
s associated with this group.- Returns:
- the
ItemCheckerDescriptor
s associated with this group.
-
addItemChecker
Add an item checker to the group- Parameters:
itemChecker
- the item checker to add
-
getPath
Retrieves the path of the model item- Returns:
- the item path
-
getModel
Retrieves the model of the item- Returns:
- the model
-
setModel
Sets the model of the element- Parameters:
model
- the model to set
-
getParent
Retrieves the parent of the item- Returns:
- the parent group
-
setParent
Sets the parent of the item- Parameters:
parent
- the parent to set
-
toJSON
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
-
getType
Retrieves the type.- Returns:
- the type.
-
setType
Set the type.- Parameters:
type
- the type.
-