use of cz.metacentrum.perun.audit.events.AttributesManagerEvents.AttributeSetForFacilityAndUser in project perun by CESNET.
the class AttributesManagerBlImpl method setAttributeWithoutCheck.
@Override
public boolean setAttributeWithoutCheck(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException {
getAttributesManagerImpl().checkNamespace(sess, attribute, AttributesManager.NS_USER_FACILITY_ATTR);
if (getAttributesManagerImpl().isCoreAttribute(sess, attribute))
throw new WrongAttributeAssignmentException(attribute);
boolean changed;
if (getAttributesManagerImpl().isVirtAttribute(sess, attribute)) {
try {
changed = getAttributesManagerImpl().setVirtualAttribute(sess, facility, user, attribute);
} catch (WrongReferenceAttributeValueException ex) {
throw new InternalErrorException(ex);
}
// FIXME update changed variable
} else {
changed = getAttributesManagerImpl().setAttribute(sess, facility, user, attribute);
}
if (changed) {
getPerunBl().getAuditer().log(sess, new AttributeSetForFacilityAndUser(attribute, facility, user));
getAttributesManagerImpl().changedAttributeHook(sess, facility, user, attribute);
}
return changed;
}
Aggregations