質問

いくつかのグループのメンバーであるユーザーの私のJavaDelegateクラスプロパティを取得する必要があります。

ユーザーにノードREFを持っているとき、私はこの方法で彼のプロパティを取得することができます

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);
.

しかし、私はグループ名しか持っていないので、そのグループ内のユーザーのNoderefを取得する方法がわかりませんか。これについての助けは?

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top