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.ItemSetChangeEventNested classes/interfaces inherited from class com.vaadin.v7.data.util.AbstractInMemoryContainer
com.vaadin.v7.data.util.AbstractInMemoryContainer.BaseItemAddEvent, com.vaadin.v7.data.util.AbstractInMemoryContainer.BaseItemRemoveEventNested classes/interfaces inherited from class com.vaadin.v7.data.util.AbstractContainer
com.vaadin.v7.data.util.AbstractContainer.BaseItemSetChangeEvent, com.vaadin.v7.data.util.AbstractContainer.BasePropertySetChangeEventNested 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.ViewerNested 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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTreeItem(CmsObject cms, CmsResource resource, CmsUUID parentId) Adds an item to the folder tree.protected voidDefines the container properties.protected voidfillProperties(CmsObject cms, com.vaadin.v7.data.Item resourceItem, CmsResource resource, CmsUUID parentId) Fills the properties of a tree item.protected StringgetName(CmsObject cms, CmsResource resource, CmsUUID parentId) Gets the name to display for the given resource.Collection<?> voidinitRoot(CmsObject cms, CmsResource root) Initializes the root level of the tree.voidreadTreeLevel(CmsObject cms, CmsUUID parentId) Reads the given tree level.voidremoveChildren(CmsUUID parentId) Clears the given tree level.voidupdate(CmsObject cms, CmsUUID id, CmsResourceFilter filter) Updates the item for the given structure id.voidUpdates 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, setParentMethods 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, sortMethods 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, sortContainerMethods inherited from class com.vaadin.v7.data.util.AbstractContainer
fireContainerPropertySetChange, fireContainerPropertySetChange, getItemSetChangeListeners, getPropertySetChangeListeners, setItemSetChangeListeners, setPropertySetChangeListenersMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.v7.data.Container
addContainerProperty, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeContainerProperty, sizeMethods 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:
getSortableContainerPropertyIdsin interfacecom.vaadin.v7.data.Container.Sortable- Overrides:
getSortableContainerPropertyIdsin classcom.vaadin.v7.data.util.IndexedContainer- See Also:
-
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
-