TODO comment to the ClassInfoBridge
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / validation / constraint / StubValidator.java
1 /**
2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.cdm.validation.constraint;
11
12 import java.lang.annotation.Annotation;
13
14 import javax.validation.ConstraintValidator;
15 import javax.validation.ConstraintValidatorContext;
16
17 /**
18 * Stub validatior for use when a constraint uses cdmlib-services component
19 * (and therfore the implementation requires components that are not visible
20 * in the cdmlib-model package)
21 *
22 * To resolve this circular dependency, use this stub as the validator in the
23 * annotation, then substitute an implementation using an XML config file.
24 *
25 * @author ben.clark
26 */
27 public class StubValidator implements
28 ConstraintValidator<Annotation,Object> {
29
30 public void initialize(Annotation annotation) { }
31
32 public boolean isValid(Object obj, ConstraintValidatorContext constraintContext) {
33 return true;
34 }
35 }