KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > form > config > ValidatorConfig


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.controller.form.config;
8
9
10 import com.inversoft.verge.mvc.config.BaseValidatorConfig;
11
12
13 /**
14  * <p>
15  * This class is the validator configuration class for the
16  * form based MVC.
17  * </p>
18  *
19  * @author Brian Pontarelli
20  */

21 public class ValidatorConfig extends BaseValidatorConfig {
22
23     private MappingConfig failureMapping;
24
25
26     /**
27      * Constructs a new <code>ValidatorConfig<code> object with the given
28      * validator class name and failure definition name.
29      *
30      * @param validator The validator class name
31      * @param failure The failure definition name
32      */

33     public ValidatorConfig(Class JavaDoc validator, String JavaDoc failure) {
34         super(validator, failure);
35     }
36
37     /**
38      * Constructs a new <code>ValidatorConfig<code> object that is a copy of the
39      * given <code>BaseValidatorConfig</code> object.
40      *
41      * @param base The base object to copy from
42      */

43     public ValidatorConfig(BaseValidatorConfig base) {
44         super(base);
45     }
46
47     /**
48      * Constructs a new <code>ValidatorConfig<code> object that is a copy of the
49      * given <code>ValidatorConfig</code>.
50      *
51      * @param config The ValidatorConfig to copy from
52      */

53     public ValidatorConfig(ValidatorConfig config) {
54         super(config);
55         this.failureMapping = config.failureMapping;
56     }
57
58
59     /**
60      * Gets the failure definition as a MappingConfig object.
61      *
62      * @return Returns the failureMapping.
63      */

64     public MappingConfig getFailureMapping() {
65         return failureMapping;
66     }
67
68     /**
69      * Sets the failure definition as a MappingConfig object.
70      *
71      * @param failureMapping The failureMapping to set.
72      */

73     public void setFailureMapping(MappingConfig failureMapping) {
74         this.failureMapping = failureMapping;
75     }
76 }
Popular Tags