Search in sources :

Example 1 with ExtSourceRemovedFromVo

use of cz.metacentrum.perun.audit.events.ExtSourcesManagerEvents.ExtSourceRemovedFromVo in project perun by CESNET.

the class ExtSourcesManagerBlImpl method removeExtSource.

@Override
public void removeExtSource(PerunSession sess, Vo vo, ExtSource source) throws ExtSourceNotAssignedException, ExtSourceAlreadyRemovedException {
    List<Group> groupsWithAssignedExtSource = getPerunBl().getGroupsManagerBl().getGroupsWithAssignedExtSourceInVo(sess, source, vo);
    for (Group group : groupsWithAssignedExtSource) {
        getPerunBl().getExtSourcesManagerBl().removeExtSource(sess, group, source);
    }
    getExtSourcesManagerImpl().removeExtSource(sess, vo, source);
    getPerunBl().getAuditer().log(sess, new ExtSourceRemovedFromVo(source, vo));
}
Also used : CandidateGroup(cz.metacentrum.perun.core.api.CandidateGroup) Group(cz.metacentrum.perun.core.api.Group) ExtSourceAddedToGroup(cz.metacentrum.perun.audit.events.ExtSourcesManagerEvents.ExtSourceAddedToGroup) ExtSourceRemovedFromGroup(cz.metacentrum.perun.audit.events.ExtSourcesManagerEvents.ExtSourceRemovedFromGroup) ExtSourceRemovedFromVo(cz.metacentrum.perun.audit.events.ExtSourcesManagerEvents.ExtSourceRemovedFromVo)

Aggregations

ExtSourceAddedToGroup (cz.metacentrum.perun.audit.events.ExtSourcesManagerEvents.ExtSourceAddedToGroup)1 ExtSourceRemovedFromGroup (cz.metacentrum.perun.audit.events.ExtSourcesManagerEvents.ExtSourceRemovedFromGroup)1 ExtSourceRemovedFromVo (cz.metacentrum.perun.audit.events.ExtSourcesManagerEvents.ExtSourceRemovedFromVo)1 CandidateGroup (cz.metacentrum.perun.core.api.CandidateGroup)1 Group (cz.metacentrum.perun.core.api.Group)1