Package org.ametys.cms.content.version
Class CompareView.AbstractCompareViewItemGroup
- java.lang.Object
-
- org.ametys.cms.content.version.CompareView.AbstractCompareViewItemGroup
-
- All Implemented Interfaces:
ViewItem
,ViewItemAccessor
,ViewItemContainer
,ViewItemGroup
,Labelable
,ModifiableLabelable
- Direct Known Subclasses:
CompareView.CompareModelViewItemGroup
,CompareView.CompareSimpleViewItemGroup
- Enclosing class:
- CompareView
private abstract static class CompareView.AbstractCompareViewItemGroup extends Object implements ViewItemGroup
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractViewItemGroup
_wrapped
-
Fields inherited from interface org.ametys.runtime.model.ViewItemGroup
FIELDSET_ROLE, TAB_ROLE
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AbstractCompareViewItemGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addViewItem(ViewItem item)
Add a view item in the accessorvoid
clear()
Removes all items of this accessorvoid
copyTo(ViewItem item)
Copy the current view item in the given one.ViewItem
createInstance()
Create an instance ofViewItem
boolean
equals(Object obj, boolean checkDetails)
Indicates whether some other object is "equal to" this one.I18nizableText
getDescription()
Retrieves the description.I18nizableText
getLabel()
Retrieves the label.String
getName()
Get the name.String
getRole()
Retrieves the role.List<ViewItem>
getViewItems()
Retrieves all the view items of this accessorvoid
insertViewItem(ViewItem item, int index)
Insert a view item in the accessor at the given indexboolean
removeViewItem(ViewItem item)
Removes the given items of this accessorvoid
setDescription(I18nizableText description)
Set the description.void
setLabel(I18nizableText label)
Set the label.void
setName(String name)
Set the name.void
setRole(String role)
Set the role.Map<String,Object>
toJSON(DefinitionContext context)
Converts the view item in a JSON map-
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.ViewItemAccessor
addViewItems, getModelViewItem, hasModelViewItem, hasModelViewItem
-
Methods inherited from interface org.ametys.runtime.model.ViewItemGroup
copyTo
-
-
-
-
Field Detail
-
_wrapped
protected AbstractViewItemGroup _wrapped
-
-
Constructor Detail
-
AbstractCompareViewItemGroup
private AbstractCompareViewItemGroup()
-
-
Method Detail
-
toJSON
public Map<String,Object> toJSON(DefinitionContext context) throws ProcessingException
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
-
getLabel
public I18nizableText getLabel()
Description copied from interface:Labelable
Retrieves the label.
-
getDescription
public I18nizableText getDescription()
Description copied from interface:Labelable
Retrieves the description.- Specified by:
getDescription
in interfaceLabelable
- Returns:
- the description.
-
getViewItems
public List<ViewItem> getViewItems()
Description copied from interface:ViewItemAccessor
Retrieves all the view items of this accessor- Specified by:
getViewItems
in interfaceViewItemAccessor
- Returns:
- the view items
-
setName
public void setName(String name)
Description copied from interface:ModifiableLabelable
Set the name.- Specified by:
setName
in interfaceModifiableLabelable
- Parameters:
name
- the name.
-
setLabel
public void setLabel(I18nizableText label)
Description copied from interface:ModifiableLabelable
Set the label.- Specified by:
setLabel
in interfaceModifiableLabelable
- Parameters:
label
- the label.
-
setDescription
public void setDescription(I18nizableText description)
Description copied from interface:ModifiableLabelable
Set the description.- Specified by:
setDescription
in interfaceModifiableLabelable
- Parameters:
description
- the description.
-
addViewItem
public void addViewItem(ViewItem item)
Description copied from interface:ViewItemAccessor
Add a view item in the accessor- Specified by:
addViewItem
in interfaceViewItemAccessor
- Parameters:
item
- the item to add
-
insertViewItem
public void insertViewItem(ViewItem item, int index)
Description copied from interface:ViewItemAccessor
Insert a view item in the accessor at the given index- Specified by:
insertViewItem
in interfaceViewItemAccessor
- Parameters:
item
- the item to insertindex
- index at which the item has to be inserted
-
removeViewItem
public boolean removeViewItem(ViewItem item)
Description copied from interface:ViewItemAccessor
Removes the given items of this accessor- Specified by:
removeViewItem
in interfaceViewItemAccessor
- Parameters:
item
- the item to remove- Returns:
true
if this accessor contained the given item,false
otherwise
-
clear
public void clear()
Description copied from interface:ViewItemAccessor
Removes all items of this accessor- Specified by:
clear
in interfaceViewItemAccessor
-
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
-
createInstance
public ViewItem createInstance()
Description copied from interface:ViewItem
Create an instance ofViewItem
- Specified by:
createInstance
in interfaceViewItem
- Returns:
- the created instance
-
equals
public boolean equals(Object obj, boolean checkDetails)
Description copied from interface:ViewItem
Indicates whether some other object is "equal to" this one.
-
getRole
public String getRole()
Description copied from interface:ViewItemGroup
Retrieves the role.- Specified by:
getRole
in interfaceViewItemGroup
- Returns:
- the role.
-
setRole
public void setRole(String role)
Description copied from interface:ViewItemGroup
Set the role.- Specified by:
setRole
in interfaceViewItemGroup
- Parameters:
role
- the role.
-
-