Package ch.tocco.nice2.dms.spi.tree.ui
Class AbstractContentTreeViewProvider
java.lang.Object
ch.tocco.nice2.dms.spi.tree.ui.AbstractContentTreeViewProvider
- All Implemented Interfaces:
EntityTreeViewProvider
- Direct Known Subclasses:
AbstractDmsTreeViewProvider
,CmsTreeViewProvider
,NewsletterTreeViewProvider
public abstract class AbstractContentTreeViewProvider
extends Object
implements EntityTreeViewProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.netui.api.tree.entity.EntityTreeViewProvider
EntityTreeViewProvider.EntityTreeViewProviderDescriptor, EntityTreeViewProvider.Icon, EntityTreeViewProvider.NotInTreeException
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ContentTreeContext
protected final ContentTreeService
protected final Context
protected final EntityTreeNodeFactory
protected final ContentTreeNodePermissionEvaluatorService
protected final QueryBuilderFactory
-
Constructor Summary
ConstructorDescriptionAbstractContentTreeViewProvider
(ContentTreeService contentTreeService, Context context, EntityTreeNodeFactory entityTreeNodeFactory, QueryBuilderFactory queryBuilderFactory, ContentTreeNodePermissionEvaluatorService permissionEvaluatorService, ContentTreeContext contentTreeContext) -
Method Summary
Modifier and TypeMethodDescriptiongetChildren
(Entity entity) Load all parents of the passed entity into a listgetRoot()
getRootChildren
(TreeContext treeContext) protected QueryBuilder
getRootChildrenQuery
(TreeContext treeContext) getSearchResult
(Entity entity) Remote method for click event on tree nodes which cannot be displayed in the current entity explorerAllowed config properties are those ofExt.TreePanel
and additionally the following:openAsRoot
:[ true | false ]
set opened entity as root of the treedataRegistry
: Map with dataregistry settings (optional):enabled
: true / falseentityModels
: Array of Strings containing names of entity models to be tracked by dataregistrysearchByRelation
: the methodEntityTreeViewProvider.getSearchResult(ch.tocco.nice2.persist.core.api.entity.Entity)
is never used, it is rather searched by using related-by queries according to the relations between the involved entities as specified inEntityTreeViewProvider.getCreateRelationMap()
.getTreeNode
(Entity entity) Get a tree node for a specific entity.void
void
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.netui.api.tree.entity.EntityTreeViewProvider
getCreateRelationMap, getDescriptor, getIconMap
-
Field Details
-
contentTreeService
-
context
-
entityTreeNodeFactory
-
queryBuilderFactory
-
contentTreeContext
-
permissionEvaluatorService
-
-
Constructor Details
-
AbstractContentTreeViewProvider
public AbstractContentTreeViewProvider(ContentTreeService contentTreeService, Context context, EntityTreeNodeFactory entityTreeNodeFactory, QueryBuilderFactory queryBuilderFactory, ContentTreeNodePermissionEvaluatorService permissionEvaluatorService, ContentTreeContext contentTreeContext)
-
-
Method Details
-
getRoot
- Specified by:
getRoot
in interfaceEntityTreeViewProvider
- Returns:
- the root tree node, when opening the module
-
getChildren
- Specified by:
getChildren
in interfaceEntityTreeViewProvider
- Parameters:
entity
- reference entity- Returns:
- a list of
EntityTreeNode
representing the children for the passed entity - Throws:
TreeModelException
-
getRootChildren
- Specified by:
getRootChildren
in interfaceEntityTreeViewProvider
- Returns:
- a list of
EntityTreeNode
representing the children for the root tree node - Throws:
TreeModelException
-
getRootChildrenQuery
- Throws:
PersistException
-
getPath
Description copied from interface:EntityTreeViewProvider
Load all parents of the passed entity into a list- Specified by:
getPath
in interfaceEntityTreeViewProvider
- Parameters:
entity
- leaf entity- Returns:
- a list of entities representing the path from the root entity to the
entity
itself - Throws:
EntityTreeViewProvider.NotInTreeException
-
getSearchResult
Description copied from interface:EntityTreeViewProvider
Remote method for click event on tree nodes which cannot be displayed in the current entity explorer- Specified by:
getSearchResult
in interfaceEntityTreeViewProvider
- Parameters:
entity
- the entity contained in the tree node that fired the event- Returns:
- a list of entities that should be displayed in the default list form (could be of any model, only displaying entities of the current module)
- Throws:
TreeModelException
-
getTreeNode
Description copied from interface:EntityTreeViewProvider
Get a tree node for a specific entity. This method is called, when new values may be available and the node needs to be reloaded- Specified by:
getTreeNode
in interfaceEntityTreeViewProvider
- Parameters:
entity
- the reference entity- Returns:
- representing
EntityTreeNode
- Throws:
TreeModelException
-
getTreeConfig
Description copied from interface:EntityTreeViewProvider
Allowed config properties are those ofExt.TreePanel
and additionally the following:openAsRoot
:[ true | false ]
set opened entity as root of the treedataRegistry
: Map with dataregistry settings (optional):enabled
: true / falseentityModels
: Array of Strings containing names of entity models to be tracked by dataregistry
-
searchByRelation
: the methodEntityTreeViewProvider.getSearchResult(ch.tocco.nice2.persist.core.api.entity.Entity)
is never used, it is rather searched by using related-by queries according to the relations between the involved entities as specified inEntityTreeViewProvider.getCreateRelationMap()
.
- Specified by:
getTreeConfig
in interfaceEntityTreeViewProvider
- Returns:
- a map containing additional settings for the DwrTreePanel
-
moveInto
- Specified by:
moveInto
in interfaceEntityTreeViewProvider
- Throws:
TreeModelException
-
moveAbove
- Specified by:
moveAbove
in interfaceEntityTreeViewProvider
- Throws:
TreeModelException
-
moveBelow
- Specified by:
moveBelow
in interfaceEntityTreeViewProvider
- Throws:
TreeModelException
-