use of cz.metacentrum.perun.core.api.exceptions.VoNotExistsException in project perun by CESNET.
the class MembersManagerBlImpl method insertToMemberGroup.
public void insertToMemberGroup(PerunSession sess, Member member, Vo vo) throws InternalErrorException, AlreadyMemberException, GroupOperationsException {
// Insert member into the members group
try {
getPerunBl().getVosManagerBl().checkVoExists(sess, vo);
Group g = getPerunBl().getGroupsManagerBl().getGroupByName(sess, vo, VosManager.MEMBERS_GROUP);
getPerunBl().getGroupsManagerBl().addMemberToMembersGroup(sess, g, member);
} catch (NotMemberOfParentGroupException ex) {
//members group is top level -> this should not happen
throw new ConsistencyErrorException(ex);
} catch (GroupNotExistsException e) {
throw new InternalErrorException(e);
} catch (VoNotExistsException e) {
throw new InternalErrorException(e);
} catch (WrongAttributeValueException e) {
//Member is not valid, so he couldn't have truly required atributes, neither he couldn't have influence on user attributes
throw new ConsistencyErrorException(e);
} catch (WrongReferenceAttributeValueException e) {
//Member is not valid, so he couldn't have truly required atributes, neither he couldn't have influence on user attributes
throw new ConsistencyErrorException(e);
}
}
Aggregations