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.constraint;
13:
14: import net.sf.oval.Validator;
15: import net.sf.oval.configuration.annotation.AbstractAnnotationCheck;
16: import net.sf.oval.context.OValContext;
17:
18: /**
19: * @author Sebastian Thomschke
20: */
21: public class AssertConstraintSetCheck extends
22: AbstractAnnotationCheck<AssertConstraintSet> {
23: private static final long serialVersionUID = 1L;
24:
25: private String id;
26:
27: @Override
28: public void configure(final AssertConstraintSet constraintAnnotation) {
29: super .configure(constraintAnnotation);
30: setId(constraintAnnotation.id());
31: }
32:
33: @Override
34: public String getErrorCode() {
35: throw new UnsupportedOperationException();
36: }
37:
38: public String getId() {
39: return id;
40: }
41:
42: @Override
43: public String getMessage() {
44: throw new UnsupportedOperationException();
45: }
46:
47: @Override
48: public int getSeverity() {
49: throw new UnsupportedOperationException();
50: }
51:
52: /**
53: * <b>This method is not used.</b><br>
54: * The validation of this special constraint is directly performed by the Validator class
55: */
56: public boolean isSatisfied(final Object validatedObject,
57: final Object value, final OValContext context,
58: final Validator validator) {
59: throw new UnsupportedOperationException();
60: }
61:
62: @Override
63: public void setErrorCode(final String errorCode) {
64: throw new UnsupportedOperationException();
65: }
66:
67: public void setId(final String id) {
68: this .id = id;
69: }
70:
71: @Override
72: public void setMessage(final String message) {
73: throw new UnsupportedOperationException();
74: }
75:
76: @Override
77: public void setSeverity(final int severity) {
78: throw new UnsupportedOperationException();
79: }
80: }
|