Interface EffectiveNodeTypeProvider
-
- All Known Implementing Classes:
ReadOnlyNodeTypeManager,ReadWriteNodeTypeManager
@ProviderType public interface EffectiveNodeTypeProviderEffectiveNodeTypeProvider... TODO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description @NotNull EffectiveNodeTypegetEffectiveNodeType(@NotNull Node targetNode)Calculates and returns the effective node types of the given node.@NotNull EffectiveNodeTypegetEffectiveNodeType(@NotNull Tree tree)Calculates and returns the effective node types of the given tree.default booleanisNodeType(@NotNull String primaryTypeName, @NotNull Iterable<String> mixinTypes, @NotNull String nodeTypeName)Deprecated.useisNodeType(String, Supplier, String)insteadbooleanisNodeType(@NotNull String typeName, @NotNull String superName)ReturnstrueiftypeNameis of the specified primary node type or mixin type, or a subtype thereof.booleanisNodeType(@NotNull String primaryTypeName, @NotNull Supplier<Iterable<String>> mixinTypes, @NotNull String nodeTypeName)ReturnstrueiftypeNameis of the specified primary node type or mixin type, or a subtype thereof.default booleanisNodeType(@NotNull String primaryTypeName, @NotNull Iterator<String> mixinTypes, @NotNull String nodeTypeName)Deprecated.useisNodeType(String, Iterable, String)insteadbooleanisNodeType(@NotNull Tree tree, @NotNull String nodeTypeName)Returnstrueif this tree is of the specified primary node type or mixin type, or a subtype thereof respecting the effective node type of thetree.
-
-
-
Method Detail
-
isNodeType
boolean isNodeType(@NotNull @NotNull Tree tree, @NotNull @NotNull String nodeTypeName)Returnstrueif this tree is of the specified primary node type or mixin type, or a subtype thereof respecting the effective node type of thetree. Returnsfalseotherwise. Note: caution must be taken while calling this api because it doesn't offer the same strict guarantees as theNode#isNodeType(String)method in the case where the session doesn't have access to thejcr:mixinTypesproperty.- 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.useisNodeType(String, Iterable, String)insteadReturnstrueiftypeNameis of the specified primary node type or mixin type, or a subtype thereof. Returnsfalseotherwise.- Parameters:
primaryTypeName- the internal oak name of the node to testmixinTypes- the internal oak names of the node to test.nodeTypeName- The internal oak name of the node type to be tested.- Returns:
trueif 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
default boolean isNodeType(@NotNull @NotNull String primaryTypeName, @NotNull @NotNull Iterable<String> mixinTypes, @NotNull @NotNull String nodeTypeName) throws NoSuchNodeTypeException, RepositoryExceptionDeprecated.useisNodeType(String, Supplier, String)insteadReturnstrueiftypeNameis of the specified primary node type or mixin type, or a subtype thereof. Returnsfalseotherwise.- Parameters:
primaryTypeName- the internal oak name of the node to testmixinTypes- the internal oak names of the node to test.nodeTypeName- The internal oak name of the node type to be tested.- Returns:
trueif 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 Supplier<Iterable<String>> mixinTypes, @NotNull @NotNull String nodeTypeName) throws NoSuchNodeTypeException, RepositoryExceptionReturnstrueiftypeNameis of the specified primary node type or mixin type, or a subtype thereof. Returnsfalseotherwise.- Parameters:
primaryTypeName- the internal oak name of the node to testmixinTypes- the internal oak names of the node to test.nodeTypeName- The internal oak name of the node type to be tested.- Returns:
trueif 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)ReturnstrueiftypeNameis of the specified primary node type or mixin type, or a subtype thereof. Returnsfalseotherwise.- Parameters:
typeName- the internal oak name of the node type to testsuperName- The internal oak name of the super type to be tested for.- Returns:
trueif the specified node type is of the given node type.
-
getEffectiveNodeType
@NotNull @NotNull EffectiveNodeType getEffectiveNodeType(@NotNull @NotNull Node targetNode) throws 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:
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 Tree tree) throws 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:
RepositoryException- if the type information can not be accessed,- See Also:
- JCR 2.0 Specification, Section 3.7.6.5
-
-