Interface EffectiveNodeTypeProvider


  • @ProviderType
    public interface EffectiveNodeTypeProvider
    EffectiveNodeTypeProvider... TODO
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      @NotNull EffectiveNodeType getEffectiveNodeType​(@NotNull javax.jcr.Node targetNode)
      Calculates and returns the effective node types of the given node.
      @NotNull EffectiveNodeType getEffectiveNodeType​(@NotNull org.apache.jackrabbit.oak.api.Tree tree)
      Calculates and returns the effective node types of the given tree.
      boolean isNodeType​(@NotNull java.lang.String primaryTypeName, @NotNull java.lang.Iterable<java.lang.String> mixinTypes, @NotNull java.lang.String nodeTypeName)
      Returns true if typeName is of the specified primary node type or mixin type, or a subtype thereof.
      boolean isNodeType​(@NotNull java.lang.String typeName, @NotNull java.lang.String superName)
      Returns true if typeName is of the specified primary node type or mixin type, or a subtype thereof.
      default boolean isNodeType​(@NotNull java.lang.String primaryTypeName, @NotNull java.util.Iterator<java.lang.String> mixinTypes, @NotNull java.lang.String nodeTypeName)
      Deprecated.
      boolean isNodeType​(@NotNull org.apache.jackrabbit.oak.api.Tree tree, @NotNull java.lang.String nodeTypeName)
      Returns true if this tree is of the specified primary node type or mixin type, or a subtype thereof respecting the effective node type of the tree.
    • Method Detail

      • isNodeType

        boolean isNodeType​(@NotNull
                           @NotNull org.apache.jackrabbit.oak.api.Tree tree,
                           @NotNull
                           @NotNull java.lang.String nodeTypeName)
        Returns true if this tree is of the specified primary node type or mixin type, or a subtype thereof respecting the effective node type of the tree. Returns false otherwise. Note: caution must be taken while calling this api because it doesn't offer the same strict guarantees as the Node#isNodeType(String) method in the case where the session doesn't have access to the jcr:mixinTypes property.
        Parameters:
        tree - The tree to be tested.
        nodeTypeName - The internal oak name of the node type to be tested.
        Returns:
        true if the specified node is of the given node type.
      • isNodeType

        @Deprecated
        default boolean isNodeType​(@NotNull
                                   @NotNull java.lang.String primaryTypeName,
                                   @NotNull
                                   @NotNull java.util.Iterator<java.lang.String> mixinTypes,
                                   @NotNull
                                   @NotNull java.lang.String nodeTypeName)
                            throws javax.jcr.nodetype.NoSuchNodeTypeException,
                                   javax.jcr.RepositoryException
        Deprecated.
        Returns true if typeName is of the specified primary node type or mixin type, or a subtype thereof. Returns false otherwise.
        Parameters:
        primaryTypeName - the internal oak name of the node to test
        mixinTypes - the internal oak names of the node to test.
        nodeTypeName - The internal oak name of the node type to be tested.
        Returns:
        true if the specified node type is of the given node type.
        Throws:
        javax.jcr.nodetype.NoSuchNodeTypeException - If the specified node type name doesn't refer to an existing node type.
        javax.jcr.RepositoryException - If the given node type name is invalid or if some other error occurs.
      • isNodeType

        boolean isNodeType​(@NotNull
                           @NotNull java.lang.String primaryTypeName,
                           @NotNull
                           @NotNull java.lang.Iterable<java.lang.String> mixinTypes,
                           @NotNull
                           @NotNull java.lang.String nodeTypeName)
                    throws javax.jcr.nodetype.NoSuchNodeTypeException,
                           javax.jcr.RepositoryException
        Returns true if typeName is of the specified primary node type or mixin type, or a subtype thereof. Returns false otherwise.
        Parameters:
        primaryTypeName - the internal oak name of the node to test
        mixinTypes - the internal oak names of the node to test.
        nodeTypeName - The internal oak name of the node type to be tested.
        Returns:
        true if the specified node type is of the given node type.
        Throws:
        javax.jcr.nodetype.NoSuchNodeTypeException - If the specified node type name doesn't refer to an existing node type.
        javax.jcr.RepositoryException - If the given node type name is invalid or if some other error occurs.
      • isNodeType

        boolean isNodeType​(@NotNull
                           @NotNull java.lang.String typeName,
                           @NotNull
                           @NotNull java.lang.String superName)
        Returns true if typeName is of the specified primary node type or mixin type, or a subtype thereof. Returns false otherwise.
        Parameters:
        typeName - the internal oak name of the node type to test
        superName - The internal oak name of the super type to be tested for.
        Returns:
        true if the specified node type is of the given node type.
      • getEffectiveNodeType

        @NotNull
        @NotNull EffectiveNodeType getEffectiveNodeType​(@NotNull
                                                        @NotNull javax.jcr.Node targetNode)
                                                 throws javax.jcr.RepositoryException
        Calculates and returns the effective node types of the given node. Also see JCR 2.0 Specification, Section 3.7.6.5 for the definition of the effective node type.
        Parameters:
        targetNode - the node for which the types should be calculated.
        Returns:
        all types of the given node
        Throws:
        javax.jcr.RepositoryException - if the type information can not be accessed
        See Also:
        JCR 2.0 Specification, Section 3.7.6.5
      • getEffectiveNodeType

        @NotNull
        @NotNull EffectiveNodeType getEffectiveNodeType​(@NotNull
                                                        @NotNull org.apache.jackrabbit.oak.api.Tree tree)
                                                 throws javax.jcr.RepositoryException
        Calculates and returns the effective node types of the given tree. Also see JCR 2.0 Specification, Section 3.7.6.5 for the definition of the effective node type.
        Parameters:
        tree - the tree
        Returns:
        all node types of the given tree
        Throws:
        javax.jcr.RepositoryException - if the type information can not be accessed,
        See Also:
        JCR 2.0 Specification, Section 3.7.6.5