Package org.ametys.runtime.model
Class SimpleViewItemGroup
- java.lang.Object
-
- org.ametys.runtime.model.AbstractViewItemGroup
-
- org.ametys.runtime.model.SimpleViewItemGroup
-
- All Implemented Interfaces:
ViewItem
,ViewItemAccessor
,ViewItemContainer
,ViewItemGroup
,Labelable
,ModifiableLabelable
public class SimpleViewItemGroup extends AbstractViewItemGroup
Simple group of view items
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.model.AbstractViewItemGroup
_children, _description, _label, _role
-
Fields inherited from interface org.ametys.runtime.model.ViewItemGroup
FIELDSET_ROLE, TAB_ROLE
-
-
Constructor Summary
Constructors Constructor Description SimpleViewItemGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyTo(ViewItem item)
Copy the current view item in the given one.ViewItem
createInstance()
Create an instance ofViewItem
boolean
equals(Object obj)
String
getName()
Get the name.int
hashCode()
void
includeView(View viewToInclude, View referenceView)
Include the given view to the group.void
setName(String name)
Set the name.Map<String,Object>
toJSON(DefinitionContext context)
Converts the view item in a JSON mapvoid
toSAX(ContentHandler contentHandler, DefinitionContext context)
Generates SAX events for the view itemString
toString()
-
Methods inherited from class org.ametys.runtime.model.AbstractViewItemGroup
addViewItem, clear, equals, getDescription, getLabel, getRole, getViewItems, insertViewItem, removeViewItem, setDescription, setLabel, setRole
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.runtime.model.ViewItemAccessor
addViewItems, getModelViewItem, hasModelViewItem, hasModelViewItem, hasModelViewItem
-
Methods inherited from interface org.ametys.runtime.model.ViewItemGroup
copyTo
-
-
-
-
Constructor Detail
-
SimpleViewItemGroup
public SimpleViewItemGroup()
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:Labelable
Get the name.- Returns:
- the name.
-
setName
public void setName(String name)
Description copied from interface:ModifiableLabelable
Set the name.- Parameters:
name
- the name.
-
toJSON
public Map<String,Object> toJSON(DefinitionContext context) throws ProcessingException
Description copied from interface:ViewItem
Converts the view item in a JSON map- 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
-
toSAX
public void toSAX(ContentHandler contentHandler, DefinitionContext context) throws SAXException
Description copied from interface:ViewItem
Generates SAX events for the view item- Parameters:
contentHandler
- theContentHandler
that will receive the SAX eventscontext
- the context of the definitions included in the view item- Throws:
SAXException
- if an error occurs during the SAX events generation
-
includeView
public void includeView(View viewToInclude, View referenceView)
Include the given view to the group. Add the items of the view to include if they are not already present in the group or the reference view- Parameters:
viewToInclude
- the view to includereferenceView
- the reference view
-
copyTo
public void copyTo(ViewItem item)
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- Specified by:
copyTo
in interfaceViewItem
- Overrides:
copyTo
in classAbstractViewItemGroup
- Parameters:
item
- the copy
-
createInstance
public ViewItem createInstance()
Description copied from interface:ViewItem
Create an instance ofViewItem
- Returns:
- the created instance
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractViewItemGroup
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractViewItemGroup
-
-