use of cz.metacentrum.perun.audit.events.ServicesManagerEvents.AttributeAddedAsRequiredToService in project perun by CESNET.
the class ServicesManagerBlImpl method addRequiredAttribute.
@Override
public void addRequiredAttribute(PerunSession sess, Service service, AttributeDefinition attribute) throws AttributeAlreadyAssignedException {
// check if attribute isn't already added
List<AttributeDefinition> requiredAttributes = getPerunBl().getAttributesManagerBl().getRequiredAttributesDefinition(sess, service);
if (requiredAttributes.contains(attribute))
throw new AttributeAlreadyAssignedException(attribute);
getServicesManagerImpl().addRequiredAttribute(sess, service, attribute);
getPerunBl().getAuditer().log(sess, new AttributeAddedAsRequiredToService(attribute, service));
}
Aggregations