Class NodeTypeHierarchyComponent

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.workspaces.repository.jcr.NodeTypeHierarchyComponent
All Implemented Interfaces:
Component, Contextualizable, LogEnabled, Serviceable

Node type hierarchy component.
  • Field Details

  • Constructor Details

  • Method Details

    • contextualize

      public void contextualize(Context context) throws ContextException
      Specified by:
      contextualize in interface Contextualizable
      Throws:
      ContextException
    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • getDirectSubTypes

      public Set<String> getDirectSubTypes(javax.jcr.nodetype.NodeType nodeType, String workspaceName) throws javax.jcr.RepositoryException
      Get the sub types of a given node type in a specific workspace.
      Parameters:
      nodeType - the node type.
      workspaceName - the workspace name.
      Returns:
      the sub types of the node type in the given workspace.
      Throws:
      javax.jcr.RepositoryException - if an error occurred
    • getRecursiveSubTypes

      public Set<String> getRecursiveSubTypes(String nodeType, String workspaceName) throws javax.jcr.RepositoryException
      Get the sub types of a given node type in a specific workspace.
      Parameters:
      nodeType - the node type.
      workspaceName - the workspace name.
      Returns:
      the sub types of the node type in the given workspace.
      Throws:
      javax.jcr.RepositoryException - if an error occurred
    • getAvailableChildrenTypes

      public Set<String> getAvailableChildrenTypes(javax.jcr.nodetype.NodeDefinition nodeDef, String workspaceName) throws javax.jcr.RepositoryException
      Get the available children types for a given node type in a workspace.
      Parameters:
      nodeDef - the node definition.
      workspaceName - the workspace name.
      Returns:
      the available node types.
      Throws:
      javax.jcr.RepositoryException - if an error occurred
    • _buildTypeHierarchy

      protected void _buildTypeHierarchy(String workspaceName) throws javax.jcr.RepositoryException
      Compute the primary type hierarchy.
      Parameters:
      workspaceName - The workspace name to use
      Throws:
      javax.jcr.RepositoryException - if an error occurs.
    • _getWorkspace

      protected javax.jcr.Workspace _getWorkspace(Request request, String workspaceName) throws javax.jcr.RepositoryException, ServiceException
      Get the repository and session and set the _repository and _session protected fields
      Parameters:
      request - The request
      workspaceName - The jcr workspace
      Returns:
      the workspace.
      Throws:
      javax.jcr.RepositoryException - if an error occured.
      ServiceException - if the repository can't be looked up.