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 = new ArrayList<org.apache.myfaces.config.element.LocaleConfig>();
43      private final List<String> elResolver = new ArrayList<String>();
44      private final List<org.apache.myfaces.config.element.ResourceBundle> resourceBundle = new ArrayList<org.apache.myfaces.config.element.ResourceBundle>();
45      private final List<org.apache.myfaces.config.element.SystemEventListener> systemEventListeners = new ArrayList<org.apache.myfaces.config.element.SystemEventListener>();
46      private boolean defaultValidatorsPresent = false;
47      
48      public void addActionListener(String listener)
49      {
50          actionListener.add(listener);
51      }
52  
53      public void addDefaultRenderkitId(String id)
54      {
55          defaultRenderkitId.add(id);
56      }
57      
58      public void addDefaultValidatorId (String id)
59      {
60          defaultValidatorIds.add (id);
61      }
62      
63      public void addMessageBundle(String bundle)
64      {
65          messageBundle.add(bundle);
66      }
67  
68      public void addNavigationHandler(String handler)
69      {
70          navigationHandler.add(handler);
71      }
72      
73      public void addPartialTraversal (String traversal)
74      {
75          partialTraversal.add (traversal);
76      }
77      
78      public void addStateManager(String manager)
79      {
80          stateManager.add(manager);
81      }
82      
83      public void addSystemEventListener (org.apache.myfaces.config.element.SystemEventListener systemEventListener)
84      {
85          systemEventListeners.add (systemEventListener);
86      }
87      
88      public void addPropertyResolver(String resolver)
89      {
90          propertyResolver.add(resolver);
91      }
92  
93      public void addVariableResolver(String handler)
94      {
95          variableResolver.add(handler);
96      }
97  
98      public void addLocaleConfig(org.apache.myfaces.config.element.LocaleConfig config)
99      {
100         localeConfig.add(config);
101     }
102 
103     public void addResourceHandler(String handler)
104     {
105         resourceHandler.add(handler);
106     }
107 
108     public void addViewHandler(String handler)
109     {
110         viewHandler.add(handler);
111     }
112 
113     public void addElResolver(String handler)
114     {
115         elResolver.add(handler);
116     }
117 
118     public void addResourceBundle(org.apache.myfaces.config.element.ResourceBundle bundle)
119     {
120         resourceBundle.add(bundle);
121     }
122 
123     public List<String> getActionListener()
124     {
125         return actionListener;
126     }
127 
128     public List<String> getDefaultRenderkitId()
129     {
130         return defaultRenderkitId;
131     }
132     
133     public List<String> getDefaultValidatorIds()
134     {
135         return defaultValidatorIds;
136     }
137     
138     public List<String> getMessageBundle()
139     {
140         return messageBundle;
141     }
142 
143     public List<String> getNavigationHandler()
144     {
145         return navigationHandler;
146     }
147     
148     public List<String> getPartialTraversal ()
149     {
150         return partialTraversal;
151     }
152     
153     public List<String> getResourceHandler()
154     {
155         return resourceHandler;
156     }
157     
158     public List<org.apache.myfaces.config.element.SystemEventListener> getSystemEventListeners ()
159     {
160         return systemEventListeners;
161     }
162     
163     public List<String> getViewHandler()
164     {
165         return viewHandler;
166     }
167 
168     public List<String> getStateManager()
169     {
170         return stateManager;
171     }
172 
173     public List<String> getPropertyResolver()
174     {
175         return propertyResolver;
176     }
177 
178     public List<String> getVariableResolver()
179     {
180         return variableResolver;
181     }
182 
183     public List<org.apache.myfaces.config.element.LocaleConfig> getLocaleConfig()
184     {
185         return localeConfig;
186     }
187 
188     public List<String> getElResolver()
189     {
190         return elResolver;
191     }
192 
193     public List<org.apache.myfaces.config.element.ResourceBundle> getResourceBundle()
194     {
195         return resourceBundle;
196     }
197 
198     public boolean isDefaultValidatorsPresent()
199     {
200         return defaultValidatorsPresent;
201     }
202 
203     public void setDefaultValidatorsPresent()
204     {
205         defaultValidatorsPresent = true;
206     }
207     
208 }