diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java index bdd9f6f9bf..2476370482 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java @@ -92,7 +92,7 @@ public class AddToHoldsTests extends BaseRMRestTest "permissions to perform this operation."; private static final String INVALID_TYPE_ERROR_MESSAGE = "Items added to a hold must be either a record, a " + "record folder or active content."; - private static final String LOCKED_FILE_ERROR_MESSAGE = "Locked nodes can't be added to hold"; + private static final String LOCKED_FILE_ERROR_MESSAGE = "Locked content can't be added to a hold."; private SiteModel testSite; private String holdNodeRef; private FileModel documentHeld, contentToAddToHold, contentAddToHoldNoPermission; diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/PreventActionsOnFrozenContentTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/PreventActionsOnFrozenContentTests.java index 6abe3d69b9..1f6fee87f8 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/PreventActionsOnFrozenContentTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/PreventActionsOnFrozenContentTests.java @@ -143,7 +143,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest STEP("Check the request failed."); restClient.assertStatusCodeIs(FORBIDDEN); - restClient.assertLastError().containsSummary("Frozen nodes can not be updated."); + restClient.assertLastError().containsSummary("Frozen content can't be updated."); } /* @@ -160,7 +160,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest STEP("Check the request failed."); restClient.assertStatusCodeIs(FORBIDDEN); - restClient.assertLastError().containsSummary("Frozen nodes can not be updated."); + restClient.assertLastError().containsSummary("Frozen content can't be updated."); } /* @@ -176,7 +176,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest STEP("Check the request failed."); restClient.assertStatusCodeIs(FORBIDDEN); - restClient.assertLastError().containsSummary("Frozen nodes can not be deleted."); + restClient.assertLastError().containsSummary("Frozen content can't be deleted."); } /** @@ -186,7 +186,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest */ @Test @AlfrescoTest(jira = "RM-6924") - public void copyFrozenFile() throws Exception + public void copyFrozenFile() { STEP("Copy frozen file"); String postBody = JsonBodyGenerator.keyValueJson("targetParentId",folderModel.getNodeRef()); @@ -211,7 +211,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest STEP("Check the request failed."); assertStatusCode(FORBIDDEN); - getRestAPIFactory().getRmRestWrapper().assertLastError().containsSummary("Frozen nodes can not be moved."); + getRestAPIFactory().getRmRestWrapper().assertLastError().containsSummary("Frozen content can't be moved."); } /** @@ -219,12 +219,10 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest * When I update the record folder and make the records as vital * Then I am successful and the records not held are marked as vital * And the frozen nodes have the vital record search properties updated - * - * @throws Exception */ @Test @AlfrescoTest (jira = "RM-6929") - public void updateRecordFolderVitalProperties() throws Exception + public void updateRecordFolderVitalProperties() { STEP("Update the vital record properties for the record folder"); // Create the record folder properties to update @@ -322,7 +320,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest } @AfterClass (alwaysRun = true) - public void cleanUpPreventActionsOnFrozenContent() throws Exception + public void cleanUpPreventActionsOnFrozenContent() { holdsAPI.deleteHold(getAdminUser().getUsername(), getAdminUser().getPassword(), HOLD_ONE); dataSite.usingAdmin().deleteSite(testSite); diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties index c91fb2c11a..20aedc40af 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/messages/hold-service.properties @@ -1,9 +1,9 @@ -rm.hold.not-hold=The node {0} is not a hold. -rm.hold.add-to-hold-invalid-type={0} is neither a record nor a record folder nor active content. Only records, record \ +rm.hold.not-hold={0} is not a hold. +rm.hold.add-to-hold-invalid-type={0} isn't a record, a record folder or active content. Only records, record \ folders or active content can be added to a hold. -rm.hold.add-to-hold-archived-node=Archived nodes can't be added to hold. -rm.hold.add-to-hold-locked-node=Locked nodes can't be added to hold. -rm.hold.delete-frozen-node=Frozen nodes can not be deleted. -rm.hold.delete-node-frozen-children=Can not delete node, because it contains a frozen child node. -rm.hold.move-frozen-node=Frozen nodes can not be moved. -rm.hold.update-frozen-node=Frozen nodes can not be updated. \ No newline at end of file +rm.hold.add-to-hold-archived-node=Archived content can't be added to a hold. +rm.hold.add-to-hold-locked-node=Locked content can't be added to a hold. +rm.hold.delete-frozen-node=Frozen content can't be deleted. +rm.hold.delete-node-frozen-children=Can't delete folder because it contains frozen content. +rm.hold.move-frozen-node=Frozen content can't be moved. +rm.hold.update-frozen-node=Frozen content can't be updated. \ No newline at end of file diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/UpdateHeldActiveContentTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/UpdateHeldActiveContentTest.java index a50c65a3b8..3feb8f648b 100644 --- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/UpdateHeldActiveContentTest.java +++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/hold/UpdateHeldActiveContentTest.java @@ -34,6 +34,7 @@ import org.alfresco.rest.framework.core.exceptions.PermissionDeniedException; import org.alfresco.service.cmr.model.FileNotFoundException; import org.alfresco.service.cmr.repository.ContentData; import org.alfresco.service.cmr.repository.NodeRef; +import org.springframework.extensions.surf.util.I18NUtil; import org.springframework.extensions.webscripts.GUID; /** @@ -77,7 +78,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase } catch (PermissionDeniedException pde) { - assertTrue(pde.getMessage().contains("Frozen nodes can not be deleted.")); + assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.delete-frozen-node"))); } } }); @@ -135,7 +136,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase } catch (PermissionDeniedException pde) { - assertTrue(pde.getMessage().contains("Frozen nodes can not be moved.")); + assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.move-frozen-node"))); } } }); @@ -169,7 +170,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase } catch (PermissionDeniedException pde) { - assertTrue(pde.getMessage().contains("Frozen nodes can not be updated.")); + assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.update-frozen-node"))); } } }); @@ -204,7 +205,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase } catch (PermissionDeniedException pde) { - assertTrue(pde.getMessage().contains("Frozen nodes can not be updated.")); + assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.update-frozen-node"))); } } });