-
13-12-2019 - |
题
我需要在我的javadelegate类属性中获取一些用户的某些用户的属性。
当我有节点参考用户时,我可以在这种方式上获取其属性,例如
QName PROP_QNAME_EMAIL = QName.createQName("http://www.alfresco.org/model/content/1.0", "email");
Map<QName, Serializable> properties = nodeService.getProperties(nodeRef);
properties.get(PROP_QNAME_EMAIL);
.
但问题现在是我只有组名称,我不知道如何获得该组中的用户的结核病吗?任何帮助?
问候, aleksandar
解决方案
在平均地上,我成功完成了这一点。解决方案是:
Set<String> authorities = authorityService.getContainedAuthorities(AuthorityType.USER, p_groupName, false);
for (final String authority : authorities) {
final NodeRef person = personService.getPerson(authority);
final Map<QName, Serializable> properties = nodeService.getProperties(person);
properties.get(ContentModel.PROP_EMAIL).toString());
.
}
在此示例中,我为每个组成员获取电子邮件。
问候, aleksandar
不隶属于 StackOverflow