use of cz.metacentrum.perun.audit.events.AttributesManagerEvents.AttributeRemovedForFacility in project perun by CESNET.
the class AttributesManagerBlImpl method removeAttributeWithoutCheck.
@Override
public boolean removeAttributeWithoutCheck(PerunSession sess, Facility facility, AttributeDefinition attribute) throws WrongAttributeAssignmentException {
getAttributesManagerImpl().checkNamespace(sess, attribute, NS_FACILITY_ATTR);
if (getAttributesManagerImpl().isCoreAttribute(sess, attribute))
throw new WrongAttributeAssignmentException(attribute);
boolean changed = getAttributesManagerImpl().removeAttribute(sess, facility, attribute);
if (changed) {
getAttributesManagerImpl().changedAttributeHook(sess, facility, new Attribute(attribute));
log.info("{} removed attribute: {} from facility {}.", sess.getLogId(), attribute.getName(), facility.getId());
getPerunBl().getAuditer().log(sess, new AttributeRemovedForFacility(new AttributeDefinition(attribute), facility));
}
return changed;
}
Aggregations