use of cz.metacentrum.perun.audit.events.AttributesManagerEvents.AllAttributesRemovedForVo in project perun by CESNET.
the class AttributesManagerBlImpl method removeAllAttributes.
@Override
public void removeAllAttributes(PerunSession sess, Vo vo) throws WrongAttributeValueException, WrongReferenceAttributeValueException {
List<Attribute> attributes = getAttributes(sess, vo);
if (getAttributesManagerImpl().removeAllAttributes(sess, vo)) {
getPerunBl().getAuditer().log(sess, new AllAttributesRemovedForVo(vo));
}
log.info("{} removed all attributes from vo {}.", sess.getLogId(), vo.getId());
for (Attribute attribute : attributes) attribute.setValue(null);
try {
checkAttributesSemantics(sess, vo, attributes);
checkAttributesDependencies(sess, vo, attributes);
} catch (WrongAttributeAssignmentException ex) {
throw new ConsistencyErrorException(ex);
}
for (Attribute attribute : attributes) {
getAttributesManagerImpl().changedAttributeHook(sess, vo, new Attribute(attribute));
}
}
Aggregations