/** * Creates a new {@link VndError} with the given logref, a message as well as some {@link Link}s. * * @param logref must not be {@literal null} or empty. * @param message must not be {@literal null} or empty. * @param links */ public VndError(String logref, String message, Link... links) { Assert.hasText(logref, "Logref must not be null or empty!"); Assert.hasText(message, "Message must not be null or empty!"); this.logref = logref; this.message = message; this.add(Arrays.asList(links)); }
@Override public String toString() { return String.format("VndError[logref: %s, message: %s, links: [%s]]", logref, message, StringUtils.collectionToCommaDelimitedString(getLinks())); }
/** * Creates a new {@link VndError} with the given logref, a message as well as some {@link Link}s. * * @param logref must not be {@literal null} or empty. * @param message must not be {@literal null} or empty. * @param links */ public VndError(String logref, String message, Link... links) { Assert.hasText(logref, "Logref must not be null or empty!"); Assert.hasText(message, "Message must not be null or empty!"); this.logref = logref; this.message = message; this.add(Arrays.asList(links)); }
private static VndErrors.VndError vndError(final Map.Entry<String, String> entry) { return new VndErrors.VndError(entry.getKey(), entry.getValue(), homeLink()); } }
@Override public String getMessage() { StringBuilder builder = new StringBuilder(); for (VndErrors.VndError e : vndErrors) { builder.append(e.getMessage()).append('\n'); } return builder.toString(); } }
@Override public String toString() { return String.format("VndError[logref: %s, message: %s, links: [%s]]", logref, message, StringUtils.collectionToCommaDelimitedString(getLinks())); }
@Override public String getMessage() { StringBuilder builder = new StringBuilder(); for (VndErrors.VndError e : vndErrors) { builder.append(e.getMessage()).append('\n'); } return builder.toString(); }
/** * Creates a new {@link VndErrors} instance containing a single {@link VndError} with the given logref, message and * optional {@link Link}s. * * @param logref must not be {@literal null} or empty. * @param message must not be {@literal null} or empty. * @param links */ public VndErrors(String logref, String message, Link... links) { this(new VndError(logref, message, links)); }
@Override public String getMessage() { StringBuilder builder = new StringBuilder(); for (VndErrors.VndError e : vndErrors) { builder.append(e.getMessage()).append('\n'); } return builder.toString(); } }
@Override public String getMessage() { StringBuilder builder = new StringBuilder(); for (VndErrors.VndError e : vndErrors) { builder.append(e.getMessage()).append('\n'); } return builder.toString(); } }
/** * Creates a new {@link VndErrors} instance containing a single {@link VndError} with the given logref, message and * optional {@link Link}s. * * @param logref must not be {@literal null} or empty. * @param message must not be {@literal null} or empty. * @param links */ public VndErrors(String logref, String message, Link... links) { this(new VndError(logref, message, links)); }