KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > compiler > grammar > ValidationRulesContainerGrammar


1 /*
2  * Copyright 2004 The Apache Software Foundation.
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  * $Header:$
17  */

18 package org.apache.beehive.netui.compiler.grammar;
19
20 import org.apache.beehive.netui.compiler.AnnotationGrammar;
21 import org.apache.beehive.netui.compiler.Diagnostics;
22 import org.apache.beehive.netui.compiler.RuntimeVersionChecker;
23 import org.apache.beehive.netui.compiler.typesystem.env.AnnotationProcessorEnvironment;
24
25 public abstract class ValidationRulesContainerGrammar
26         extends AnnotationGrammar
27 {
28     protected ValidationRulesContainerGrammar( AnnotationProcessorEnvironment env, Diagnostics diags,
29                                                RuntimeVersionChecker rvc )
30     {
31         super( env, diags, VERSION_9_0_STRING, rvc );
32         
33         addMemberGrammar( VALIDATE_REQUIRED_ATTR, new ValidateRequiredGrammar( env, diags, rvc ) );
34         addMemberGrammar( VALIDATE_RANGE_ATTR, new ValidateRangeGrammar( env, diags, rvc ) );
35         addMemberGrammar( VALIDATE_MIN_LENGTH_ATTR, new BaseValidationRuleGrammar( env, diags, rvc ) );
36         addMemberGrammar( VALIDATE_MAX_LENGTH_ATTR, new BaseValidationRuleGrammar( env, diags, rvc ) );
37         addMemberGrammar( VALIDATE_CREDIT_CARD_ATTR, new BaseValidationRuleGrammar( env, diags, rvc ) );
38         addMemberGrammar( VALIDATE_EMAIL_ATTR, new BaseValidationRuleGrammar( env, diags, rvc ) );
39         addMemberGrammar( VALIDATE_MASK_ATTR, new BaseValidationRuleGrammar( env, diags, rvc ) );
40         addMemberGrammar( VALIDATE_DATE_ATTR, new BaseValidationRuleGrammar( env, diags, rvc ) );
41         addMemberGrammar( VALIDATE_TYPE_ATTR, new ValidateTypeGrammar( env, diags, rvc ) );
42         addMemberGrammar( VALIDATE_VALID_WHEN_ATTR, new ValidateValidWhenGrammar( env, diags, rvc ) );
43         addMemberArrayGrammar( VALIDATE_CUSTOM_ATTR, new ValidateCustomGrammar( env, diags, rvc ) );
44     }
45 }
46
Popular Tags