문제

일부 그룹의 구성원 인 일부 사용자의 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를 가져 오는 방법을 모르겠습니다.이것에 대한 도움은 무엇입니까?

조사, 알렉산더

도움이 되었습니까?

해결책

평균 시간에 나는 이것을 완료하기 위해 성공했습니다.해결책은 다음과 같습니다.

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

}

이 예제에서는 모든 그룹 구성원에 대한 전자 메일을 가져옵니다.

조사, 알렉산더

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top