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.element;
20  
21  import java.io.Serializable;
22  import java.util.Collection;
23  import java.util.Collections;
24  import java.util.Map;
25  import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
26  
27  
28  
29  /**
30   * 
31   * @author Leonardo Uribe
32   * @since 2.0.3
33   */
34  public abstract class FacesConfigData implements Serializable
35  {
36  
37      /**
38       * 
39       */
40      private static final long serialVersionUID = -5278120443255410184L;
41  
42      /** @return Iterator over ApplicationFactory class names */
43      public abstract Collection<String> getApplicationFactoryIterator();
44      
45      /** @return Iterator over ExceptionHandlerFactory class names */
46      public abstract Collection<String> getExceptionHandlerFactoryIterator();
47  
48      /** @return Iterator over ExternalContextFactory class names */
49      public abstract Collection<String> getExternalContextFactoryIterator();
50  
51      /** @return Iterator over FacesContextFactory class names */
52      public abstract Collection<String> getFacesContextFactoryIterator();
53  
54      /** @return Iterator over LifecycleFactory class names */
55      public abstract Collection<String> getLifecycleFactoryIterator();
56  
57      /** @return Iterator over ViewDeclarationLanguageFactory class names */
58      public abstract Collection<String> getViewDeclarationLanguageFactoryIterator();
59  
60      /** @return Iterator over PartialViewContextFactory class names */
61      public abstract Collection<String> getPartialViewContextFactoryIterator();
62  
63      /** @return Iterator over RenderKit factory class names */
64      public abstract Collection<String> getRenderKitFactoryIterator();
65      
66      /** @return Iterator over TagHandlerDelegateFactory factory class names */
67      public abstract Collection<String> getTagHandlerDelegateFactoryIterator();
68  
69      /** @return Iterator over VisitContextFactory factory class names */
70      public abstract Collection<String> getVisitContextFactoryIterator();
71      
72      /**
73       * @since 2.1.0 
74       * @return Iterator over FaceletCacheFactory factory class names
75       */
76      public Collection<String> getFaceletCacheFactoryIterator()
77      {
78          return Collections.emptyList();
79      }
80      
81      /**
82       * @since 2.2
83       * @return 
84       */
85      public Collection<String> getFlashFactoryIterator()
86      {
87          return Collections.emptyList();
88      }
89      
90      public Collection<String> getClientWindowFactoryIterator()
91      {
92          return Collections.emptyList();
93      }
94      
95      /**
96       * @since 2.2
97       * @return 
98       */
99      public Collection<String> getFlowHandlerFactoryIterator()
100     {
101         return Collections.emptyList();
102     }
103 
104     /** @return Iterator over ActionListener class names (in reverse order!) */
105     public abstract Collection<String> getActionListenerIterator();
106 
107     /** @return the default render kit id */
108     public abstract String getDefaultRenderKitId();
109 
110     /** @return Iterator over message bundle names (in reverse order!) */
111     public abstract String getMessageBundle();
112 
113     /** @return Iterator over NavigationHandler class names */
114     public abstract Collection<String> getNavigationHandlerIterator();
115 
116     /** @return Iterator over ViewHandler class names */
117     public abstract Collection<String> getViewHandlerIterator();
118 
119     /** @return Iterator over StateManager class names*/
120     public abstract Collection<String> getStateManagerIterator();
121     
122     /** @return Iterator over ResourceHandler class names*/
123     public abstract Collection<String> getResourceHandlerIterator();
124 
125     /** @return Iterator over PropertyResolver class names */
126     public abstract Collection<String> getPropertyResolverIterator();
127 
128     /** @return Iterator over VariableResolver class names  */
129     public abstract Collection<String> getVariableResolverIterator();
130 
131     /** @return the default locale name */
132     public abstract String getDefaultLocale();
133 
134     /** @return Iterator over supported locale names */
135     public abstract Collection<String> getSupportedLocalesIterator();
136 
137 
138     /** @return Iterator over all defined component types */
139     public abstract Collection<String> getComponentTypes();
140 
141     /** @return component class that belongs to the given component type */
142     public abstract String getComponentClass(String componentType);
143 
144     public abstract Map<String, String> getComponentClassesByType();
145 
146     /** @return Iterator over all defined converter ids */
147     public abstract Collection<String> getConverterIds();
148 
149     /** @return Iterator over all classes with an associated converter  */
150     public abstract Collection<String> getConverterClasses();
151     
152     public abstract Map<String, String> getConverterClassesById();
153     
154     public abstract Map<String, String> getConverterClassesByClass();
155 
156     /** @return Iterator over the config classes for the converters  */
157     public abstract Collection<String> getConverterConfigurationByClassName();
158 
159     /** delivers a converter-configuration for one class-name */
160     public abstract Converter getConverterConfiguration(String converterClassName);
161 
162     /** @return converter class that belongs to the given converter id */
163     public abstract String getConverterClassById(String converterId);
164 
165     /** @return converter class that is associated with the given class name  */
166     public abstract String getConverterClassByClass(String className);
167 
168 
169     /** @return Iterator over all defined validator ids */
170     public abstract Collection<String> getValidatorIds();
171 
172     /** @return validator class name that belongs to the given validator id */
173     public abstract String getValidatorClass(String validatorId);
174 
175     public abstract Map<String, String> getValidatorClassesById();
176 
177     /**
178      * @return Iterator over {@link org.apache.myfaces.config.element.ManagedBean ManagedBean}s
179      */
180     public abstract Collection<ManagedBean> getManagedBeans();
181 
182     /**
183      * @return Iterator over {@link org.apache.myfaces.config.element.NavigationRule NavigationRule}s
184      */
185     public abstract Collection<NavigationRule> getNavigationRules();
186 
187 
188 
189     /** @return Iterator over all defined renderkit ids */
190     public abstract Collection<String> getRenderKitIds();
191 
192     /** @return renderkit class name for given renderkit id */
193     public abstract Collection<String> getRenderKitClasses(String renderKitId);
194 
195     /**
196      * @return Iterator over {@link org.apache.myfaces.config.element.ClientBehaviorRenderer ClientBehaviorRenderer}s
197      *         for the given renderKitId
198      */
199     public abstract Collection<ClientBehaviorRenderer> getClientBehaviorRenderers (String renderKitId);
200     
201     /**
202      * @return Iterator over {@link org.apache.myfaces.config.element.Renderer Renderer}s for the given renderKitId
203      */
204     public abstract Collection<Renderer> getRenderers(String renderKitId);
205 
206 
207     /**
208      * @return Iterator over {@link javax.faces.event.PhaseListener} implementation class names
209      */
210     public abstract Collection<String> getLifecyclePhaseListeners();
211 
212     /**
213      * @return Iterator over {@link ResourceBundle}
214      */
215     public abstract Collection<ResourceBundle> getResourceBundles();
216 
217     /**
218      * @return Iterator over {@link javax.el.ELResolver} implementation class names
219      */
220     public abstract Collection<String> getElResolvers();
221     
222     /**
223      * @return Iterator over (@link SystemEventListener) implementation class names 
224      */
225     public abstract Collection<SystemEventListener> getSystemEventListeners();
226     
227     /**
228      * @return Collection over behaviors
229      */
230     public abstract Collection<Behavior> getBehaviors ();
231     
232     /**
233      * @return Collection over all defined default validator ids
234      */
235     public abstract Collection<String> getDefaultValidatorIds ();
236     
237     /**
238      * @return the partial traversal class name
239      */
240     public abstract String getPartialTraversal ();
241     
242     /**
243      * @return Faces application version.
244      */
245     public abstract String getFacesVersion ();
246     
247     /**
248      * 
249      * @return
250      */
251     public abstract Collection<NamedEvent> getNamedEvents();
252 
253     /**
254      * 
255      * @since 2.1.0
256      */
257     public Collection<FaceletsProcessing> getFaceletsProcessing()
258     {
259         return Collections.emptyList();
260     }
261     
262     public FaceletsProcessing getFaceletsProcessingConfiguration(String fileExtension)
263     {
264         return null;
265     }
266 
267     /**
268      * @since 2.2.0
269      * @return 
270      */
271     public Collection<FacesFlowDefinition> getFacesFlowDefinitions()
272     {
273         return Collections.emptyList();
274     }
275     
276     public Collection<String> getProtectedViewUrlPatterns()
277     {
278         return Collections.emptyList();
279     }
280     
281     public Collection<ContractMapping> getResourceLibraryContractMappings()
282     {
283         return Collections.emptyList();
284     }
285     
286     public Collection<ComponentTagDeclaration> getComponentTagDeclarations()
287     {
288         return Collections.emptyList();
289     }
290     
291     public Collection<String> getResourceResolvers()
292     {
293         return Collections.emptyList();
294     }
295     
296     public Collection<FaceletTagLibrary> getTagLibraries()
297     {
298         return Collections.emptyList();
299     }
300     
301     public Collection<ViewPoolMapping> getViewPoolMappings()
302     {
303         return Collections.emptyList();
304     }
305 }