1 package org.nuiton.validator.bean;
2 /*
3 * #%L
4 * Nuiton Validator
5 * %%
6 * Copyright (C) 2013 - 2014 Code Lutin, Tony Chemit
7 * %%
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Lesser Public License for more details.
17 *
18 * You should have received a copy of the GNU General Lesser Public
19 * License along with this program. If not, see
20 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
21 * #L%
22 */
23
24 import org.nuiton.validator.NuitonValidatorProvider;
25 import org.nuiton.validator.NuitonValidatorScope;
26
27 /**
28 * TODO
29 *
30 * @author Tony Chemit - chemit@codelutin.com
31 * @since 2.5.2
32 */
33 public interface ValidatorCreator<V> {
34
35 /**
36 * Given the parameters, instanciate a new {@link V}.
37 *
38 * @param provider the delegate validator provider
39 * @param type the type of object to validate
40 * @param context the context of validation (can be {@code null})
41 * @param scopes scopes to use (if none given, will use all available scopes)
42 * @param <O> type of object to validate
43 * @return the new instance of bean validator
44 */
45 <O> V newValidator(NuitonValidatorProvider provider,
46 Class<O> type,
47 String context,
48 NuitonValidatorScope... scopes
49
50 );
51 }