src/main/java/org/jboss/pressgang/ccms/model/ImageFile.java
public void validate() throws CustomConstraintViolationException {
        final String extension = getExtension();
        if (extension != null) {
            for (final LanguageImage langImg : languageImages) {
                if (langImg.getOriginalFileName() != null && !langImg.getOriginalFileName().isEmpty()) {
                    final String thisExtension = FileUtilities.getFileExtension(langImg.getOriginalFileName());
                    if (!thisExtension.toLowerCase().equals(extension.toLowerCase())) throw new CustomConstraintViolationException(
                            "All LanguageImages contained by an ImageFile need to have the same file extension");
                }
            }
        }
    }
public void validate() throws CustomConstraintViolationException {
        final String extension = getExtension();
        if (extension != null) {
            for (final LanguageImage langImg : languageImages) {
                if (langImg.getOriginalFileName() != null && !langImg.getOriginalFileName().isEmpty()) {
                    final String thisExtension = FileUtilities.getFileExtension(langImg.getOriginalFileName());
                    if (!thisExtension.toLowerCase().equals(extension.toLowerCase())) throw new CustomConstraintViolationException(
                            "All LanguageImages contained by an ImageFile need to have the same file extension");
                }
            }
        }
    }
An image file can be represented by multiple translated images. These images can all be from originally differently names
files, and can have different dimensions. However, all translated images need to be of the same file file. The
getDocbookFileName() method needs to be able to append a fixed extension to the file name when the image is included in a
Docbook XML file.
<p/>
This method will throw an exception if there are inconsistent file extensions on any of the original file names assigned
to the translated images.

@throws CustomConstraintViolationException