Package ch.tocco.nice2.dms.api.tree
Interface ContentTreeService
- All Known Implementing Classes:
ContentTreeServiceImpl
public interface ContentTreeService
-
Method Summary
Modifier and TypeMethodDescriptioncreateContentTreeNode
(@Nullable ContentTreeNode parent, String modelName) Create a new ContentTreeNode.<T extends ContentTreeNode>
TcreateContentTreeNode
(@Nullable ContentTreeNode parent, String modelName, Class<T> expectedClass) Create a new ContentTreeNode.@Nullable ContentTreeContext
getContentTreeContext
(ContentTreeContext.Mode mode, String module) getContentTreeNode
(Entity entity) getContentTreeNode
(Entity entity, ContentTreeContext contentTreeContext) <T extends ContentTreeNode>
TgetContentTreeNode
(Entity entity, ContentTreeContext contentTreeContext, Class<T> expectedClass) <T extends ContentTreeNode>
TgetContentTreeNode
(Entity entity, Class<T> expectedClass) getContentTreeNode
(String path) getContentTreeNode
(String path, ContentTreeContext contentTreeContext) <T extends ContentTreeNode>
TgetContentTreeNode
(String path, Class<T> expectedClass) getContentTreeNode
(URI uri) getContentTreeNode
(URI uri, ContentTreeContext contentTreeContext) <T extends ContentTreeNode>
TgetContentTreeNode
(URI uri, Class<T> expectedClass) getContentTreeNodeModel
(EntityModel entityModel) Get theContentTreeNodeModel
for e certain entity model.boolean
supportsEntityModel
(EntityModel entityModel) Tells if an entity model is supported by content tree service.
-
Method Details
-
getContentTreeNode
- Parameters:
path
- path- Returns:
ContentTreeNode
represented by the passedpath
-
getContentTreeNode
- Parameters:
uri
- uri- Returns:
ContentTreeNode
represented by the passeuri
-
getContentTreeNode
- Parameters:
entity
- entity to be wrapped in its corresponding ContentTreeNode implementation- Returns:
ContentTreeNode
represented by the passedentity
-
getContentTreeNode
- Parameters:
path
- pathcontentTreeContext
- specify theContentTreeContext
for the node- Returns:
ContentTreeNode
represented by the passedpath
-
getContentTreeNode
- Parameters:
uri
- uricontentTreeContext
- specify theContentTreeContext
for the node- Returns:
ContentTreeNode
represented by the passeuri
-
getContentTreeNode
- Parameters:
entity
- entity to be wrapped in its corresponding ContentTreeNode implementationcontentTreeContext
- specify theContentTreeContext
for the node- Returns:
ContentTreeNode
represented by the passedentity
-
getContentTreeNode
- Parameters:
entity
- entity to be wrapped in its corresponding ContentTreeNode implementationexpectedClass
- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNode
represented by the passedentity
-
getContentTreeNode
<T extends ContentTreeNode> T getContentTreeNode(Entity entity, ContentTreeContext contentTreeContext, Class<T> expectedClass) - Parameters:
entity
- entity to be wrapped in its corresponding ContentTreeNode implementationcontentTreeContext
- specify theContentTreeContext
for the nodeexpectedClass
- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNode
represented by the passedentity
-
getContentTreeNode
- Parameters:
path
- pathexpectedClass
- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNode
represented by the passedpath
-
getContentTreeNode
- Parameters:
uri
- uriexpectedClass
- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNode
represented by the passeuri
-
createContentTreeNode
Create a new ContentTreeNode. Note that this method does not start it's own transaction and thus needs to be called within a transaction.- Parameters:
parent
- parent for the new nodemodelName
- model for the new node- Returns:
- the new ContentTreeNode with the representing entity in state
Entity.State.CONCEPTION
- See Also:
-
createContentTreeNode
<T extends ContentTreeNode> T createContentTreeNode(@Nullable @Nullable ContentTreeNode parent, String modelName, Class<T> expectedClass) Create a new ContentTreeNode. Note that this method does not start it's own transaction and thus needs to be called within a transaction.- Parameters:
parent
- parent for the new nodemodelName
- model for the new nodeexpectedClass
- expected class for return type- Returns:
- the new ContentTreeNode with the representing entity in state
Entity.State.CONCEPTION
- See Also:
-
getContentTreeContext
@Nullable @Nullable ContentTreeContext getContentTreeContext(ContentTreeContext.Mode mode, String module) - Parameters:
mode
- aContentTreeContext.Mode
module
- a module name (i.e. the "moduleName" property of the entity explorer module (client)- Returns:
- a matching
ContentTreeContext
or null (if multiple are found)
-
supportsEntityModel
Tells if an entity model is supported by content tree service.- Parameters:
entityModel
- model to check- Returns:
- true if it is supported, false if not
-
getContentTreeNodeModel
Get theContentTreeNodeModel
for e certain entity model.- Parameters:
entityModel
- the entity model to get theContentTreeNodeModel
for.- Returns:
- the
ContentTreeNodeModel
.
-