1 /*
2 * Copyright 2006-2016 The JGUIraffe Team.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package net.sf.jguiraffe.transform;
17
18 /**
19 * <p>
20 * An enumeration class that defines possible levels for validation messages.
21 * </p>
22 * <p>
23 * Messages produced by {@link Validator} implementations do not necessarily
24 * indicate fatal errors. It is also possible to issue warnings to the user.
25 * This enumeration class defines levels for validation messages supported by
26 * this library.
27 * </p>
28 * <p>
29 * Only the level {@code ERROR} represents a real validation error. If an input
30 * component contains a {@link ValidationMessage} with the level {@code ERROR},
31 * it is considered invalid, and the associated form cannot be closed using the
32 * OK button. Other levels are only informative and do not have any real
33 * consequences.
34 * </p>
35 *
36 * @author Oliver Heger
37 * @version $Id: ValidationMessageLevel.java 205 2012-01-29 18:29:57Z oheger $
38 */
39 public enum ValidationMessageLevel
40 {
41 /**
42 * The validation message level <em>ERROR</em>. This level indicates a real
43 * validation error. Messages with this level cause input elements to be
44 * considered invalid.
45 */
46 ERROR,
47
48 /**
49 * The validation message level <em>WARNING</em>. This level can be used if
50 * user input violates a recommendation, but nevertheless can be accepted.
51 */
52 WARNING
53 }