我是java和Alfresco的新手,我有这个简单的问题:我需要获得一个noderef的所有子关联,其中Association Type =risposteAssociate。在Javascript中,我执行以下操作:
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"];在Java中我必须做类似的事情:
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
推荐答案我想你想要 getChildAssocs(NodeRef,QName,QName) nodeservice调用。类似于:
I think you want the getChildAssocs(NodeRef,QName,QName) nodeservice call. Something like:
nodeService.getChildAssocs(parentNodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);更多推荐
如何获得具有特定关联类型的所有子关联Alfresco(Java)
发布评论