Package org.ametys.runtime.model
Class SimpleViewItemGroup
- java.lang.Object
-
- org.ametys.runtime.model.AbstractViewItemGroup
-
- org.ametys.runtime.model.SimpleViewItemGroup
-
- All Implemented Interfaces:
ViewItem
,ViewItemContainer
,ViewItemGroup
,Labelable
,ModifiableLabelable
public class SimpleViewItemGroup extends AbstractViewItemGroup implements ModifiableLabelable
Simple group of view items
-
-
Field Summary
Fields Modifier and Type Field Description private I18nizableText
_description
private I18nizableText
_label
private String
_name
-
Fields inherited from class org.ametys.runtime.model.AbstractViewItemGroup
_children, _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
copyGroupItem(SimpleViewItemGroup groupToCopy, View referenceView)
Copy the given group to the current one.I18nizableText
getDescription()
Retrieves the description.I18nizableText
getLabel()
Retrieves the label.String
getName()
Get the name.void
includeView(View viewToInclude, View referenceView)
Include the given view to the group.void
setDescription(I18nizableText description)
Set the description.void
setLabel(I18nizableText label)
Set the label.void
setName(String name)
Set the name.Map<String,Object>
toJSON()
Converts the view item in a JSON map-
Methods inherited from class org.ametys.runtime.model.AbstractViewItemGroup
addViewItem, getRole, getViewItems, insertViewItem, setRole
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.runtime.model.ViewItemContainer
getModelViewItem, hasModelViewItem
-
-
-
-
Field Detail
-
_label
private I18nizableText _label
-
_description
private I18nizableText _description
-
-
Constructor Detail
-
SimpleViewItemGroup
public SimpleViewItemGroup()
-
-
Method Detail
-
setName
public void setName(String name)
Description copied from interface:ModifiableLabelable
Set the name.- Specified by:
setName
in interfaceModifiableLabelable
- Parameters:
name
- the name.
-
getLabel
public I18nizableText getLabel()
Description copied from interface:Labelable
Retrieves the label.
-
setLabel
public void setLabel(I18nizableText label)
Description copied from interface:ModifiableLabelable
Set the label.- Specified by:
setLabel
in interfaceModifiableLabelable
- Parameters:
label
- the label.
-
getDescription
public I18nizableText getDescription()
Description copied from interface:Labelable
Retrieves the description.- Specified by:
getDescription
in interfaceLabelable
- Returns:
- the description.
-
setDescription
public void setDescription(I18nizableText description)
Description copied from interface:ModifiableLabelable
Set the description.- Specified by:
setDescription
in interfaceModifiableLabelable
- Parameters:
description
- the description.
-
toJSON
public Map<String,Object> toJSON() throws ProcessingException
Description copied from interface:ViewItem
Converts the view item in a JSON map- Specified by:
toJSON
in interfaceViewItem
- Returns:
- The view item as a JSON map
- Throws:
ProcessingException
- If an error occurs when converting the view item
-
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
-
copyGroupItem
public void copyGroupItem(SimpleViewItemGroup groupToCopy, View referenceView)
Copy the given group to the current one. Add the items of the group to copy if they are not already present in the group or the reference view- Parameters:
groupToCopy
- the group to copyreferenceView
- the reference view
-
-