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 ContentTreeContextgetContentTreeContext(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 theContentTreeNodeModelfor e certain entity model.booleansupportsEntityModel(EntityModel entityModel) Tells if an entity model is supported by content tree service.
-
Method Details
-
getContentTreeNode
- Parameters:
path- path- Returns:
ContentTreeNoderepresented by the passedpath
-
getContentTreeNode
- Parameters:
uri- uri- Returns:
ContentTreeNoderepresented by the passeuri
-
getContentTreeNode
- Parameters:
entity- entity to be wrapped in its corresponding ContentTreeNode implementation- Returns:
ContentTreeNoderepresented by the passedentity
-
getContentTreeNode
- Parameters:
path- pathcontentTreeContext- specify theContentTreeContextfor the node- Returns:
ContentTreeNoderepresented by the passedpath
-
getContentTreeNode
- Parameters:
uri- uricontentTreeContext- specify theContentTreeContextfor the node- Returns:
ContentTreeNoderepresented by the passeuri
-
getContentTreeNode
- Parameters:
entity- entity to be wrapped in its corresponding ContentTreeNode implementationcontentTreeContext- specify theContentTreeContextfor the node- Returns:
ContentTreeNoderepresented by the passedentity
-
getContentTreeNode
- Parameters:
entity- entity to be wrapped in its corresponding ContentTreeNode implementationexpectedClass- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNoderepresented 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 theContentTreeContextfor the nodeexpectedClass- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNoderepresented by the passedentity
-
getContentTreeNode
- Parameters:
path- pathexpectedClass- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNoderepresented by the passedpath
-
getContentTreeNode
- Parameters:
uri- uriexpectedClass- the concrete type of ContentTreeNode to return- Returns:
ContentTreeNoderepresented 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.Modemodule- a module name (i.e. the "moduleName" property of the entity explorer module (client)- Returns:
- a matching
ContentTreeContextor 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 theContentTreeNodeModelfor e certain entity model.- Parameters:
entityModel- the entity model to get theContentTreeNodeModelfor.- Returns:
- the
ContentTreeNodeModel.
-