Search in sources :

Example 1 with BanServiceOnDestination

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

the class ServicesManagerBlImpl method blockServiceOnDestination.

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

Example 2 with BanServiceOnDestination

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

the class ServicesManagerBlImpl method blockAllServicesOnDestination.

@Override
public void blockAllServicesOnDestination(PerunSession sess, int destinationId) throws PrivilegeException, DestinationNotExistsException {
    List<Service> services = getServicesManagerImpl().getServicesFromDestination(destinationId);
    for (Service service : services) {
        try {
            getServicesManagerImpl().blockServiceOnDestination(sess, service.getId(), destinationId);
            sess.getPerun().getAuditer().log(sess, new BanServiceOnDestination(service, destinationId));
        } catch (ServiceAlreadyBannedException e) {
        // we ignore, that service was already blocked
        }
    }
}
Also used : 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) BanServiceOnDestination(cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnDestination) ServiceAlreadyBannedException(cz.metacentrum.perun.core.api.exceptions.ServiceAlreadyBannedException)

Aggregations

BanServiceOnDestination (cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnDestination)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