nl.vpro.validation.SegmentValidator 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.
package nl.vpro.validation;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;
import nl.vpro.domain.media.Segment;
/**
* @author Michiel Meeuwissen
* @since 2.3.1
*/
public class SegmentValidator implements ConstraintValidator {
@Override
public boolean isValid(Segment value, ConstraintValidatorContext context) {
return value.getMidRef() != null || value.getParent() != null;
}
}