Search in sources :

Example 1 with BanServiceOnFacility

use of cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnFacility in project perun by CESNET.

the class ServicesManagerBlImpl method blockAllServicesOnFacility.

@Override
public void blockAllServicesOnFacility(PerunSession sess, Facility facility) {
    List<Service> services = getAssignedServices(sess, facility);
    for (Service service : services) {
        try {
            getServicesManagerImpl().blockServiceOnFacility(sess, service.getId(), facility.getId());
            sess.getPerun().getAuditer().log(sess, new BanServiceOnFacility(service, facility));
        } catch (ServiceAlreadyBannedException e) {
        // we ignore, that service was already blocked
        }
    }
}
Also used : BanServiceOnFacility(cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnFacility) RequiredAttributeRemovedFromService(cz.metacentrum.perun.audit.events.ServicesManagerEvents.RequiredAttributeRemovedFromService) DestinationRemovedFromService(cz.metacentrum.perun.audit.events.ServicesManagerEvents.DestinationRemovedFromService) PropagationPlannedOnFacilityAndService(cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.PropagationPlannedOnFacilityAndService) PropagationPlannedOnService(cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.PropagationPlannedOnService) RequiredAttributesRemovedFromService(cz.metacentrum.perun.audit.events.ServicesManagerEvents.RequiredAttributesRemovedFromService) DestinationsRemovedFromService(cz.metacentrum.perun.audit.events.ServicesManagerEvents.DestinationsRemovedFromService) ForcePropagationOnService(cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.ForcePropagationOnService) Service(cz.metacentrum.perun.core.api.Service) AttributesAddedAsRequiredToService(cz.metacentrum.perun.audit.events.ServicesManagerEvents.AttributesAddedAsRequiredToService) ForcePropagationOnFacilityAndService(cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.ForcePropagationOnFacilityAndService) AllRequiredAttributesRemovedFromService(cz.metacentrum.perun.audit.events.ServicesManagerEvents.AllRequiredAttributesRemovedFromService) AttributeAddedAsRequiredToService(cz.metacentrum.perun.audit.events.ServicesManagerEvents.AttributeAddedAsRequiredToService) ServiceAlreadyBannedException(cz.metacentrum.perun.core.api.exceptions.ServiceAlreadyBannedException)

Example 2 with BanServiceOnFacility

use of cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnFacility in project perun by CESNET.

the class ServicesManagerBlImpl method blockServiceOnFacility.

@Override
public void blockServiceOnFacility(PerunSession sess, Service service, Facility facility) throws ServiceAlreadyBannedException {
    getServicesManagerImpl().blockServiceOnFacility(sess, service.getId(), facility.getId());
    sess.getPerun().getAuditer().log(sess, new BanServiceOnFacility(service, facility));
}
Also used : BanServiceOnFacility(cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnFacility)

Aggregations

BanServiceOnFacility (cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnFacility)2 ForcePropagationOnFacilityAndService (cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.ForcePropagationOnFacilityAndService)1 ForcePropagationOnService (cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.ForcePropagationOnService)1 PropagationPlannedOnFacilityAndService (cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.PropagationPlannedOnFacilityAndService)1 PropagationPlannedOnService (cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.PropagationPlannedOnService)1 AllRequiredAttributesRemovedFromService (cz.metacentrum.perun.audit.events.ServicesManagerEvents.AllRequiredAttributesRemovedFromService)1 AttributeAddedAsRequiredToService (cz.metacentrum.perun.audit.events.ServicesManagerEvents.AttributeAddedAsRequiredToService)1 AttributesAddedAsRequiredToService (cz.metacentrum.perun.audit.events.ServicesManagerEvents.AttributesAddedAsRequiredToService)1 DestinationRemovedFromService (cz.metacentrum.perun.audit.events.ServicesManagerEvents.DestinationRemovedFromService)1 DestinationsRemovedFromService (cz.metacentrum.perun.audit.events.ServicesManagerEvents.DestinationsRemovedFromService)1 RequiredAttributeRemovedFromService (cz.metacentrum.perun.audit.events.ServicesManagerEvents.RequiredAttributeRemovedFromService)1 RequiredAttributesRemovedFromService (cz.metacentrum.perun.audit.events.ServicesManagerEvents.RequiredAttributesRemovedFromService)1 Service (cz.metacentrum.perun.core.api.Service)1 ServiceAlreadyBannedException (cz.metacentrum.perun.core.api.exceptions.ServiceAlreadyBannedException)1