ALFCOM-3110: Groups added to sites became invisible to Share client

- Root groups are now those in the default zone that are not children of groups in the same zone

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15051 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-07-01 11:39:37 +00:00
parent be07d6ca83
commit 57cd1bfd94
9 changed files with 104 additions and 69 deletions

View File

@@ -1631,24 +1631,30 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
addMissingAspects(sourceNodePair, assocTypeQName);
return assocRef;
}
public Collection<NodeRef> getNodesWithoutParentAssocsOfType(final StoreRef storeRef, final QName nodeTypeQName,
final QName assocTypeQName)
}
public Collection<ChildAssociationRef> getChildAssocsWithoutParentAssocsOfType(NodeRef parent, QName assocTypeQName)
{
final Collection<NodeRef> results = new LinkedList<NodeRef>();
// Get the parent node
Pair<Long, NodeRef> nodePair = getNodePairNotNull(parent);
Long parentNodeId = nodePair.getFirst();
NodeDaoService.NodeRefQueryCallback callback = new NodeDaoService.NodeRefQueryCallback()
final List<ChildAssociationRef> results = new ArrayList<ChildAssociationRef>(100);
NodeDaoService.ChildAssocRefQueryCallback callback = new NodeDaoService.ChildAssocRefQueryCallback()
{
public boolean handle(Pair<Long, NodeRef> nodePair)
public boolean handle(Pair<Long, ChildAssociationRef> childAssocPair, Pair<Long, NodeRef> parentNodePair,
Pair<Long, NodeRef> childNodePair)
{
results.add(nodePair.getSecond());
results.add(childAssocPair.getSecond());
return true;
}
};
nodeDaoService.getNodesWithoutParentAssocsOfType(storeRef, nodeTypeQName, assocTypeQName, callback);
// Get the child associations that meet the criteria
nodeDaoService.getChildAssocsWithoutParentAssocsOfType(parentNodeId, assocTypeQName, callback);
// done
return results;
}