/** * Creates a new {@link PDFAValidator} initialised with the passed profile, * chosen passed test logging and requested fast failing behaviour. * * @param profile * the {@link ValidationProfile} to be enforced by the returned * {@code PDFAValidator}. * @param logPassedChecks * {@code boolean} used to configure logging of passed tests by * the {@code PDFAValidator}. Pass {@code true} to log passed * tests, {@code false} to only log tests that don't pass. * @param maxFailures * an {@code int} value that configures the {@code PDFAValidator} * to abort validation after {@code maxFailures} failed tests. If * {@code maxFailures} is less than 1 then the * {@code PDFAValidator} will complete the full validation * process. * @return a {@link PDFAValidator} instance initialised from the passed * parameters */ public static PDFAValidator createValidator(final ValidationProfile profile, final boolean logPassedChecks, final int maxFailures) { if (profile == null) throw new IllegalArgumentException("Parameter (ValidationProfile profile) cannot be null."); if (maxFailures > 0) return new FastFailValidator(profile, logPassedChecks, maxFailures); return createValidator(profile, logPassedChecks); }
/** * Creates a new {@link PDFAValidator} initialised with the passed profile, * chosen passed test logging and requested fast failing behaviour. * * @param profile * the {@link ValidationProfile} to be enforced by the returned * {@code PDFAValidator}. * @param logPassedChecks * {@code boolean} used to configure logging of passed tests by * the {@code PDFAValidator}. Pass {@code true} to log passed * tests, {@code false} to only log tests that don't pass. * @param maxFailures * an {@code int} value that configures the {@code PDFAValidator} * to abort validation after {@code maxFailures} failed tests. If * {@code maxFailures} is less than 1 then the * {@code PDFAValidator} will complete the full validation * process. * @return a {@link PDFAValidator} instance initialised from the passed * parameters */ public static PDFAValidator createValidator(final ValidationProfile profile, final boolean logPassedChecks, final int maxFailures) { if (profile == null) throw new IllegalArgumentException("Parameter (ValidationProfile profile) cannot be null."); if (maxFailures > 0) return new FastFailValidator(profile, logPassedChecks, maxFailures); return createValidator(profile, logPassedChecks); }