Package com.cloudcontrolled.api.client.exception

Examples of com.cloudcontrolled.api.client.exception.ValidationConstraintViolationException$ConstraintViolation


          Object value = null;
          try {
            value = field.get(request);
          } catch (Exception e) {
            // not cool...
            throw new ValidationConstraintViolationException(e);
          }

          if (value == null || value instanceof String && ((String) value).isEmpty()) {
            ConstraintViolation violation = ConstraintViolation.newConstraintViolation("@" + Required.class.getSimpleName(), field);
            leafs.add(violation);
          }
        }
      }

      if (!leafs.isEmpty()) {
        throw new ValidationConstraintViolationException(preMessage, leafs);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.cloudcontrolled.api.client.exception.ValidationConstraintViolationException$ConstraintViolation

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.