Reputation: 76880
i'm a total newbie to java and Alfresco and i have this simple problem: i need to get all child Associations of a noderef with Association Type = "risposteAssociate". In Javascript i do something like:
var risposte = node.childAssocs["crl:risposteAssociate"];
In Java i have to do something like:
List<ChildAssociationRef> risposteAssociate = nodeService.getChildAssocs(node,....);
I've looked at the docs Here but i don't fully understand them.
EDIT - If i can get the child associations, to iterate over them i can use
for (ChildAssociationRef childAssocRef : risposteAssociate) {
// do something with each document in the workflow package
NodeRef risposta = childAssocRef.getChildRef();
}
Thanx in advance
Upvotes: 2
Views: 6705
Reputation: 48326
I think you want the getChildAssocs(NodeRef,QName,QName) nodeservice call. Something like:
nodeService.getChildAssocs(parentNodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
Upvotes: 7