Project

General

Profile

Download (1.1 KB) Statistics
| Branch: | Tag: | Revision:
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
	@Override
31
    public void initialize(Annotation annotation) { }
32

    
33
    @Override
34
    public boolean isValid(Object obj, ConstraintValidatorContext constraintContext) {
35
		return true;
36
	}
37
}
(14-14/17)