nl.vpro.validation.GenreValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-domain Show documentation
Show all versions of media-domain Show documentation
The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it.
It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.
/*
* Copyright (C) 2011 Licensed under the Apache License, Version 2.0
* VPRO The Netherlands
*/
package nl.vpro.validation;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import nl.vpro.domain.classification.ClassificationServiceLocator;
import nl.vpro.domain.media.Genre;
public class GenreValidator implements ConstraintValidator {
@Override
public boolean isValid(Genre value, ConstraintValidatorContext constraintValidatorContext) {
return ClassificationServiceLocator.getInstance().hasTerm(value.getTermId());
}
}