View Javadoc
1   /*******************************************************************************
2    * Portions created by Sebastian Thomschke are copyright (c) 2005-2015 Sebastian
3    * Thomschke.
4    *
5    * All Rights Reserved. This program and the accompanying materials
6    * are made available under the terms of the Eclipse Public License v1.0
7    * which accompanies this distribution, and is available at
8    * http://www.eclipse.org/legal/epl-v10.html
9    *
10   * Contributors:
11   *     Sebastian Thomschke - initial implementation.
12   *******************************************************************************/
13  package net.sf.oval.constraint;
14  
15  import java.lang.annotation.Annotation;
16  import java.util.List;
17  
18  import net.sf.oval.Check;
19  import net.sf.oval.ConstraintTarget;
20  import net.sf.oval.Validator;
21  import net.sf.oval.configuration.annotation.AbstractAnnotationCheck;
22  import net.sf.oval.context.OValContext;
23  
24  /**
25   * Internal check holding multiple check instances of the same type, e.g. used for @Assert.List(...)
26   *
27   * @author Sebastian Thomschke
28   */
29  public class ConstraintsCheck extends AbstractAnnotationCheck<Annotation>
30  {
31  	private static final long serialVersionUID = 1L;
32  
33  	public List<Check> checks;
34  
35  	@Override
36  	protected ConstraintTarget[] getAppliesToDefault()
37  	{
38  		return new ConstraintTarget[]{ConstraintTarget.CONTAINER /*, ConstraintTarget.KEYS, ConstraintTarget.VALUES,
39  																	ConstraintTarget.RECURSIVE*/};
40  	}
41  
42  	/**
43  	 *  <b>This method is not used.</b><br>
44  	 *  The validation of this special constraint is directly performed by the Validator class
45  	 *  @throws UnsupportedOperationException always thrown if this method is invoked
46  	 */
47  	public boolean isSatisfied(final Object validatedObject, final Object valueToValidate, final OValContext context,
48  			final Validator validator) throws UnsupportedOperationException
49  	{
50  		throw new UnsupportedOperationException();
51  	}
52  }