Added primary path to the properties archived against a node.

Fixed bug in caching of ChildAssociationRef in the ChildAssoc object


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2797 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-05-09 15:22:28 +00:00
parent dcc4be56cb
commit d3708a3675
5 changed files with 39 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ import org.alfresco.service.cmr.repository.AssociationRef;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.Path;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.PermissionService;
@@ -128,6 +129,13 @@ public class ArchiveAndRestoreTest extends TestCase
PermissionService.ALL_PERMISSIONS,
true);
// grant everyone rights to the archive store
permissionService.setPermission(
archiveStoreRootNodeRef,
PermissionService.ALL_AUTHORITIES,
PermissionService.ALL_PERMISSIONS,
true);
TestWithUserUtils.createUser(USER_A, USER_A, workStoreRootNodeRef, nodeService, authenticationService);
TestWithUserUtils.createUser(USER_B, USER_B, workStoreRootNodeRef, nodeService, authenticationService);
}
@@ -318,6 +326,11 @@ public class ArchiveAndRestoreTest extends TestCase
verifyNodeExistence(b_, false);
verifyNodeExistence(bb_, true);
// check that the required properties are present and correct
Map<QName, Serializable> bb_Properties = nodeService.getProperties(bb_);
Path bb_originalPath = (Path) bb_Properties.get(ContentModel.PROP_ARCHIVED_ORIGINAL_PATH);
assertNotNull("Original path not stored", bb_originalPath);
// restore the node
nodeService.restoreNode(bb_, null, null, null);
// check