Interface EffectiveNodeTypeProvider

    • Method Detail

      • isNodeType

        boolean isNodeType​(@NotNull
                           @NotNull Tree tree,
                           @NotNull
                           @NotNull 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 String primaryTypeName,
                                   @NotNull
                                   @NotNull Iterator<String> mixinTypes,
                                   @NotNull
                                   @NotNull String nodeTypeName)
                            throws NoSuchNodeTypeException,
                                   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:
        NoSuchNodeTypeException - If the specified node type name doesn't refer to an existing node type.
        RepositoryException - If the given node type name is invalid or if some other error occurs.
      • isNodeType

        boolean isNodeType​(@NotNull
                           @NotNull String primaryTypeName,
                           @NotNull
                           @NotNull Iterable<String> mixinTypes,
                           @NotNull
                           @NotNull String nodeTypeName)
                    throws NoSuchNodeTypeException,
                           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:
        NoSuchNodeTypeException - If the specified node type name doesn't refer to an existing node type.
        RepositoryException - If the given node type name is invalid or if some other error occurs.
      • isNodeType

        boolean isNodeType​(@NotNull
                           @NotNull String typeName,
                           @NotNull
                           @NotNull 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.