Package org.ametys.cms.content.version
Class CompareView
- java.lang.Object
-
- org.ametys.cms.content.version.CompareView
-
- All Implemented Interfaces:
ViewItemAccessor,ViewItemContainer
class CompareView extends Object implements ViewItemContainer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classCompareView.AbstractCompareViewItemGroupprivate classCompareView.CompareElementDefinition<T>private classCompareView.CompareModelViewItemGroupprivate classCompareView.CompareSimpleViewItemGroupprivate classCompareView.CompareViewElement
-
Field Summary
Fields Modifier and Type Field Description private Set<String>_externalAndLocalMetadataprivate View_wrapped
-
Constructor Summary
Constructors Constructor Description CompareView(View fromView, Set<String> externalAndLocalMetadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_populateViewItemContainerWithWrappedElements(ViewItemContainer sourceOfCopy, ViewItemContainer toPopulate)private ViewItem_wrapViewElement(ViewItem item)voidaddViewItem(ViewItem item)Add a view item in the accessorvoidclear()Removes all items of this accessorList<ViewItem>getViewItems()Retrieves all the view items of this accessorvoidinsertViewItem(ViewItem item, int index)Insert a view item in the accessor at the given indexbooleanremoveViewItem(ViewItem item)Removes the given items of this accessor(package private) Map<String,Object>toJSON()-
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
-
-
-
-
Field Detail
-
_externalAndLocalMetadata
private final Set<String> _externalAndLocalMetadata
-
-
Constructor Detail
-
CompareView
CompareView(View fromView, Set<String> externalAndLocalMetadata)
-
-
Method Detail
-
_populateViewItemContainerWithWrappedElements
private void _populateViewItemContainerWithWrappedElements(ViewItemContainer sourceOfCopy, ViewItemContainer toPopulate)
-
_wrapViewElement
private ViewItem _wrapViewElement(ViewItem item)
-
getViewItems
public List<ViewItem> getViewItems()
Description copied from interface:ViewItemAccessorRetrieves all the view items of this accessor- Specified by:
getViewItemsin interfaceViewItemAccessor- Returns:
- the view items
-
addViewItem
public void addViewItem(ViewItem item)
Description copied from interface:ViewItemAccessorAdd a view item in the accessor- Specified by:
addViewItemin interfaceViewItemAccessor- Parameters:
item- the item to add
-
insertViewItem
public void insertViewItem(ViewItem item, int index)
Description copied from interface:ViewItemAccessorInsert a view item in the accessor at the given index- Specified by:
insertViewItemin 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:ViewItemAccessorRemoves the given items of this accessor- Specified by:
removeViewItemin interfaceViewItemAccessor- Parameters:
item- the item to remove- Returns:
trueif this accessor contained the given item,falseotherwise
-
clear
public void clear()
Description copied from interface:ViewItemAccessorRemoves all items of this accessor- Specified by:
clearin interfaceViewItemAccessor
-
toJSON
Map<String,Object> toJSON() throws ProcessingException
- Throws:
ProcessingException
-
-