//CSOFF: DesignForExtension
@Override
public void validate(final List<Throwable> validationErrors, final Configuration configuration) {
//CSON: DesignForExtension
if (this.width == null || this.width < 1) {
validationErrors.add(new ConfigurationException("width field is not legal: " + this.width + " in " + getClass().getName()));
}
if (this.height == null || this.height < 1) {
validationErrors.add(new ConfigurationException("height field is not legal: " + this.height + " in " + getClass().getName()));
}
if (this.getMaxDpi() == null || this.getMaxDpi() < 1) {
validationErrors.add(
new ConfigurationException("maxDpi field is not legal: " + this.getMaxDpi() + " in " + getClass().getName()));
}
if (this.getMaxDpi() != null && this.getDpiSuggestions() != null) {
for (double dpi : this.getDpiSuggestions()) {
if (dpi < 1 || dpi > this.getMaxDpi()) {
validationErrors.add(new ConfigurationException(
"dpiSuggestions contains an invalid value: " + dpi + " in " + getClass().getName()));
}
}
}