View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.config.impl.digester.elements;
20  
21  import java.io.Serializable;
22  import java.util.ArrayList;
23  import java.util.List;
24  
25  /**
26   * @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
27   */
28  public class Application extends org.apache.myfaces.config.element.Application implements Serializable
29  {
30  
31      private final List<String> actionListener = new ArrayList<String>();
32      private final List<String> defaultRenderkitId = new ArrayList<String>();
33      private final List<String> defaultValidatorIds = new ArrayList<String>();
34      private final List<String> messageBundle = new ArrayList<String>();
35      private final List<String> navigationHandler = new ArrayList<String>();
36      private final List<String> partialTraversal = new ArrayList<String>();
37      private final List<String> resourceHandler = new ArrayList<String>();
38      private final List<String> viewHandler = new ArrayList<String>();
39      private final List<String> stateManager = new ArrayList<String>();
40      private final List<String> propertyResolver = new ArrayList<String>();
41      private final List<String> variableResolver = new ArrayList<String>();
42      private final List<org.apache.myfaces.config.element.LocaleConfig> localeConfig
43              = new ArrayList<org.apache.myfaces.config.element.LocaleConfig>();
44      private final List<String> elResolver = new ArrayList<String>();
45      private final List<org.apache.myfaces.config.element.ResourceBundle> resourceBundle
46              = new ArrayList<org.apache.myfaces.config.element.ResourceBundle>();
47      private final List<org.apache.myfaces.config.element.SystemEventListener> systemEventListeners
48              = new ArrayList<org.apache.myfaces.config.element.SystemEventListener>();
49      private boolean defaultValidatorsPresent = false;
50      
51      public void addActionListener(String listener)
52      {
53          actionListener.add(listener);
54      }
55  
56      public void addDefaultRenderkitId(String id)
57      {
58          defaultRenderkitId.add(id);
59      }
60      
61      public void addDefaultValidatorId (String id)
62      {
63          defaultValidatorIds.add (id);
64      }
65      
66      public void addMessageBundle(String bundle)
67      {
68          messageBundle.add(bundle);
69      }
70  
71      public void addNavigationHandler(String handler)
72      {
73          navigationHandler.add(handler);
74      }
75      
76      public void addPartialTraversal (String traversal)
77      {
78          partialTraversal.add (traversal);
79      }
80      
81      public void addStateManager(String manager)
82      {
83          stateManager.add(manager);
84      }
85      
86      public void addSystemEventListener (org.apache.myfaces.config.element.SystemEventListener systemEventListener)
87      {
88          systemEventListeners.add (systemEventListener);
89      }
90      
91      public void addPropertyResolver(String resolver)
92      {
93          propertyResolver.add(resolver);
94      }
95  
96      public void addVariableResolver(String handler)
97      {
98          variableResolver.add(handler);
99      }
100 
101     public void addLocaleConfig(org.apache.myfaces.config.element.LocaleConfig config)
102     {
103         localeConfig.add(config);
104     }
105 
106     public void addResourceHandler(String handler)
107     {
108         resourceHandler.add(handler);
109     }
110 
111     public void addViewHandler(String handler)
112     {
113         viewHandler.add(handler);
114     }
115 
116     public void addElResolver(String handler)
117     {
118         elResolver.add(handler);
119     }
120 
121     public void addResourceBundle(org.apache.myfaces.config.element.ResourceBundle bundle)
122     {
123         resourceBundle.add(bundle);
124     }
125 
126     public List<String> getActionListener()
127     {
128         return actionListener;
129     }
130 
131     public List<String> getDefaultRenderkitId()
132     {
133         return defaultRenderkitId;
134     }
135     
136     public List<String> getDefaultValidatorIds()
137     {
138         return defaultValidatorIds;
139     }
140     
141     public List<String> getMessageBundle()
142     {
143         return messageBundle;
144     }
145 
146     public List<String> getNavigationHandler()
147     {
148         return navigationHandler;
149     }
150     
151     public List<String> getPartialTraversal ()
152     {
153         return partialTraversal;
154     }
155     
156     public List<String> getResourceHandler()
157     {
158         return resourceHandler;
159     }
160     
161     public List<org.apache.myfaces.config.element.SystemEventListener> getSystemEventListeners ()
162     {
163         return systemEventListeners;
164     }
165     
166     public List<String> getViewHandler()
167     {
168         return viewHandler;
169     }
170 
171     public List<String> getStateManager()
172     {
173         return stateManager;
174     }
175 
176     public List<String> getPropertyResolver()
177     {
178         return propertyResolver;
179     }
180 
181     public List<String> getVariableResolver()
182     {
183         return variableResolver;
184     }
185 
186     public List<org.apache.myfaces.config.element.LocaleConfig> getLocaleConfig()
187     {
188         return localeConfig;
189     }
190 
191     public List<String> getElResolver()
192     {
193         return elResolver;
194     }
195 
196     public List<org.apache.myfaces.config.element.ResourceBundle> getResourceBundle()
197     {
198         return resourceBundle;
199     }
200 
201     public boolean isDefaultValidatorsPresent()
202     {
203         return defaultValidatorsPresent;
204     }
205 
206     public void setDefaultValidatorsPresent()
207     {
208         defaultValidatorsPresent = true;
209     }
210     
211 }