Fix ALF-19749: NodeService/CopyService interface changes breaks backwards compatibility with add-ons

- This maintains binary compatibility with extensions build before 4.2
 - e.g.  GOOGLEDOCS-235 Unable to deploy latest Google Docs Enterprise AMPs onto 4.2 (HEAD-QA) 
 - Reversed ALF-19217: NodeService and CopyService APIs return modified flags
   We are back to creating redundant versions when duplicate changes are made to data


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54488 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2013-08-27 11:12:54 +00:00
parent b97ff7bae0
commit 0d781560bf
14 changed files with 119 additions and 525 deletions

View File

@@ -312,10 +312,7 @@ public class CheckOutCheckInServiceImplTest extends BaseSpringTest
this.cociService.checkin(workingCopy2, new HashMap<String, Serializable>(), null, true);
}
/**
* MNT-8789
*/
public void testCheckInVersionedNode()
public void testCheckInVersionedNode_MNT_8789()
{
String versionDescription = "This is a test version";
@@ -362,10 +359,19 @@ public class CheckOutCheckInServiceImplTest extends BaseSpringTest
// Modified by admin, but as nothing changed, test user will be put into version
assertEquals(this.userName, nodeService.getProperty(nodeA, ContentModel.PROP_MODIFIER));
assertEquals(true, nodeService.hasAspect(nodeA, ContentModel.ASPECT_VERSIONABLE));
// Save the modified date
Serializable modifiedDate = nodeService.getProperty(nodeA, ContentModel.PROP_MODIFIED);
// Now check the version
Version version = this.versionService.getCurrentVersion(nodeA);
assertNull("The Version should NOT be created as nothing has changed in the working copy", version);
assertNotNull(version);
assertEquals(versionDescription, version.getDescription());
// Admin checked in the node, but as the working copy was not modified, the modifier should not change
assertEquals(this.userName, version.getFrozenModifier());
// The date should NOT have changed, as nothing was changed in the working copy
assertEquals(true, version.getFrozenModifiedDate().equals(modifiedDate));
NodeRef versionNodeRef = version.getFrozenStateNodeRef();
assertNotNull(versionNodeRef);
nodeService.deleteNode(nodeA);
AuthenticationUtil.setFullyAuthenticatedUser(this.userName);