Merge remote-tracking branch 'remotes/origin/master' into feature/RM-7006_UpdateToACS611

This commit is contained in:
cagache
2019-10-14 12:44:57 +03:00
4 changed files with 21 additions and 22 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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.
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.

View File

@@ -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")));
}
}
});