01: /*******************************************************************************
02: * Portions created by Sebastian Thomschke are copyright (c) 2005-2007 Sebastian
03: * Thomschke.
04: *
05: * All Rights Reserved. This program and the accompanying materials
06: * are made available under the terms of the Eclipse Public License v1.0
07: * which accompanies this distribution, and is available at
08: * http://www.eclipse.org/legal/epl-v10.html
09: *
10: * Contributors:
11: * Sebastian Thomschke - initial implementation.
12: *******************************************************************************/package net.sf.oval.configuration;
13:
14: import net.sf.oval.configuration.pojo.elements.ClassConfiguration;
15: import net.sf.oval.configuration.pojo.elements.ConstraintSetConfiguration;
16: import net.sf.oval.exception.OValException;
17:
18: /**
19: * @author Sebastian Thomschke
20: */
21: public interface Configurer {
22: /**
23: * Returns the constraint configurations for the given class. This method
24: * is invoked only once by the Validator, the very first time an object
25: * of the given class needs to be validated. The constraint configuration
26: * is then translated into an Validator internal format and cached.
27: *
28: * @param clazz
29: * @return The constraint configurations for the given class.
30: * @throws OValException
31: */
32: ClassConfiguration getClassConfiguration(Class<?> clazz)
33: throws OValException;
34:
35: /**
36: * Returns the constraint configuration for the constraint set with the
37: * given Id.
38: * @param constraintSetId
39: * @return The constraint configuration for the constraint set with the given Id.
40: * @throws OValException
41: */
42: ConstraintSetConfiguration getConstraintSetConfiguration(
43: String constraintSetId) throws OValException;
44: }
|