Search in sources :

Example 1 with StemScope

use of edu.internet2.middleware.grouperClient.ws.StemScope in project uhgroupings by uhawaii-system-its-ti-iam.

the class GrouperFactoryServiceImplLocal method makeWsGetGroupsResults.

@Override
public WsGetGroupsResults makeWsGetGroupsResults(String username, WsStemLookup stemLookup, StemScope stemScope) {
    WsGetGroupsResults wsGetGroupsResults = new WsGetGroupsResults();
    WsGetGroupsResult wsGetGroupsResult = new WsGetGroupsResult();
    WsGroup[] groups;
    List<WsGroup> wsGroupList = new ArrayList<>();
    List<Group> groupList = groupRepository.findByMembersUsername(username);
    for (Group group : groupList) {
        WsGroup g = new WsGroup();
        g.setName(group.getPath());
        wsGroupList.add(g);
    }
    groups = wsGroupList.toArray(new WsGroup[wsGroupList.size()]);
    wsGetGroupsResult.setWsGroups(groups);
    wsGetGroupsResults.setResults(new WsGetGroupsResult[] { wsGetGroupsResult });
    return wsGetGroupsResults;
}
Also used : WsGroup(edu.internet2.middleware.grouperClient.ws.beans.WsGroup) Group(edu.hawaii.its.api.type.Group) WsGetGroupsResult(edu.internet2.middleware.grouperClient.ws.beans.WsGetGroupsResult) WsGetGroupsResults(edu.internet2.middleware.grouperClient.ws.beans.WsGetGroupsResults) ArrayList(java.util.ArrayList) WsGroup(edu.internet2.middleware.grouperClient.ws.beans.WsGroup)

Aggregations

Group (edu.hawaii.its.api.type.Group)1 WsGetGroupsResult (edu.internet2.middleware.grouperClient.ws.beans.WsGetGroupsResult)1 WsGetGroupsResults (edu.internet2.middleware.grouperClient.ws.beans.WsGetGroupsResults)1 WsGroup (edu.internet2.middleware.grouperClient.ws.beans.WsGroup)1 ArrayList (java.util.ArrayList)1