Finished implementing tests for FreezeService

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@43590 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2012-11-13 20:17:46 +00:00
parent f274a3cb9a
commit 24db12b7df
2 changed files with 61 additions and 10 deletions

View File

@@ -486,7 +486,19 @@ public class FreezeServiceImpl implements FreezeService,
{
ParameterCheck.mandatory("nodeRef", nodeRef);
return getFrozen(nodeRef).size() > 0 ? true : false;
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(nodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
if (childAssocs != null && !childAssocs.isEmpty())
{
for (ChildAssociationRef childAssociationRef : childAssocs)
{
if (isFrozen(childAssociationRef.getChildRef()))
{
return true;
}
}
}
return false;
}
/**