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 class
CompareView.AbstractCompareViewItemGroup
private class
CompareView.CompareElementDefinition<T>
private class
CompareView.CompareModelViewItemGroup
private class
CompareView.CompareSimpleViewItemGroup
private class
CompareView.CompareViewElement
-
Field Summary
Fields Modifier and Type Field Description private Set<String>
_externalAndLocalMetadata
private 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)
void
addViewItem(ViewItem item)
Add a view item in the accessorvoid
clear()
Removes all items of this accessorList<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 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:ViewItemAccessor
Retrieves all the view items of this accessor- Specified by:
getViewItems
in interfaceViewItemAccessor
- Returns:
- the view items
-
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
-
toJSON
Map<String,Object> toJSON() throws ProcessingException
- Throws:
ProcessingException
-
-