info.magnolia.ui.workbench.tree
Class HierarchicalJcrContainer
java.lang.Object
info.magnolia.ui.workbench.container.AbstractContainer
info.magnolia.ui.workbench.container.AbstractJcrContainer
info.magnolia.ui.workbench.tree.HierarchicalJcrContainer
- All Implemented Interfaces:
- com.vaadin.data.Container, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.Sortable, Serializable
- Direct Known Subclasses:
- UserContainer
public class HierarchicalJcrContainer
- extends AbstractJcrContainer
- implements com.vaadin.data.Container.Hierarchical
Hierarchical implementation of AbstractJcrContainer
.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface com.vaadin.data.Container |
com.vaadin.data.Container.Editor, com.vaadin.data.Container.Filter, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeEvent, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeEvent, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.SimpleFilterable, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer |
Fields inherited from class info.magnolia.ui.workbench.container.AbstractJcrContainer |
ASCENDING_KEYWORD, DEFAULT_CACHE_RATIO, DEFAULT_NODE_TYPE, DEFAULT_PAGE_LENGTH, DESCENDING_KEYWORD, JCR_NAME_FUNCTION, ORDER_BY, PROPERTY_NAME_AND_UUID_SEPARATOR, SELECT_TEMPLATE, SELECTOR_NAME, WHERE_TEMPLATE_FOR_PATH |
Methods inherited from class info.magnolia.ui.workbench.container.AbstractJcrContainer |
addItem, addItem, addItemAfter, addItemAfter, addItemAt, addItemAt, addItemSetChangeListener, addListener, addSortableProperty, clearItemIndexes, constructJCRQuery, containsId, executeQuery, findSearchableNodeTypes, fireItemSetChange, firstItemId, getCacheRatio, getContainerProperty, getCurrentOffset, getDefaultOrderBy, getIdByIndex, getItem, getItemIds, getItemIds, getItemIndexes, getJcrItem, getJcrNameOrderByFunction, getMainNodeType, getPageLength, getQuerySelectStatement, getQueryWhereClause, getQueryWhereClauseNodeTypes, getQueryWhereClauseWorkspacePath, getSearchableNodeTypes, getWorkbenchDefinition, getWorkspace, handleRepositoryException, indexOfId, isFirstId, isLastId, lastItemId, nextItemId, prevItemId, removeAllItems, removeItem, removeItemSetChangeListener, removeListener, resetOffset, setCacheRatio, setPageLength, setSize, size, sort, updateSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.data.Container.Hierarchical |
removeItem |
Methods inherited from interface com.vaadin.data.Container |
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, size |
HierarchicalJcrContainer
public HierarchicalJcrContainer(WorkbenchDefinition workbenchDefinition)
getChildren
public Collection<String> getChildren(Object itemId)
- Specified by:
getChildren
in interface com.vaadin.data.Container.Hierarchical
getParent
public String getParent(Object itemId)
- Specified by:
getParent
in interface com.vaadin.data.Container.Hierarchical
rootItemIds
public Collection<String> rootItemIds()
- Specified by:
rootItemIds
in interface com.vaadin.data.Container.Hierarchical
refresh
public void refresh()
- Description copied from class:
AbstractJcrContainer
- Refreshes the container - clears all caches and resets size and offset. Does NOT remove sorting or filtering
rules!
- Overrides:
refresh
in class AbstractJcrContainer
setParent
public boolean setParent(Object itemId,
Object newParentId)
throws UnsupportedOperationException
- Specified by:
setParent
in interface com.vaadin.data.Container.Hierarchical
- Throws:
UnsupportedOperationException
areChildrenAllowed
public boolean areChildrenAllowed(Object itemId)
- Specified by:
areChildrenAllowed
in interface com.vaadin.data.Container.Hierarchical
setChildrenAllowed
public boolean setChildrenAllowed(Object itemId,
boolean areChildrenAllowed)
throws UnsupportedOperationException
- Specified by:
setChildrenAllowed
in interface com.vaadin.data.Container.Hierarchical
- Throws:
UnsupportedOperationException
isRoot
public boolean isRoot(Object itemId)
- Specified by:
isRoot
in interface com.vaadin.data.Container.Hierarchical
hasChildren
public boolean hasChildren(Object itemId)
- Specified by:
hasChildren
in interface com.vaadin.data.Container.Hierarchical
createContainerIds
protected Collection<String> createContainerIds(Collection<javax.jcr.Item> children)
getSortableContainerPropertyIds
public List<String> getSortableContainerPropertyIds()
- Specified by:
getSortableContainerPropertyIds
in interface com.vaadin.data.Container.Sortable
- Overrides:
getSortableContainerPropertyIds
in class AbstractJcrContainer
getChildren
public Collection<javax.jcr.Item> getChildren(javax.jcr.Item item)
isNodeVisible
protected boolean isNodeVisible(javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getRootItemIds
public Collection<javax.jcr.Item> getRootItemIds()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
isRoot
public boolean isRoot(javax.jcr.Item item)
throws javax.jcr.RepositoryException
- Checks if an item is a root. Since root node is never shown, we consider its child nodes and properties as roots
to remove unnecessary offset in trees.
- Throws:
javax.jcr.RepositoryException
moveItem
public boolean moveItem(javax.jcr.Item source,
javax.jcr.Item target)
moveItemBefore
public boolean moveItemBefore(javax.jcr.Item source,
javax.jcr.Item target)
moveItemAfter
public boolean moveItemAfter(javax.jcr.Item source,
javax.jcr.Item target)
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.