Fixed CMIS object parents collection

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29621 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Florian Mü
2011-08-08 17:41:16 +00:00
parent 1945532d21
commit 282b0862e7

View File

@@ -781,13 +781,18 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
{ {
parents = new ArrayList<CMISNodeInfo>(); parents = new ArrayList<CMISNodeInfo>();
List<ChildAssociationRef> nodeParents = connector.getNodeService().getParentAssocs(nodeRef, NodeRef nodeRefForParent = (isCurrentVersion() ? getCurrentNodeNodeRef() : nodeRef);
List<ChildAssociationRef> nodeParents = connector.getNodeService().getParentAssocs(nodeRefForParent,
ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL); ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
if (nodeParents != null) if (nodeParents != null)
{ {
for (ChildAssociationRef parent : nodeParents) for (ChildAssociationRef parent : nodeParents)
{ {
parents.add(new CMISNodeInfoImpl(connector, parent.getParentRef())); if (connector.getType(parent.getParentRef()) instanceof FolderTypeDefintionWrapper)
{
parents.add(new CMISNodeInfoImpl(connector, parent.getParentRef()));
}
} }
} }
} }