Class CmsResourceTreeContainer
- All Implemented Interfaces:
com.vaadin.v7.data.Container
,com.vaadin.v7.data.Container.Filterable
,com.vaadin.v7.data.Container.Hierarchical
,com.vaadin.v7.data.Container.Indexed
,com.vaadin.v7.data.Container.ItemSetChangeNotifier
,com.vaadin.v7.data.Container.Ordered
,com.vaadin.v7.data.Container.PropertySetChangeNotifier
,com.vaadin.v7.data.Container.SimpleFilterable
,com.vaadin.v7.data.Container.Sortable
,com.vaadin.v7.data.Property.ValueChangeNotifier
,Serializable
,Cloneable
The data container for the sitmeap folder selection tree.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.v7.data.util.IndexedContainer
com.vaadin.v7.data.util.IndexedContainer.ItemSetChangeEvent
Nested classes/interfaces inherited from class com.vaadin.v7.data.util.AbstractInMemoryContainer
com.vaadin.v7.data.util.AbstractInMemoryContainer.BaseItemAddEvent, com.vaadin.v7.data.util.AbstractInMemoryContainer.BaseItemRemoveEvent
Nested classes/interfaces inherited from class com.vaadin.v7.data.util.AbstractContainer
com.vaadin.v7.data.util.AbstractContainer.BaseItemSetChangeEvent, com.vaadin.v7.data.util.AbstractContainer.BasePropertySetChangeEvent
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Container
com.vaadin.v7.data.Container.Editor, com.vaadin.v7.data.Container.Filter, com.vaadin.v7.data.Container.Filterable, com.vaadin.v7.data.Container.Hierarchical, com.vaadin.v7.data.Container.Indexed, com.vaadin.v7.data.Container.ItemSetChangeEvent, com.vaadin.v7.data.Container.ItemSetChangeListener, com.vaadin.v7.data.Container.ItemSetChangeNotifier, com.vaadin.v7.data.Container.Ordered, com.vaadin.v7.data.Container.PropertySetChangeEvent, com.vaadin.v7.data.Container.PropertySetChangeListener, com.vaadin.v7.data.Container.PropertySetChangeNotifier, com.vaadin.v7.data.Container.SimpleFilterable, com.vaadin.v7.data.Container.Sortable, com.vaadin.v7.data.Container.Viewer
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Container.Indexed
com.vaadin.v7.data.Container.Indexed.ItemAddEvent, com.vaadin.v7.data.Container.Indexed.ItemRemoveEvent
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTreeItem
(CmsObject cms, CmsResource resource, CmsUUID parentId) Adds an item to the folder tree.protected void
Defines the container properties.protected void
fillProperties
(CmsObject cms, com.vaadin.v7.data.Item resourceItem, CmsResource resource, CmsUUID parentId) Fills the properties of a tree item.protected String
getName
(CmsObject cms, CmsResource resource, CmsUUID parentId) Gets the name to display for the given resource.Collection<?>
void
initRoot
(CmsObject cms, CmsResource root) Initializes the root level of the tree.void
readTreeLevel
(CmsObject cms, CmsUUID parentId) Reads the given tree level.void
removeChildren
(CmsUUID parentId) Clears the given tree level.void
update
(CmsObject cms, CmsUUID id, CmsResourceFilter filter) Updates the item for the given structure id.void
Updates the item order according to the latest sort setting.Methods inherited from class com.vaadin.v7.data.util.HierarchicalContainer
addItem, addItem, areChildrenAllowed, doFilterContainer, doSort, fireItemSetChange, getChildren, getParent, hasChildren, isIncludeParentsWhenFiltering, isRoot, moveAfterSibling, passesFilters, removeAllItems, removeItem, removeItemRecursively, removeItemRecursively, rootItemIds, setChildrenAllowed, setIncludeParentsWhenFiltering, setParent
Methods inherited from class com.vaadin.v7.data.util.IndexedContainer
addContainerFilter, addContainerFilter, addContainerProperty, addItemAfter, addItemAfter, addItemAt, addItemAt, addListener, addListener, addPropertySetChangeListener, addValueChangeListener, clone, fireItemAdded, fireItemSetChange, getContainerFilters, getContainerProperty, getContainerPropertyIds, getItemSorter, getListeners, getType, getUnfilteredItem, hasContainerFilters, registerNewItem, removeAllContainerFilters, removeContainerFilter, removeContainerFilters, removeContainerProperty, removeListener, removeListener, removePropertySetChangeListener, removeValueChangeListener, setItemSorter, sort
Methods inherited from class com.vaadin.v7.data.util.AbstractInMemoryContainer
addFilter, addItemSetChangeListener, addListener, containsId, filterAll, fireItemRemoved, fireItemsAdded, fireItemsRemoved, firstItemId, getAllItemIds, getFilteredItemIds, getFilters, getFirstVisibleItem, getIdByIndex, getItem, getItemIds, getItemIds, getSortablePropertyIds, getVisibleItemIds, indexOfId, internalAddItemAfter, internalAddItemAt, internalAddItemAtEnd, internalRemoveAllItems, internalRemoveItem, isFiltered, isFirstId, isLastId, isPropertyFiltered, lastItemId, nextItemId, prevItemId, removeAllFilters, removeFilter, removeFilters, removeItemSetChangeListener, removeListener, setAllItemIds, setFilteredItemIds, setFilters, size, sortContainer
Methods inherited from class com.vaadin.v7.data.util.AbstractContainer
fireContainerPropertySetChange, fireContainerPropertySetChange, getItemSetChangeListeners, getPropertySetChangeListeners, setItemSetChangeListeners, setPropertySetChangeListeners
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.v7.data.Container
addContainerProperty, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeContainerProperty, size
Methods inherited from interface com.vaadin.v7.data.Container.Ordered
firstItemId, isFirstId, isLastId, lastItemId, nextItemId, prevItemId
-
Field Details
-
PROPERTY_RESOURCE
Property which is used to store the CmsResource.- See Also:
-
PROPERTY_SITEMAP_CAPTION
Property which is used to store the sitemap view caption HTML.- See Also:
-
-
Constructor Details
-
CmsResourceTreeContainer
Default constructor.- Parameters:
filter
- the resource filter to use
-
-
Method Details
-
addTreeItem
Adds an item to the folder tree.- Parameters:
cms
- the CMS contextresource
- the folder resourceparentId
- the parent folder id
-
getSortableContainerPropertyIds
- Specified by:
getSortableContainerPropertyIds
in interfacecom.vaadin.v7.data.Container.Sortable
- Overrides:
getSortableContainerPropertyIds
in classcom.vaadin.v7.data.util.IndexedContainer
- See Also:
-
IndexedContainer.getSortableContainerPropertyIds()
-
initRoot
Initializes the root level of the tree.- Parameters:
cms
- the CMS contextroot
- the root folder
-
readTreeLevel
Reads the given tree level.- Parameters:
cms
- the CMS contextparentId
- the parent id
-
removeChildren
Clears the given tree level.- Parameters:
parentId
- the parent id
-
update
Updates the item for the given structure id.- Parameters:
cms
- the CMS contextid
- the structure idfilter
- the resource filter used for reading the resource- Throws:
CmsException
- if something goes wrong
-
updateSort
Updates the item order according to the latest sort setting. -
defineProperties
Defines the container properties. -
fillProperties
protected void fillProperties(CmsObject cms, com.vaadin.v7.data.Item resourceItem, CmsResource resource, CmsUUID parentId) Fills the properties of a tree item.- Parameters:
cms
- the CMS contextresourceItem
- the empty itemresource
- the resource for which the tree item is being createdparentId
- the parent id
-
getName
Gets the name to display for the given resource.- Parameters:
cms
- the CMS contextresource
- a resourceparentId
- the id of the parent of the resource- Returns:
- the name for the given resoure
-