Package com.sequenceiq.cloudbreak.service

Examples of com.sequenceiq.cloudbreak.service.DuplicateKeyValueException


        try {
            savedStack = stackRepository.save(stack);
            LOGGER.info("Publishing {} event [StackId: '{}']", ReactorConfig.PROVISION_REQUEST_EVENT, stack.getId());
            reactor.notify(ReactorConfig.PROVISION_REQUEST_EVENT, Event.wrap(new ProvisionRequest(template.cloudPlatform(), stack.getId())));
        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(stack.getName(), ex);
        }
        return savedStack;
    }
View Full Code Here


        try {
            savedBlueprint = blueprintRepository.save(blueprint);
            websocketService.sendToTopicUser(user.getUsername(), WebsocketEndPoint.BLUEPRINT,
                    new StatusMessage(savedBlueprint.getId(), savedBlueprint.getName(), Status.AVAILABLE.name()));
        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(blueprint.getName(), ex);
        }
        return savedBlueprint;
    }
View Full Code Here

        credential.setOwner(user.getUserId());
        credential.setAccount(user.getAccount());
        try {
            savedCredential = credentialRepository.save(credential);
        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(credential.getName(), ex);
        }
        createAzureCertificates(user, savedCredential);
        websocketService.sendToTopicUser(user.getUsername(), WebsocketEndPoint.CREDENTIAL,
                new StatusMessage(credential.getId(), credential.getName(), Status.AVAILABLE.name()));
View Full Code Here

        template.setOwner(user.getUserId());
        template.setAccount(user.getAccount());
        try {
            savedTemplate = templateRepository.save(template);
        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(template.getName(), ex);
        }
        return savedTemplate;
    }
View Full Code Here

        cluster.setOwner(user.getUserId());
        cluster.setAccount(user.getAccount());
        try {
            cluster = clusterRepository.save(cluster);
        } catch (DataIntegrityViolationException ex) {
            throw new DuplicateKeyValueException(cluster.getName(), ex);
        }
        stack = stackUpdater.updateStackCluster(stack.getId(), cluster);
        LOGGER.info("Publishing {} event", ReactorConfig.CLUSTER_REQUESTED_EVENT);
        reactor.notify(ReactorConfig.CLUSTER_REQUESTED_EVENT, Event.wrap(stack));
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.service.DuplicateKeyValueException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.