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