use of cz.metacentrum.perun.audit.events.AttributesManagerEvents.AttributeSetForFacility in project perun by CESNET.
the class AttributesManagerBlImpl method setAttributeWithoutCheck.
@Override
public boolean setAttributeWithoutCheck(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException {
getAttributesManagerImpl().checkNamespace(sess, attribute, NS_FACILITY_ATTR);
if (getAttributesManagerImpl().isCoreAttribute(sess, attribute))
throw new WrongAttributeAssignmentException(attribute);
boolean changed;
if (isVirtAttribute(sess, attribute)) {
throw new InternalErrorException("Virtual attribute can't be set this way yet. Please set physical attribute.");
} else {
changed = getAttributesManagerImpl().setAttribute(sess, facility, attribute);
}
if (changed) {
getPerunBl().getAuditer().log(sess, new AttributeSetForFacility(attribute, facility));
getAttributesManagerImpl().changedAttributeHook(sess, facility, attribute);
}
return changed;
}
Aggregations