From 4f490b469943c86fdec6606cd20abcf52ea84c10 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Thu, 30 Nov 2017 11:27:17 +0000 Subject: [PATCH] RM-5132 Add RecordsAPI.getRecordNodeRef method. --- .../main/java/org/alfresco/rest/v0/RecordsAPI.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RecordsAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RecordsAPI.java index 32ae42221e..d587af580f 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RecordsAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RecordsAPI.java @@ -350,4 +350,17 @@ public class RecordsAPI extends BaseAPI return doPostJsonRequest(user, password, SC_OK, requestParams, ACTIONS_API); } + /** + * Retrieves the record's nodeRef + * + * @param username the user's username + * @param password its password + * @param recordName the record full name + * @param recordPath the String with which the record name starts + * @return the record nodeRef in case it exists, empty string otherwise + */ + public String getRecordNodeRef(String username, String password, String recordName, String recordPath) + { + return getNodeRefSpacesStore() + getItemNodeRef(username, password, recordPath + "/" + recordName); + } }