本文介绍了如何获得具有特定关联类型的所有子关联Alfresco(Java)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是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
推荐答案
我想你想要 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!