Merged BRANCHES/V3.2 to HEAD:

18564: Fixed ETHREEOH-4031: ParentAssocsCache gets out of date when parent NodeRefs are modified
   18569: Fix ETHREEOH-3632: UI - View versioned properties fails when node associations are present
   18579: Fix failing unit test after CHK-11190
   18580: Fixed parentAssocsCache invalidation for parent NodeRef modification
   18597: Fixed ETHREEOH-3996


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19214 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-03-11 11:03:29 +00:00
parent 84b6373ddb
commit 426d419e53
3 changed files with 56 additions and 52 deletions

View File

@@ -188,7 +188,7 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
}
/**
* @throws UnsupportedOperationException always
* @return an empty list - ALWAYS.
*/
@Override
public List<AssociationRef> getTargetAssocs(NodeRef sourceRef, QNamePattern qnamePattern)
@@ -197,8 +197,7 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
{
return super.getTargetAssocs(sourceRef, qnamePattern);
}
// This operation is not supported for a version2 store
throw new UnsupportedOperationException(MSG_UNSUPPORTED);
// TODO: Persist these so they are retrievable
return Collections.emptyList();
}
}

View File

@@ -235,20 +235,11 @@ public class NodeServiceImplTest extends BaseVersionStoreTest
if (versionService.getVersionStoreReference().getIdentifier().equals(Version2Model.STORE_ID))
{
// V2 version store (eg. workspace://version2Store)
try
{
this.lightWeightVersionStoreNodeService.getTargetAssocs(
dummyNodeRef,
RegexQNamePattern.MATCH_ALL);
fail("This operation is not supported.");
}
catch (UnsupportedOperationException exception)
{
if (exception.getMessage() != MSG_ERR)
{
fail("Unexpected exception raised during method excution: " + exception.getMessage());
}
}
// See ETHREEOH-3632: method now doesn't blow up.
List<AssociationRef> assocs = this.lightWeightVersionStoreNodeService.getTargetAssocs(
dummyNodeRef,
RegexQNamePattern.MATCH_ALL);
assertEquals("Currently the assocs will be empty", 0, assocs.size());
}
else if (versionService.getVersionStoreReference().getIdentifier().equals(VersionModel.STORE_ID))
{