如何获得具有特定关联类型的所有子关联Alfresco(Java)

编程入门 行业动态 更新时间:2024-10-11 09:19:51
本文介绍了如何获得具有特定关联类型的所有子关联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

推荐答案

我想你想要 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)

本文发布于:2023-11-28 17:42:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643349.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何获得   类型   Java   Alfresco

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!