use of com.sequenceiq.cloudbreak.controller.NotFoundException in project cloudbreak by hortonworks.
the class SecurityGroupService method delete.
public void delete(String name, IdentityUser user) {
LOGGER.info("Deleting SecurityGroup with name: {}", name);
SecurityGroup securityGroup = groupRepository.findByNameInAccount(name, user.getAccount());
if (securityGroup == null) {
throw new NotFoundException(String.format("SecurityGroup '%s' not found.", name));
}
delete(securityGroup);
}
use of com.sequenceiq.cloudbreak.controller.NotFoundException in project cloudbreak by hortonworks.
the class RdsConfigService method delete.
public void delete(Long id, IdentityUser user) {
RDSConfig rdsConfig = rdsConfigRepository.findByIdInAccount(id, user.getAccount());
if (rdsConfig == null) {
throw new NotFoundException(String.format("RDS configuration '%s' not found.", id));
}
delete(rdsConfig);
}
use of com.sequenceiq.cloudbreak.controller.NotFoundException in project cloudbreak by hortonworks.
the class RdsConfigService method delete.
public void delete(String name, IdentityUser user) {
RDSConfig rdsConfig = rdsConfigRepository.findByNameBasedOnAccount(name, user.getAccount(), user.getUserId());
if (rdsConfig == null) {
throw new NotFoundException(String.format("RDS configuration '%s' not found.", name));
}
delete(rdsConfig);
}
use of com.sequenceiq.cloudbreak.controller.NotFoundException in project cloudbreak by hortonworks.
the class ProxyConfigService method getPrivateProxyConfig.
public ProxyConfig getPrivateProxyConfig(String name, IdentityUser user) {
ProxyConfig proxyConfig = proxyConfigRepository.findByNameAndOwner(name, user.getUserId());
if (proxyConfig == null) {
throw new NotFoundException(String.format("Proxy configuration '%s' not found.", name));
}
authorizationService.hasReadPermission(proxyConfig);
return proxyConfig;
}
use of com.sequenceiq.cloudbreak.controller.NotFoundException in project cloudbreak by hortonworks.
the class ProxyConfigService method getPublicProxyConfig.
public ProxyConfig getPublicProxyConfig(String name, IdentityUser user) {
ProxyConfig proxyConfig = proxyConfigRepository.findByNameAndAccount(name, user.getAccount());
if (proxyConfig == null) {
throw new NotFoundException(String.format("Proxy configuration '%s' not found.", name));
}
authorizationService.hasReadPermission(proxyConfig);
return proxyConfig;
}
Aggregations