Package io.dropwizard.jersey.validation

Examples of io.dropwizard.jersey.validation.ValidationErrorMessage


      User registeredUser = userService.register(req.getName(), req.getPassword(), req.getEmail(), Arrays.asList(Role.USER));
      userService.login(req.getName(), req.getPassword());
      sessionHelper.setLoggedInUser(registeredUser);
      return Response.ok().build();
    } catch (final IllegalArgumentException e) {
      return Response.status(422).entity(new ValidationErrorMessage(Collections.<ConstraintViolation<?>> emptySet()) {
        @Override
        public ImmutableList<String> getErrors() {
          return ImmutableList.of(e.getMessage());
        }
      }).build();
View Full Code Here

TOP

Related Classes of io.dropwizard.jersey.validation.ValidationErrorMessage

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.