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
 
 public class ViewElement extends Object implements ModelViewItem<ElementDefinition> View reference to an element definition
- 
- 
Constructor SummaryConstructors Constructor Description ViewElement()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyTo(ViewItem item)Copy the current view item in the given one.ViewElementcreateInstance()Create an instance ofViewItembooleanequals(Object obj)booleanequals(Object obj, boolean checkDetails)Indicates whether some other object is "equal to" this one.ElementDefinitiongetDefinition()Retrieves the referenced model item definitionI18nizableTextgetDescription()Retrieves the description.I18nizableTextgetLabel()Retrieves the label.StringgetName()Get the name.inthashCode()voidsetDefinition(ElementDefinition definition)Sets the referenced model item definitionvoidsetDescription(I18nizableText description)Set the description.voidsetLabel(I18nizableText label)Set the label.Map<String,Object>toJSON(DefinitionContext context)Converts the view item in a JSON mapvoidtoSAX(ContentHandler contentHandler, DefinitionContext context)Generates SAX events for the view itemStringtoString()- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.ametys.runtime.model.ModelViewItemsetName
 
- 
 
- 
- 
- 
Constructor Detail- 
ViewElementpublic ViewElement() 
 
- 
 - 
Method Detail- 
getDefinitionpublic ElementDefinition getDefinition() Description copied from interface:ModelViewItemRetrieves the referenced model item definition- Specified by:
- getDefinitionin interface- ModelViewItem<ElementDefinition>
- Returns:
- the referenced definition
 
 - 
setDefinitionpublic void setDefinition(ElementDefinition definition) Description copied from interface:ModelViewItemSets the referenced model item definition- Specified by:
- setDefinitionin interface- ModelViewItem<ElementDefinition>
- Parameters:
- definition- the referenced definition
 
 - 
setLabelpublic void setLabel(I18nizableText label) Description copied from interface:ModifiableLabelableSet the label.- Specified by:
- setLabelin interface- ModifiableLabelable
- Parameters:
- label- the label.
 
 - 
setDescriptionpublic void setDescription(I18nizableText description) Description copied from interface:ModifiableLabelableSet the description.- Specified by:
- setDescriptionin interface- ModifiableLabelable
- Parameters:
- description- the description.
 
 - 
getLabelpublic I18nizableText getLabel() Description copied from interface:LabelableRetrieves the label.
 - 
getDescriptionpublic I18nizableText getDescription() Description copied from interface:LabelableRetrieves the description.- Specified by:
- getDescriptionin interface- Labelable
- Returns:
- the description.
 
 - 
toJSONpublic Map<String,Object> toJSON(DefinitionContext context) throws ProcessingException Description copied from interface:ViewItemConverts the view item in a JSON map- Specified by:
- toJSONin interface- ViewItem
- 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
 
 - 
toSAXpublic void toSAX(ContentHandler contentHandler, DefinitionContext context) throws SAXException Description copied from interface:ViewItemGenerates SAX events for the view item- Specified by:
- toSAXin interface- ViewItem
- Parameters:
- contentHandler- the- ContentHandlerthat will receive the SAX events
- context- the context of the definitions included in the view item
- Throws:
- SAXException- if an error occurs during the SAX events generation
 
 - 
copyTopublic void copyTo(ViewItem item) Description copied from interface:ViewItemCopy the current view item in the given one. If the view item is an accessor, its view items are not copied
 - 
createInstancepublic ViewElement createInstance() Description copied from interface:ViewItemCreate an instance ofViewItem- Specified by:
- createInstancein interface- ViewItem
- Returns:
- the created instance
 
 - 
equalspublic boolean equals(Object obj, boolean checkDetails) Description copied from interface:ViewItemIndicates whether some other object is "equal to" this one.
 
- 
 
-