如何获取具有特定关联类型 Alfresco (Java) 的所有子关联 [英] How to get all Child associations with a specific Association Type Alfresco (Java)
问题描述
我是 Java 和 Alfresco 的新手,我有一个简单的问题:我需要使用 Association Type = "risposteAssociate" 获取 noderef 的所有子关联.在 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();
}
提前谢谢
推荐答案
我想你想要 getChildAssocs(NodeRef,QName,QName) 节点服务调用.类似的东西:
I think you want the getChildAssocs(NodeRef,QName,QName) nodeservice call. Something like:
nodeService.getChildAssocs(parentNodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
这篇关于如何获取具有特定关联类型 Alfresco (Java) 的所有子关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!