public class HierarchicalJcrContainer extends AbstractJcrContainer implements com.vaadin.v7.data.Container.Hierarchical
AbstractJcrContainer
.Modifier and Type | Class and Description |
---|---|
protected class |
HierarchicalJcrContainer.ItemsSortedEvent
Implementation of items sorted event.
|
AbstractContainer.ItemSetChangeEvent, AbstractContainer.PropertySetChangeEvent
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
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, sorters, WHERE_TEMPLATE_FOR_PATH
Constructor and Description |
---|
HierarchicalJcrContainer(JcrContentConnectorDefinition definition) |
Modifier and Type | Method and Description |
---|---|
boolean |
areChildrenAllowed(Object itemId) |
protected Collection<JcrItemId> |
createContainerIds(Collection<javax.jcr.Item> children) |
Collection<javax.jcr.Item> |
getChildren(javax.jcr.Item item) |
Collection<JcrItemId> |
getChildren(Object itemId) |
JcrItemId |
getParent(Object itemId) |
protected String |
getQueryWhereClause() |
protected String |
getQueryWhereClauseNodeTypes() |
Collection<javax.jcr.Item> |
getRootItemIds() |
protected javax.jcr.Node |
getRootNode() |
boolean |
hasChildren(Object itemId) |
boolean |
isIncludingSystemProperties() |
protected boolean |
isNodeVisible(javax.jcr.Node node) |
boolean |
isRoot(javax.jcr.Item item)
Checks if an item is a root.
|
boolean |
isRoot(Object itemId) |
boolean |
isSortable() |
void |
refresh()
Refreshes the container - clears all caches and resets size and offset.
|
Collection<JcrItemId> |
rootItemIds() |
boolean |
setChildrenAllowed(Object itemId,
boolean areChildrenAllowed) |
void |
setIncludeSystemProperties(boolean includingSystemProperties) |
boolean |
setParent(Object itemId,
Object newParentId) |
void |
setSortable(boolean sortable) |
void |
sort(Object[] propertyId,
boolean[] ascending)
******************************************
|
addItem, addItem, addItemAfter, addItemAfter, addItemAt, addItemAt, addItemSetChangeListener, addListener, addSortableProperty, clearItemIndexes, constructJCRQuery, containsId, ensureItemIndices, executeQuery, findSearchableNodeTypes, fireItemSetChange, fireItemSetChange, firstItemId, getCacheRatio, getConfiguration, getContainerProperty, getCurrentOffset, getDefaultOrderBy, getIdByIndex, getItem, getItemIds, getItemIds, getItemIndexes, getJcrItem, getJcrNameOrderByFunction, getMainNodeType, getPage, getPageLength, getQuerySelectStatement, getQueryWhereClauseWorkspacePath, getSearchableNodeTypes, getSortableContainerPropertyIds, getWorkspace, handleRepositoryException, indexOfId, isFirstId, isLastId, lastItemId, nextItemId, prevItemId, removeAllItems, removeItem, removeItemSetChangeListener, removeListener, resetOffset, setCacheRatio, setPageLength, setSize, size, updateSize
addContainerProperty, getContainerPropertyIds, getType, removeContainerProperty
public HierarchicalJcrContainer(JcrContentConnectorDefinition definition)
public Collection<JcrItemId> getChildren(Object itemId)
getChildren
in interface com.vaadin.v7.data.Container.Hierarchical
public JcrItemId getParent(Object itemId)
getParent
in interface com.vaadin.v7.data.Container.Hierarchical
public Collection<JcrItemId> rootItemIds()
rootItemIds
in interface com.vaadin.v7.data.Container.Hierarchical
public void refresh()
AbstractJcrContainer
refresh
in interface Refreshable
refresh
in class AbstractJcrContainer
public boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException
setParent
in interface com.vaadin.v7.data.Container.Hierarchical
UnsupportedOperationException
public boolean areChildrenAllowed(Object itemId)
areChildrenAllowed
in interface com.vaadin.v7.data.Container.Hierarchical
public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException
setChildrenAllowed
in interface com.vaadin.v7.data.Container.Hierarchical
UnsupportedOperationException
public boolean isRoot(Object itemId)
isRoot
in interface com.vaadin.v7.data.Container.Hierarchical
public boolean hasChildren(Object itemId)
hasChildren
in interface com.vaadin.v7.data.Container.Hierarchical
public void sort(Object[] propertyId, boolean[] ascending)
AbstractJcrContainer
sort
in interface com.vaadin.v7.data.Container.Sortable
sort
in class AbstractJcrContainer
public void setIncludeSystemProperties(boolean includingSystemProperties)
public boolean isIncludingSystemProperties()
protected Collection<JcrItemId> createContainerIds(Collection<javax.jcr.Item> children)
public Collection<javax.jcr.Item> getChildren(javax.jcr.Item item)
protected boolean isNodeVisible(javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public Collection<javax.jcr.Item> getRootItemIds() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean isRoot(javax.jcr.Item item) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected String getQueryWhereClause()
getQueryWhereClause
in class AbstractJcrContainer
AbstractJcrContainer.getQueryWhereClauseNodeTypes()
,
AbstractJcrContainer.getQueryWhereClauseWorkspacePath()
protected String getQueryWhereClauseNodeTypes()
getQueryWhereClauseNodeTypes
in class AbstractJcrContainer
hideInList
property is true or the node is of type mgnl:folder
(custom implementations of this method may still decide to display folders). Assuming a node types declaration like the following
... + workbench + nodeTypes + foo * name = nt:foo + bar * name = nt:bar * hideInList = true + baz (a mixin type) * name = nt:baz ...this method will return the following string
[jcr:primaryType] = 'nt:foo' or [jcr:mixinTypes] = 'baz'
. This will eventually be used to restrict the node types to be displayed in list views and searched for
in search views, i.e. select * from [nt:base] where ([jcr:primaryType] = 'nt:foo' or [jcr:mixinTypes] = 'baz')
.AbstractJcrContainer.findSearchableNodeTypes()
protected javax.jcr.Node getRootNode() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean isSortable()
public void setSortable(boolean sortable)
Copyright © 2020 Magnolia International Ltd.. All rights reserved.