private String createMessage(final Locale locale) { final StringBuilder buffer = new StringBuilder(); if (constraints != null && !constraints.isEmpty()) { for (final PropertyConstraint<?> constraint : constraints) { buffer.append("\n > ").append( constraint.getViolationMessage(locale, getValue())); } } return buffer.toString(); }
/** * Default constructor. * * @param original the original property validation exception without the * origin information. * @param source the source where the property value has been defined. */ public PropertyValidationWithSourceMessageBean( final PropertyValidationException original, final PropertyLocation source) { super(ConfigurationCode.INVALID_CONFIGURATION_WITH_SOURCE, original, original.getMessageBean().getPropertyDescriptor(), original .getMessageBean().getConstraints(), original.getMessageBean() .getValue()); this.source = source; }