From 0652cea2963a2ffea54277674929d252bafa08f0 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 24 Mar 2023 11:44:55 +0000 Subject: [PATCH] ACS-4863 Move new validation method to interface as a default implementation. --- remote-api/src/main/java/org/alfresco/rest/api/Nodes.java | 5 ++++- .../src/main/java/org/alfresco/rest/api/impl/NodesImpl.java | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/remote-api/src/main/java/org/alfresco/rest/api/Nodes.java b/remote-api/src/main/java/org/alfresco/rest/api/Nodes.java index 9a606ad049..a0f527b441 100644 --- a/remote-api/src/main/java/org/alfresco/rest/api/Nodes.java +++ b/remote-api/src/main/java/org/alfresco/rest/api/Nodes.java @@ -219,7 +219,10 @@ public interface Nodes * @throws InvalidArgumentException if the specified node id is not a valid format. * @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); boolean nodeMatches(NodeRef nodeRef, Set expectedTypes, Set excludedTypes); diff --git a/remote-api/src/main/java/org/alfresco/rest/api/impl/NodesImpl.java b/remote-api/src/main/java/org/alfresco/rest/api/impl/NodesImpl.java index ab1893d762..f255e61b63 100644 --- a/remote-api/src/main/java/org/alfresco/rest/api/impl/NodesImpl.java +++ b/remote-api/src/main/java/org/alfresco/rest/api/impl/NodesImpl.java @@ -649,11 +649,6 @@ public class NodesImpl implements Nodes return nodeService.getPrimaryParent(nodeRef).getParentRef(); } - public NodeRef validateOrLookupNode(String nodeId) - { - return validateOrLookupNode(nodeId, null); - } - public NodeRef validateOrLookupNode(String nodeId, String path) { NodeRef parentNodeRef;