ACS-4863 Move new validation method to interface as a default implementation.

This commit is contained in:
Tom Page
2023-03-24 11:44:55 +00:00
parent 10b0d7b5f0
commit 0652cea296
2 changed files with 4 additions and 6 deletions

View File

@@ -219,7 +219,10 @@ public interface Nodes
* @throws InvalidArgumentException if the specified node id is not a valid format. * @throws InvalidArgumentException if the specified node id is not a valid format.
* @throws EntityNotFoundException if the specified node was not found in the database. * @throws EntityNotFoundException if the specified node was not found in the database.
*/ */
NodeRef validateOrLookupNode(String nodeId); default NodeRef validateOrLookupNode(String nodeId)
{
return validateOrLookupNode(nodeId, null);
}
NodeRef validateOrLookupNode(String nodeId, String path); NodeRef validateOrLookupNode(String nodeId, String path);
boolean nodeMatches(NodeRef nodeRef, Set<QName> expectedTypes, Set<QName> excludedTypes); boolean nodeMatches(NodeRef nodeRef, Set<QName> expectedTypes, Set<QName> excludedTypes);

View File

@@ -649,11 +649,6 @@ public class NodesImpl implements Nodes
return nodeService.getPrimaryParent(nodeRef).getParentRef(); return nodeService.getPrimaryParent(nodeRef).getParentRef();
} }
public NodeRef validateOrLookupNode(String nodeId)
{
return validateOrLookupNode(nodeId, null);
}
public NodeRef validateOrLookupNode(String nodeId, String path) public NodeRef validateOrLookupNode(String nodeId, String path)
{ {
NodeRef parentNodeRef; NodeRef parentNodeRef;