Package org.ametys.runtime.model
Class ViewElement
java.lang.Object
org.ametys.runtime.model.ViewElement
- All Implemented Interfaces:
ModelViewItem<ElementDefinition>
,ViewItem
,Labelable
,ModifiableLabelable
- Direct Known Subclasses:
ViewElementAccessor
View reference to an element definition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Copy the current view item in the given one.Create an instance ofViewItem
boolean
boolean
Indicates whether some other object is "equal to" this one.Retrieves the referenced model item definitionRetrieves the description.getLabel()
Retrieves the label.getName()
Get the name.int
hashCode()
void
setDefinition
(ElementDefinition definition) Sets the referenced model item definitionvoid
setDescription
(I18nizableText description) Set the description.void
setLabel
(I18nizableText label) Set the label.toJSON
(DefinitionContext context) Converts the view item in a JSON mapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.runtime.model.ModelViewItem
setName
-
Constructor Details
-
ViewElement
public ViewElement()
-
-
Method Details
-
getDefinition
Description copied from interface:ModelViewItem
Retrieves the referenced model item definition- Specified by:
getDefinition
in interfaceModelViewItem<ElementDefinition>
- Returns:
- the referenced definition
-
setDefinition
Description copied from interface:ModelViewItem
Sets the referenced model item definition- Specified by:
setDefinition
in interfaceModelViewItem<ElementDefinition>
- Parameters:
definition
- the referenced definition
-
getName
Description copied from interface:Labelable
Get the name. -
setLabel
Description copied from interface:ModifiableLabelable
Set the label.- Specified by:
setLabel
in interfaceModifiableLabelable
- Parameters:
label
- the label.
-
setDescription
Description copied from interface:ModifiableLabelable
Set the description.- Specified by:
setDescription
in interfaceModifiableLabelable
- Parameters:
description
- the description.
-
getLabel
Description copied from interface:Labelable
Retrieves the label. -
getDescription
Description copied from interface:Labelable
Retrieves the description.- Specified by:
getDescription
in interfaceLabelable
- Returns:
- the description.
-
toJSON
Description copied from interface:ViewItem
Converts the view item in a JSON map- Specified by:
toJSON
in interfaceViewItem
- 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:ViewItem
Copy the current view item in the given one. If the view item is an accessor, its view items are not copied -
createInstance
Description copied from interface:ViewItem
Create an instance ofViewItem
- Specified by:
createInstance
in interfaceViewItem
- Returns:
- the created instance
-
hashCode
-
equals
-
equals
Description copied from interface:ViewItem
Indicates whether some other object is "equal to" this one.
-