Java Code Examples for org.sonatype.nexus.rest.ValidationErrorsException#getValidationErrors()

The following examples show how to use org.sonatype.nexus.rest.ValidationErrorsException#getValidationErrors() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OrientRoutingRuleStoreTest.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
private static void assertValidationException(
    final ValidationErrorsException e,
    final String id,
    final String message)
{
  for (ValidationErrorXO error : e.getValidationErrors()) {
    if (id.equals(error.getId()) && error.getMessage().startsWith(message)) {
      return;
    }
  }
  fail("Unable to find matching exception with id:" + id + " message:" + message + "\n" + e.getMessage());
}
 
Example 2
Source File: ValidationErrorsExceptionMapper.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
protected List<ValidationErrorXO> getValidationErrors(final ValidationErrorsException exception) {
  return exception.getValidationErrors();
}