Search in sources :

Example 1 with WsGroupSaveResults

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

the class GrouperFactoryServiceImpl method addCompositeGroup.

@Override
public WsGroupSaveResults addCompositeGroup(String username, String parentGroupPath, String compositeType, String leftGroupPath, String rightGroupPath) {
    WsGroupToSave groupToSave = new WsGroupToSave();
    WsGroup group = new WsGroup();
    WsGroupDetail wsGroupDetail = new WsGroupDetail();
    // get the left and right groups from the database/grouper
    WsGroup leftGroup = makeWsFindGroupsResults(leftGroupPath).getGroupResults()[0];
    WsGroup rightGroup = makeWsFindGroupsResults(rightGroupPath).getGroupResults()[0];
    wsGroupDetail.setCompositeType(compositeType);
    wsGroupDetail.setLeftGroup(leftGroup);
    wsGroupDetail.setRightGroup(rightGroup);
    group.setName(parentGroupPath);
    group.setDetail(wsGroupDetail);
    groupToSave.setWsGroup(group);
    WsSubjectLookup lookup = makeWsSubjectLookup(username);
    return new GcGroupSave().addGroupToSave(groupToSave).assignActAsSubject(lookup).execute();
}
Also used : WsGroupDetail(edu.internet2.middleware.grouperClient.ws.beans.WsGroupDetail) WsSubjectLookup(edu.internet2.middleware.grouperClient.ws.beans.WsSubjectLookup) GcGroupSave(edu.internet2.middleware.grouperClient.api.GcGroupSave) WsGroup(edu.internet2.middleware.grouperClient.ws.beans.WsGroup) WsGroupToSave(edu.internet2.middleware.grouperClient.ws.beans.WsGroupToSave)

Example 2 with WsGroupSaveResults

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

the class GrouperFactoryServiceImpl method addEmptyGroup.

@Override
public WsGroupSaveResults addEmptyGroup(String username, String path) {
    WsGroupToSave groupToSave = new WsGroupToSave();
    WsGroupLookup groupLookup = makeWsGroupLookup(path);
    WsGroup group = new WsGroup();
    group.setName(path);
    groupToSave.setWsGroup(group);
    groupToSave.setWsGroupLookup(groupLookup);
    WsSubjectLookup subjectLookup = makeWsSubjectLookup(username);
    return new GcGroupSave().addGroupToSave(groupToSave).assignActAsSubject(subjectLookup).execute();
}
Also used : WsSubjectLookup(edu.internet2.middleware.grouperClient.ws.beans.WsSubjectLookup) GcGroupSave(edu.internet2.middleware.grouperClient.api.GcGroupSave) WsGroup(edu.internet2.middleware.grouperClient.ws.beans.WsGroup) WsGroupToSave(edu.internet2.middleware.grouperClient.ws.beans.WsGroupToSave) WsGroupLookup(edu.internet2.middleware.grouperClient.ws.beans.WsGroupLookup)

Example 3 with WsGroupSaveResults

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

the class GrouperFactoryServiceImplLocal method addEmptyGroup.

@Override
public WsGroupSaveResults addEmptyGroup(String username, String path) {
    Group newGroup = new Group(path);
    groupRepository.save(newGroup);
    WsGroupSaveResults wsGroupSaveResults = new WsGroupSaveResults();
    WsResultMeta wsResultMeta = new WsResultMeta();
    wsResultMeta.setResultCode(SUCCESS);
    wsGroupSaveResults.setResultMetadata(wsResultMeta);
    return wsGroupSaveResults;
}
Also used : WsGroup(edu.internet2.middleware.grouperClient.ws.beans.WsGroup) Group(edu.hawaii.its.api.type.Group) WsGroupSaveResults(edu.internet2.middleware.grouperClient.ws.beans.WsGroupSaveResults) WsResultMeta(edu.internet2.middleware.grouperClient.ws.beans.WsResultMeta)

Aggregations

WsGroup (edu.internet2.middleware.grouperClient.ws.beans.WsGroup)3 GcGroupSave (edu.internet2.middleware.grouperClient.api.GcGroupSave)2 WsGroupToSave (edu.internet2.middleware.grouperClient.ws.beans.WsGroupToSave)2 WsSubjectLookup (edu.internet2.middleware.grouperClient.ws.beans.WsSubjectLookup)2 Group (edu.hawaii.its.api.type.Group)1 WsGroupDetail (edu.internet2.middleware.grouperClient.ws.beans.WsGroupDetail)1 WsGroupLookup (edu.internet2.middleware.grouperClient.ws.beans.WsGroupLookup)1 WsGroupSaveResults (edu.internet2.middleware.grouperClient.ws.beans.WsGroupSaveResults)1 WsResultMeta (edu.internet2.middleware.grouperClient.ws.beans.WsResultMeta)1