Interface DefinitionProvider
- All Known Implementing Classes:
ReadOnlyNodeTypeManager,ReadWriteNodeTypeManager
DefinitionProvider... TODO
-
Method Summary
Modifier and TypeMethodDescription@NotNull NodeDefinitiongetDefinition(@NotNull Tree parent, @NotNull String nodeName) Returns the node definition for a child node ofparentnamednodeNamewith a default primary type.@NotNull PropertyDefinitiongetDefinition(@NotNull Tree parent, @NotNull PropertyState propertyState, boolean exactTypeMatch) Calculates the applicable definition for the property state under the given parent tree.@NotNull NodeDefinitiongetDefinition(@NotNull Tree parent, @NotNull Tree targetNode) Calculates the applicable definition for the child node under the given parent node.@NotNull NodeDefinition
-
Method Details
-
getRootDefinition
- Throws:
RepositoryException
-
getDefinition
@NotNull @NotNull NodeDefinition getDefinition(@NotNull @NotNull Tree parent, @NotNull @NotNull String nodeName) throws ConstraintViolationException, RepositoryException Returns the node definition for a child node ofparentnamednodeNamewith a default primary type. First the non-residual child node definitions ofparentare checked matching the given node name. Then the residual definitions are checked.- Parameters:
parent- the parent node.nodeName- The internal oak name of the child node.- Returns:
- the applicable node definition.
- Throws:
ConstraintViolationException- If no matching definition can be found.RepositoryException- If another error occurs.
-
getDefinition
@NotNull @NotNull NodeDefinition getDefinition(@NotNull @NotNull Tree parent, @NotNull @NotNull Tree targetNode) throws ConstraintViolationException, RepositoryException Calculates the applicable definition for the child node under the given parent node.- Parameters:
parent- The parent node.targetNode- The child node for which the definition is calculated.- Returns:
- the definition of the target node.
- Throws:
ConstraintViolationException- If no matching definition can be found.RepositoryException- If another error occurs.
-
getDefinition
@NotNull @NotNull PropertyDefinition getDefinition(@NotNull @NotNull Tree parent, @NotNull @NotNull PropertyState propertyState, boolean exactTypeMatch) throws ConstraintViolationException, RepositoryException Calculates the applicable definition for the property state under the given parent tree.- Parameters:
parent- The parent tree.propertyState- The target property.- Returns:
- the definition for the target property.
- Throws:
ConstraintViolationException- If no matching definition can be found.RepositoryException- If another error occurs.
-