From 3e47691827a961703a76cde3c986d113dcccfb19 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Wed, 4 Jan 2017 17:17:22 +0200 Subject: [PATCH 1/2] review updates --- .../requests/igCoreAPI/RecordsAPI.java | 8 ++- .../rm/community/base/BaseRMRestTest.java | 29 +-------- .../fileplancomponents/ReadRecordTests.java | 63 +++++++++++-------- .../utils/FilePlanComponentsUtil.java | 33 ++++++++++ 4 files changed, 75 insertions(+), 58 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/igCoreAPI/RecordsAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/igCoreAPI/RecordsAPI.java index 07d2b5a099..49e5769fae 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/igCoreAPI/RecordsAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/igCoreAPI/RecordsAPI.java @@ -74,7 +74,9 @@ public class RecordsAPI extends RMModelRequest public T getRecordContentText(String recordId) throws Exception { mandatoryString("recordId", recordId); - Response response = given().auth().basic(getRMRestWrapper().getTestUser().getUsername(), getRMRestWrapper().getTestUser().getPassword()) + Response response = given().auth().basic(getRMRestWrapper().getTestUser().getUsername(), + getRMRestWrapper().getTestUser().getPassword() + ) .get("records/{recordId}/content", recordId) .andReturn(); @@ -84,10 +86,10 @@ public class RecordsAPI extends RMModelRequest } /** - * Get the html content for the electronic record + * Get the content RestHtmlResponse(Response header and body) for the electronic record * * @param recordId The id of the electronic record - * @return The content for the given record id + * @return The body and the header for the record * @throws Exception for the following cases: * */ + //FIXME Add a generic method to support retrieving binary content public T getRecordContentText(String recordId) throws Exception { mandatoryString("recordId", recordId); @@ -98,6 +99,8 @@ public class RecordsAPI extends RMModelRequest *
  • {@code recordId} does not exist
  • * */ + //FIXME Add a generic method to support retrieving binary content as we might end up + //FIXME with too many methods for differents content types public RestHtmlResponse getRecordContent(String recordId) throws Exception { mandatoryString("recordId", recordId);