KickJava   Java API By Example, From Geeks To Geeks.

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


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.RuntimeVersionChecker;
21 import org.apache.beehive.netui.compiler.AnnotationMemberType;
22 import org.apache.beehive.netui.compiler.FlowControllerInfo;
23 import org.apache.beehive.netui.compiler.Diagnostics;
24 import org.apache.beehive.netui.compiler.model.schema.struts11.StrutsConfigDocument;
25 import org.apache.beehive.netui.compiler.model.schema.validator11.FormValidationDocument;
26 import org.apache.beehive.netui.compiler.typesystem.env.AnnotationProcessorEnvironment;
27
28
29 public class ControllerGrammar
30         extends BaseFlowControllerGrammar
31 {
32     public ControllerGrammar( AnnotationProcessorEnvironment env, Diagnostics diags, RuntimeVersionChecker rvc,
33                               FlowControllerInfo fcInfo )
34     {
35         super( env, diags, null, rvc, fcInfo );
36         
37         addMemberType( LOGIN_REQUIRED_ATTR, new AnnotationMemberType( null, this ) );
38         addMemberType( ROLES_ALLOWED_ATTR, new RolesAllowedType( this ) );
39         addMemberType( READONLY_ATTR, new AnnotationMemberType( null, this ) );
40         addMemberType( STRUTSMERGE_ATTR, new ValidXmlFileType( StrutsConfigDocument.type, null, this, fcInfo ) );
41         addMemberType( VALIDATOR_VERSION_ATTR, new AnnotationMemberType( null, this ) );
42         addMemberType( VALIDATOR_MERGE_ATTR, new ValidXmlFileType( FormValidationDocument.type, null, this, fcInfo ) );
43         addMemberType( TILES_DEFINITIONS_CONFIGS_ATTR, new TilesDefinitionsConfigsType( null, this, fcInfo ) );
44         addMemberType( MULTIPART_HANDLER_ATTR, new AnnotationMemberType( null, this ) );
45         
46         addMemberArrayGrammar( SHARED_FLOW_REFS_ATTR, new SharedFlowRefGrammar( env, diags, rvc ) );
47         addMemberArrayGrammar( FORWARDS_ATTR, new ForwardGrammar( env, diags, null, rvc, fcInfo ) );
48         addMemberArrayGrammar( CATCHES_ATTR, new CatchGrammar( env, diags, null, rvc, CONTROLLER_TAG_NAME, fcInfo ) );
49         addMemberArrayGrammar( MESSAGE_BUNDLES_ATTR, new MessageBundleGrammar( env, diags, null, rvc, fcInfo ) );
50         addMemberArrayGrammar( VALIDATABLE_BEANS_ATTR, new ValidatableBeanGrammar( env, diags, rvc ) );
51         addMemberArrayGrammar( SIMPLE_ACTIONS_ATTR, new SimpleActionGrammar( env, diags, rvc, fcInfo ) );
52     }
53     
54     public String JavaDoc[][] getMutuallyExclusiveAttrs()
55     {
56         return null;
57     }
58
59     public String JavaDoc[][] getRequiredAttrs()
60     {
61         return null;
62     }
63
64     public String JavaDoc[][] getAttrDependencies()
65     {
66         return null;
67     }
68 }
69
Popular Tags