Package com.netflix.genie.common.exceptions

Examples of com.netflix.genie.common.exceptions.GenieBadRequestException


        if (!this.clusterRepo.exists(id)) {
            throw new GenieNotFoundException("No cluster exists with the given id. Unable to update.");
        }
        if (StringUtils.isNotBlank(updateCluster.getId())
                && !id.equals(updateCluster.getId())) {
            throw new GenieBadRequestException("Cluster id inconsistent with id passed in.");
        }

        //Set the id if it's not set so we can merge
        if (StringUtils.isBlank(updateCluster.getId())) {
            updateCluster.setId(id);
View Full Code Here


                throw new GeniePreconditionException(msg);
            }
        } catch (final ClassNotFoundException | BeansException e) {
            final String msg = "Unable to create job manager for class name " + className;
            LOG.error(msg, e);
            throw new GenieBadRequestException(msg);
        }
    }
View Full Code Here

    /**
     * Test 400.
     */
    @Test
    public void testGenieBadRequestException() {
        final GenieException ge = new GenieBadRequestException(ERROR_MESSAGE);
        final Response response = this.mapper.toResponse(ge);
        Assert.assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, response.getStatus());
        Assert.assertNotNull(response.getEntity());
        Assert.assertEquals(ERROR_MESSAGE, response.getEntity());
    }
View Full Code Here

        if (!this.applicationRepo.exists(id)) {
            throw new GenieNotFoundException("No application information entered. Unable to update.");
        }
        if (StringUtils.isNotBlank(updateApp.getId())
                && !id.equals(updateApp.getId())) {
            throw new GenieBadRequestException("Application id either not entered or inconsistent with id passed in.");
        }

        //Set the id if it's not set so we can merge
        if (StringUtils.isBlank(updateApp.getId())) {
            updateApp.setId(id);
View Full Code Here

        if (!this.commandRepo.exists(id)) {
            throw new GenieNotFoundException("No command exists with the given id. Unable to update.");
        }
        if (StringUtils.isNotBlank(updateCommand.getId())
                && !id.equals(updateCommand.getId())) {
            throw new GenieBadRequestException("Command id inconsistent with id passed in.");
        }

        //Set the id if it's not set so we can merge
        if (StringUtils.isBlank(updateCommand.getId())) {
            updateCommand.setId(id);
View Full Code Here

                }
            }
            return builder.build();
        } catch (final URISyntaxException use) {
            LOG.error(use.getMessage(), use);
            throw new GenieBadRequestException(use);
        }
    }
View Full Code Here

TOP

Related Classes of com.netflix.genie.common.exceptions.GenieBadRequestException

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.