2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.validation
.constraint
;
12 import javax
.validation
.ConstraintValidator
;
13 import javax
.validation
.ConstraintValidatorContext
;
15 import eu
.etaxonomy
.cdm
.validation
.annotation
.NullOrNotEmpty
;
17 public class NullOrNotEmptyValidator
implements
18 ConstraintValidator
<NullOrNotEmpty
, String
> {
20 public void initialize(NullOrNotEmpty nullOrNotEmpty
) { }
22 public boolean isValid(String string
, ConstraintValidatorContext constraintContext
) {
23 boolean isValid
= false;
26 } else if(string
.trim().length() > 0) {