Interface ContentTreeService

All Known Implementing Classes:
ContentTreeServiceImpl

public interface ContentTreeService
  • Method Details

    • getContentTreeNode

      ContentTreeNode getContentTreeNode(String path)
      Parameters:
      path - path
      Returns:
      ContentTreeNode represented by the passed path
    • getContentTreeNode

      ContentTreeNode getContentTreeNode(URI uri)
      Parameters:
      uri - uri
      Returns:
      ContentTreeNode represented by the passe uri
    • getContentTreeNode

      ContentTreeNode getContentTreeNode(Entity entity)
      Parameters:
      entity - entity to be wrapped in its corresponding ContentTreeNode implementation
      Returns:
      ContentTreeNode represented by the passed entity
    • getContentTreeNode

      ContentTreeNode getContentTreeNode(String path, ContentTreeContext contentTreeContext)
      Parameters:
      path - path
      contentTreeContext - specify the ContentTreeContext for the node
      Returns:
      ContentTreeNode represented by the passed path
    • getContentTreeNode

      ContentTreeNode getContentTreeNode(URI uri, ContentTreeContext contentTreeContext)
      Parameters:
      uri - uri
      contentTreeContext - specify the ContentTreeContext for the node
      Returns:
      ContentTreeNode represented by the passe uri
    • getContentTreeNode

      ContentTreeNode getContentTreeNode(Entity entity, ContentTreeContext contentTreeContext)
      Parameters:
      entity - entity to be wrapped in its corresponding ContentTreeNode implementation
      contentTreeContext - specify the ContentTreeContext for the node
      Returns:
      ContentTreeNode represented by the passed entity
    • getContentTreeNode

      <T extends ContentTreeNode> T getContentTreeNode(Entity entity, Class<T> expectedClass)
      Parameters:
      entity - entity to be wrapped in its corresponding ContentTreeNode implementation
      expectedClass - the concrete type of ContentTreeNode to return
      Returns:
      ContentTreeNode represented by the passed entity
    • getContentTreeNode

      <T extends ContentTreeNode> T getContentTreeNode(Entity entity, ContentTreeContext contentTreeContext, Class<T> expectedClass)
      Parameters:
      entity - entity to be wrapped in its corresponding ContentTreeNode implementation
      contentTreeContext - specify the ContentTreeContext for the node
      expectedClass - the concrete type of ContentTreeNode to return
      Returns:
      ContentTreeNode represented by the passed entity
    • getContentTreeNode

      <T extends ContentTreeNode> T getContentTreeNode(String path, Class<T> expectedClass)
      Parameters:
      path - path
      expectedClass - the concrete type of ContentTreeNode to return
      Returns:
      ContentTreeNode represented by the passed path
    • getContentTreeNode

      <T extends ContentTreeNode> T getContentTreeNode(URI uri, Class<T> expectedClass)
      Parameters:
      uri - uri
      expectedClass - the concrete type of ContentTreeNode to return
      Returns:
      ContentTreeNode represented by the passe uri
    • createContentTreeNode

      ContentTreeNode createContentTreeNode(@Nullable @Nullable ContentTreeNode parent, String modelName)
      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 node
      modelName - 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 node
      modelName - model for the new node
      expectedClass - 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 - a ContentTreeContext.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

      boolean supportsEntityModel(EntityModel entityModel)
      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

      ContentTreeNodeModel getContentTreeNodeModel(EntityModel entityModel)
      Get the ContentTreeNodeModel for e certain entity model.
      Parameters:
      entityModel - the entity model to get the ContentTreeNodeModel for.
      Returns:
      the ContentTreeNodeModel.