Package org.ametys.runtime.model
Interface ModelItem
- All Superinterfaces:
Comparable<ModelItem>
,Labelable
,ModifiableLabelable
- All Known Subinterfaces:
ContentElementDefinition
,ElementDefinition<T>
,Property<T,
,X> RestrictedModelItem<T>
,SystemProperty<T,
X>
- All Known Implementing Classes:
AbstractContentProperty
,AbstractDateTimeSystemProperty
,AbstractModelItem
,AbstractMultiTypedValuesProperty
,AbstractMultiValuesProperty
,AbstractProperty
,AbstractSystemProperty
,AbstractUserSystemProperty
,AttributeDefinition
,CollectionsSystemProperty
,CommentsSystemProperty
,CompositeDefinition
,ContentAttributeDefinition
,ContentPrivacySystemProperty
,ContentRestrictedCompositeDefinition
,ContentRestrictedRepeaterDefinition
,ContentTypeSystemProperty
,ContributorSystemProperty
,CreationDateSystemProperty
,CreatorSystemProperty
,DefaultContentElementDefinition
,DefaultElementDefinition
,DegreeOrderProperty
,DegreeTypeProperty
,ElementRefProperty
,FirstValidationSystemProperty
,FirstValidatorSystemProperty
,FulltextSystemProperty
,HasLiveVersionSystemProperty
,LanguageSystemProperty
,LastMajorValidationSystemProperty
,LastMajorValidatorSystemProperty
,LastModifiedSystemProperty
,LastValidationSystemProperty
,LastValidatorSystemProperty
,MemberProjectProperty
,ModelItemGroup
,MultiContentValuesProperty
,MultiStringValuesProperty
,OrgUnitAncestorProperty
,OrphanSystemProperty
,PagesSystemProperty
,ParentContentSystemProperty
,ParentProgramsProperty
,ParentSubProgramsProperty
,PinProperty
,ProfiledGroupsTagsSystemProperty
,ProgramSkillsProperty
,RepeaterDefinition
,RichTextAttributeDefinition
,SemanticAnnotationSystemProperty
,ServiceParameter
,SharedSystemProperty
,SiteSystemProperty
,SiteTypeSystemProperty
,SubProgramParentProgramProperty
,TagsSystemProperty
,TagsSystemProperty
,ViewBasedFullTextSystemProperty
,ViewParameter
,WorkflowStepSystemProperty
,WorkflowStepSystemProperty
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 groupdefault String
Get the default widget to use when rendering this item as a criterion.default Map<String,
I18nizableText> getCriterionWidgetParameters
(Configuration configuration) Get the widget parameters to use when rendering this item as a criterion.Retrieves the disable condition.Returns theItemCheckerDescriptor
s associated with this group.getModel()
Retrieves the model of the itemRetrieves the parent of the itemgetPath()
Retrieves the path of the model itemRetrieves the name of the plugin declaring this element.getType()
Retrieves the type.Retrieves the widget to use for rendering.Get the widget's parametersvoid
setDisableConditions
(DisableConditions disableConditions) Sets the disable condition.void
Sets the model of the elementvoid
setParent
(ModelItemGroup parent) Sets the parent of the itemvoid
setPluginName
(String pluginName) Set the name of the plugin declaring this element.void
setType
(ModelItemType type) Set the type.void
Set the widget.void
setWidgetParameters
(Map<String, I18nizableText> params) Set the widget's parameterstoJSON
(DefinitionContext context) Converts the model item in a JSON mapvoid
toSAX
(ContentHandler contentHandler, DefinitionContext context) Generates SAX events for the model itemMethods 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
-
toSAX
Generates SAX events for the model item- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventscontext
- the context of the definition- Throws:
SAXException
- if an error occurs during the SAX events generation
-
getType
Retrieves the type.- Returns:
- the type.
-
setType
Set the type.- Parameters:
type
- the type.
-
getPluginName
Retrieves the name of the plugin declaring this element.- Returns:
- the plugin name.
-
setPluginName
Set the name of the plugin declaring this element.- Parameters:
pluginName
- the plugin name.
-
getWidget
Retrieves the widget to use for rendering.- Returns:
- the widget or
null
if none is defined.
-
setWidget
Set the widget.- Parameters:
widget
- the widget.
-
getCriterionWidget
Get the default widget to use when rendering this item as a criterion.- Returns:
- The default widget to use, or
null
if no specific widget is necessary.
-
getWidgetParameters
Get the widget's parameters- Returns:
- the widget's parameters
-
setWidgetParameters
Set the widget's parameters- Parameters:
params
- the parameters to set
-
getCriterionWidgetParameters
Get the widget parameters to use when rendering this item as a criterion.- Parameters:
configuration
- The widget parameters configuration- Returns:
- The default widget parameters to use, or an empty Map if no specific widget parameters are necessary.
-
getDisableConditions
Retrieves the disable condition.- Returns:
- the disable condition or
null
if none is defined.
-
setDisableConditions
Sets the disable condition.- Parameters:
disableConditions
- the disable condition.
-