use of cz.metacentrum.perun.core.api.RichMember in project perun by CESNET.
the class MembersManagerBlImpl method convertMembersToRichMembersWithAttributes.
public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, List<RichMember> richMembers) throws InternalErrorException {
for (RichMember richMember : richMembers) {
List<Attribute> userAttributes = getPerunBl().getAttributesManagerBl().getAttributes(sess, richMember.getUser());
List<Attribute> memberAttributes = getPerunBl().getAttributesManagerBl().getAttributes(sess, richMember);
richMember.setUserAttributes(userAttributes);
richMember.setMemberAttributes(memberAttributes);
}
return richMembers;
}
use of cz.metacentrum.perun.core.api.RichMember in project perun by CESNET.
the class MembersManagerBlImpl method convertMembersToRichMembers.
public List<RichMember> convertMembersToRichMembers(PerunSession sess, List<Member> members) throws InternalErrorException {
List<RichMember> richMembers = new ArrayList<RichMember>();
for (Member member : members) {
User user = getPerunBl().getUsersManagerBl().getUserByMember(sess, member);
List<UserExtSource> userExtSources = getPerunBl().getUsersManagerBl().getUserExtSources(sess, user);
RichMember richMember = new RichMember(user, member, userExtSources);
richMembers.add(richMember);
}
return richMembers;
}
use of cz.metacentrum.perun.core.api.RichMember in project perun by CESNET.
the class MembersManagerBlImpl method findRichMembersInVo.
public List<RichMember> findRichMembersInVo(PerunSession sess, Vo vo, String searchString) throws InternalErrorException {
List<User> users = getPerunBl().getUsersManagerBl().findUsers(sess, searchString);
List<Member> members = new ArrayList<Member>();
for (User user : users) {
try {
members.add(getMembersManagerImpl().getMemberByUserId(sess, vo, user.getId()));
} catch (MemberNotExistsException e) {
// User is not member of this VO
}
}
return this.convertMembersToRichMembers(sess, this.setAllMembersSameType(members, MembershipType.DIRECT));
}
Aggregations