use of org.bf2.srs.fleetmanager.auth.interceptor.CheckDeletePermissions in project srs-fleet-manager by bf2fc6cc711aee1a0c2a.
the class RegistryServiceImpl method deleteRegistry.
@Override
@Audited(extractParameters = { "0", KEY_REGISTRY_ID })
@CheckDeletePermissions
public void deleteRegistry(String registryId) throws RegistryNotFoundException, RegistryStorageConflictException {
try {
// Verify preconditions - Registry exists
storage.getRegistryById(registryId).orElseThrow(() -> new RegistryNotFoundException(registryId));
tasks.submit(StartDeprovisionRegistryTask.builder().registryId(registryId).build());
} catch (NumberFormatException ex) {
throw new RegistryNotFoundException(registryId);
}
}
Aggregations