Coverage Report - org.apache.myfaces.config.impl.digester.DigesterFacesConfigDispenserImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
DigesterFacesConfigDispenserImpl
0%
0/299
0%
0/114
1.753
 
 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;
 20  
 
 21  
 import java.util.ArrayList;
 22  
 import java.util.Collection;
 23  
 import java.util.Collections;
 24  
 import java.util.HashMap;
 25  
 import java.util.LinkedHashMap;
 26  
 import java.util.List;
 27  
 import java.util.Map;
 28  
 
 29  
 import javax.faces.render.RenderKitFactory;
 30  
 
 31  
 import org.apache.myfaces.config.FacesConfigDispenser;
 32  
 import org.apache.myfaces.config.element.Behavior;
 33  
 import org.apache.myfaces.config.element.ClientBehaviorRenderer;
 34  
 import org.apache.myfaces.config.element.FaceletsProcessing;
 35  
 import org.apache.myfaces.config.element.FacesConfigExtension;
 36  
 import org.apache.myfaces.config.element.ManagedBean;
 37  
 import org.apache.myfaces.config.element.NavigationRule;
 38  
 import org.apache.myfaces.config.element.Renderer;
 39  
 import org.apache.myfaces.config.element.Application;
 40  
 import org.apache.myfaces.config.element.ComponentTagDeclaration;
 41  
 import org.apache.myfaces.config.element.ContractMapping;
 42  
 import org.apache.myfaces.config.element.Converter;
 43  
 import org.apache.myfaces.config.element.FacesConfig;
 44  
 import org.apache.myfaces.config.element.FacesFlowDefinition;
 45  
 import org.apache.myfaces.config.element.Factory;
 46  
 import org.apache.myfaces.config.element.LocaleConfig;
 47  
 import org.apache.myfaces.config.element.NamedEvent;
 48  
 import org.apache.myfaces.config.element.RenderKit;
 49  
 import org.apache.myfaces.config.element.ResourceBundle;
 50  
 import org.apache.myfaces.config.element.SystemEventListener;
 51  
 import org.apache.myfaces.config.element.ViewPoolMapping;
 52  
 import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
 53  
 import org.apache.myfaces.config.impl.digester.elements.RenderKitImpl;
 54  
 
 55  
 /**
 56  
  * @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
 57  
  */
 58  0
 public class DigesterFacesConfigDispenserImpl extends FacesConfigDispenser
 59  
 {
 60  
     /**
 61  
      * 
 62  
      */
 63  
     private static final long serialVersionUID = 3550379003287939559L;
 64  
     // Factories
 65  0
     private List<String> applicationFactories = new ArrayList<String>();
 66  0
     private List<String> exceptionHandlerFactories = new ArrayList<String>();
 67  0
     private List<String> externalContextFactories = new ArrayList<String>();
 68  0
     private List<String> facesContextFactories = new ArrayList<String>();
 69  0
     private List<String> lifecycleFactories = new ArrayList<String>();
 70  0
     private List<String> viewDeclarationLanguageFactories = new ArrayList<String>();
 71  0
     private List<String> partialViewContextFactories = new ArrayList<String>();
 72  0
     private List<String> renderKitFactories = new ArrayList<String>();
 73  0
     private List<String> tagHandlerDelegateFactories = new ArrayList<String>();
 74  0
     private List<String> visitContextFactories = new ArrayList<String>();
 75  0
     private List<String> faceletCacheFactories = new ArrayList<String>();
 76  0
     private List<String> flashFactories = new ArrayList<String>();
 77  0
     private List<String> clientWindowFactories = new ArrayList<String>();
 78  0
     private List<String> flowHandlerFactories = new ArrayList<String>();
 79  
     
 80  
     private String defaultRenderKitId;
 81  
     private String messageBundle;
 82  
     private String partialTraversal;
 83  
     private String facesVersion;
 84  
     
 85  
     private LocaleConfig localeConfig;
 86  
 
 87  0
     private Map<String, String> components = new HashMap<String, String>();
 88  0
     private Map<String, String> converterByClass = new HashMap<String, String>();
 89  0
     private Map<String, String> converterById = new HashMap<String, String>();
 90  0
     private Map<String, String> validators = new HashMap<String, String>();
 91  0
     private List<Behavior> behaviors = new ArrayList<Behavior>();
 92  
     
 93  0
     private Map<String, Converter> converterConfigurationByClassName = new HashMap<String, Converter>();
 94  
     
 95  0
     private Map<String, RenderKit> renderKits
 96  
             = new LinkedHashMap<String, RenderKit>();
 97  
     
 98  0
     private List<String> actionListeners = new ArrayList<String>();
 99  0
     private List<String> elResolvers = new ArrayList<String>();
 100  0
     private List<String> lifecyclePhaseListeners = new ArrayList<String>();
 101  0
     private List<String> navigationHandlers = new ArrayList<String>();
 102  0
     private List<String> propertyResolver = new ArrayList<String>();
 103  0
     private List<String> resourceHandlers = new ArrayList<String>();
 104  0
     private List<String> stateManagers = new ArrayList<String>();
 105  0
     private List<String> variableResolver = new ArrayList<String>();
 106  0
     private List<String> viewHandlers = new ArrayList<String>();
 107  0
     private List<String> defaultValidatorIds = new ArrayList<String>();
 108  0
     private List<String> defaultAnnotatedValidatorIds = new ArrayList<String>();
 109  
     
 110  0
     private List<ManagedBean> managedBeans = new ArrayList<ManagedBean>();
 111  
     
 112  0
     private List<NavigationRule> navigationRules = new ArrayList<NavigationRule>();
 113  0
     private List<ResourceBundle> resourceBundles = new ArrayList<ResourceBundle>();
 114  
 
 115  0
     private List<SystemEventListener> systemEventListeners = new ArrayList<SystemEventListener>();
 116  
     
 117  0
     private List<NamedEvent> namedEvents = new ArrayList<NamedEvent>();
 118  
     
 119  0
     private Map<String, FaceletsProcessing> faceletsProcessingByFileExtension
 120  
             = new HashMap<String, FaceletsProcessing>();
 121  
     
 122  0
     private List<FacesFlowDefinition> facesFlowDefinitions = new ArrayList<FacesFlowDefinition>();
 123  
     
 124  0
     private List<String> protectedViewUrlPatterns = new ArrayList<String>();
 125  0
     private List<ContractMapping> resourceLibraryContractMappings = new ArrayList<ContractMapping>();
 126  
     
 127  0
     private List<ComponentTagDeclaration> componentTagDeclarations = new ArrayList<ComponentTagDeclaration>();
 128  0
     private List<FaceletTagLibrary> faceletTagLibraries = new ArrayList<FaceletTagLibrary>();
 129  
     
 130  0
     private List <String> resourceResolvers = new ArrayList<String>();
 131  
     
 132  0
     private List<ViewPoolMapping> viewPoolMappings = new ArrayList<ViewPoolMapping>();
 133  
     
 134  
     // Unmodifiable list/maps to avoid modifications
 135  
     private transient List<String> umapplicationFactories;
 136  
     private transient List<String> umexceptionHandlerFactories;
 137  
     private transient List<String> umexternalContextFactories;
 138  
     private transient List<String> umfacesContextFactories;
 139  
     private transient List<String> umlifecycleFactories;
 140  
     private transient List<String> umviewDeclarationLanguageFactories;
 141  
     private transient List<String> umpartialViewContextFactories;
 142  
     private transient List<String> umrenderKitFactories;
 143  
     private transient List<String> umtagHandlerDelegateFactories;
 144  
     private transient List<String> umvisitContextFactories;
 145  
     private transient List<String> umfaceletCacheFactories;
 146  
     private transient List<String> umflashFactories;
 147  
     private transient List<String> umclientWindowFactories;
 148  
     private transient List<String> umflowHandlerFactories;
 149  
     private transient List<Behavior> umbehaviors;
 150  
     private transient List<String> umactionListeners;
 151  
     private transient List<String> umelResolvers;
 152  
     private transient List<String> umlifecyclePhaseListeners;
 153  
     private transient List<String> umnavigationHandlers;
 154  
     private transient List<String> umpropertyResolver;
 155  
     private transient List<String> umresourceHandlers;
 156  
     private transient List<String> umstateManagers;
 157  
     private transient List<String> umvariableResolver;
 158  
     private transient List<String> umviewHandlers;
 159  
     private transient List<ManagedBean> ummanagedBeans;
 160  
     private transient List<NavigationRule> umnavigationRules;
 161  
     private transient List<ResourceBundle> umresourceBundles;
 162  
     private transient List<SystemEventListener> umsystemEventListeners;
 163  
     private transient List<NamedEvent> umnamedEvents;
 164  
     private transient List<FacesFlowDefinition> umfacesFlowDefinitions;
 165  
     private transient List<String> umprotectedViewUrlPatterns;
 166  
     private transient List<ContractMapping> umresourceLibraryContractMappings;
 167  
     private transient List<ComponentTagDeclaration> umcomponentTagDeclarations;
 168  
     private transient List<FaceletTagLibrary> umfaceletTagLibraries;
 169  
     private transient List <String> umresourceResolvers;
 170  
     private transient List<ViewPoolMapping> umviewPoolMappings;
 171  
     
 172  
     /**
 173  
      * Add another unmarshalled faces config object.
 174  
      * 
 175  
      * @param config
 176  
      *            unmarshalled faces config object
 177  
      */
 178  
     public void feed(FacesConfig config)
 179  
     {
 180  0
         for (Factory factory : config.getFactories())
 181  
         {
 182  0
             applicationFactories.addAll(factory.getApplicationFactory());
 183  0
             exceptionHandlerFactories.addAll(factory.getExceptionHandlerFactory());
 184  0
             externalContextFactories.addAll(factory.getExternalContextFactory());
 185  0
             facesContextFactories.addAll(factory.getFacesContextFactory());
 186  0
             lifecycleFactories.addAll(factory.getLifecycleFactory());
 187  0
             viewDeclarationLanguageFactories.addAll(factory.getViewDeclarationLanguageFactory());
 188  0
             partialViewContextFactories.addAll(factory.getPartialViewContextFactory());
 189  0
             renderKitFactories.addAll(factory.getRenderkitFactory());
 190  0
             tagHandlerDelegateFactories.addAll(factory.getTagHandlerDelegateFactory());
 191  0
             visitContextFactories.addAll(factory.getVisitContextFactory());
 192  0
             faceletCacheFactories.addAll(factory.getFaceletCacheFactory());
 193  0
             flashFactories.addAll(factory.getFlashFactory());
 194  0
             clientWindowFactories.addAll(factory.getClientWindowFactory());
 195  0
             flowHandlerFactories.addAll(factory.getFlowHandlerFactory());
 196  0
         }
 197  
 
 198  0
         components.putAll(config.getComponents());
 199  0
         validators.putAll(config.getValidators());
 200  0
         behaviors.addAll (config.getBehaviors());
 201  
         
 202  0
         for (Application application : config.getApplications())
 203  
         {
 204  0
             if (!application.getDefaultRenderkitId().isEmpty())
 205  
             {
 206  0
                 defaultRenderKitId =
 207  
                         application.getDefaultRenderkitId().get(application.getDefaultRenderkitId().size() - 1);
 208  
             }
 209  
 
 210  0
             if (!application.getMessageBundle().isEmpty())
 211  
             {
 212  0
                 messageBundle = application.getMessageBundle().get(application.getMessageBundle().size() - 1);
 213  
             }
 214  
 
 215  0
             if (!application.getLocaleConfig().isEmpty())
 216  
             {
 217  0
                 localeConfig = application.getLocaleConfig().get(application.getLocaleConfig().size() - 1);
 218  
             }
 219  
             
 220  0
             if (!application.getPartialTraversal().isEmpty())
 221  
             {
 222  0
                 partialTraversal = application.getPartialTraversal().get (application.getPartialTraversal().size() - 1);
 223  
             }
 224  
             
 225  0
             actionListeners.addAll(application.getActionListener());
 226  0
             navigationHandlers.addAll(application.getNavigationHandler());
 227  0
             resourceHandlers.addAll(application.getResourceHandler());
 228  0
             viewHandlers.addAll(application.getViewHandler());
 229  0
             stateManagers.addAll(application.getStateManager());
 230  0
             propertyResolver.addAll(application.getPropertyResolver());
 231  0
             variableResolver.addAll(application.getVariableResolver());
 232  0
             resourceBundles.addAll(application.getResourceBundle());
 233  0
             elResolvers.addAll(application.getElResolver());
 234  0
             resourceLibraryContractMappings.addAll(application.getResourceLibraryContractMappings());
 235  
 
 236  
             // Jsf 2.0 spec section 3.5.3 says this: 
 237  
             // ".... Any configuration resource that declares a list of default 
 238  
             // validators overrides any list provided in a previously processed
 239  
             // configuration resource. If an empty <default-validators/> element 
 240  
             // is found in a configuration resource, the list
 241  
             // of default validators must be cleared....."
 242  0
             if (application.isDefaultValidatorsPresent())
 243  
             {
 244  
                 // we have a <default-validators> element, so any existing
 245  
                 // default validators should be removed
 246  0
                 defaultValidatorIds.clear();
 247  
                 
 248  
                 // now add all default-validator entries (could be zero)
 249  0
                 defaultValidatorIds.addAll(application.getDefaultValidatorIds());
 250  
             }
 251  
             else
 252  
             {
 253  
                 //If isDefaultValidatorsPresent() is false, and there are still 
 254  
                 //default validators, it means they were added using annotations, so
 255  
                 //they are not affected by the empty entry according to section 3.5.3
 256  0
                 defaultAnnotatedValidatorIds.addAll(application.getDefaultValidatorIds());
 257  
             }
 258  
             
 259  0
             systemEventListeners.addAll(application.getSystemEventListeners());
 260  0
         }
 261  
 
 262  0
         for (Converter converter : config.getConverters())
 263  
         {
 264  0
             if (converter.getConverterId() != null)
 265  
             {
 266  0
                 converterById.put(converter.getConverterId(),converter
 267  
                         .getConverterClass());
 268  
             }
 269  0
             if (converter.getForClass() != null)
 270  
             {
 271  0
                 converterByClass.put(converter.getForClass(),converter
 272  
                         .getConverterClass());
 273  
             }
 274  
 
 275  0
             converterConfigurationByClassName.put(converter.getConverterClass(), converter);
 276  0
         }
 277  
 
 278  0
         for (RenderKit renderKit : config.getRenderKits())
 279  
         {
 280  0
             String renderKitId = renderKit.getId();
 281  
 
 282  0
             if (renderKitId == null)
 283  
             {
 284  0
                 renderKitId = RenderKitFactory.HTML_BASIC_RENDER_KIT;
 285  
             }
 286  
 
 287  0
             RenderKit existing = renderKits.get(renderKitId);
 288  
 
 289  0
             if (existing == null)
 290  
             {
 291  0
                 existing = new RenderKitImpl();
 292  0
                 existing.merge(renderKit);
 293  0
                 renderKits.put(renderKitId, existing);
 294  
             }
 295  
             else
 296  
             {
 297  0
                 existing.merge(renderKit);
 298  
             }
 299  0
         }
 300  
 
 301  0
         for (FacesConfigExtension extension : config.getFacesConfigExtensions())
 302  
         {
 303  0
             for (FaceletsProcessing faceletsProcessing : extension.getFaceletsProcessingList())
 304  
             {
 305  0
                 if (faceletsProcessing.getFileExtension() != null && faceletsProcessing.getFileExtension().length() > 0)
 306  
                 {
 307  0
                     faceletsProcessingByFileExtension.put(faceletsProcessing.getFileExtension(), faceletsProcessing);
 308  
                 }
 309  0
             }
 310  0
         }
 311  
         
 312  0
         for (ComponentTagDeclaration declaration : config.getComponentTagDeclarations().values())
 313  
         {
 314  0
             componentTagDeclarations.add(declaration);
 315  0
         }
 316  
         
 317  0
         faceletTagLibraries.addAll(config.getFaceletTagLibraryList());
 318  
 
 319  0
         lifecyclePhaseListeners.addAll(config.getLifecyclePhaseListener());
 320  0
         managedBeans.addAll(config.getManagedBeans());
 321  0
         navigationRules.addAll(config.getNavigationRules());
 322  0
         facesVersion = config.getVersion();
 323  0
         namedEvents.addAll(config.getNamedEvents());
 324  0
         facesFlowDefinitions.addAll(config.getFacesFlowDefinitions());
 325  0
         protectedViewUrlPatterns.addAll(config.getProtectedViewsUrlPatternList());
 326  0
         resourceResolvers.addAll(config.getResourceResolversList());
 327  0
         for (FacesConfigExtension extension : config.getFacesConfigExtensions())
 328  
         {
 329  0
             viewPoolMappings.addAll(extension.getViewPoolMappings());
 330  0
         }
 331  0
     }
 332  
 
 333  
     /**
 334  
      * Add another ApplicationFactory class name
 335  
      * 
 336  
      * @param factoryClassName
 337  
      *            a class name
 338  
      */
 339  
     public void feedApplicationFactory(String factoryClassName)
 340  
     {
 341  0
         applicationFactories.add(factoryClassName);
 342  0
     }
 343  
 
 344  
     public void feedExceptionHandlerFactory(String factoryClassName)
 345  
     {
 346  0
         exceptionHandlerFactories.add(factoryClassName);
 347  0
     }
 348  
 
 349  
     public void feedExternalContextFactory(String factoryClassName)
 350  
     {
 351  0
         externalContextFactories.add(factoryClassName);
 352  0
     }
 353  
 
 354  
     /**
 355  
      * Add another FacesContextFactory class name
 356  
      * 
 357  
      * @param factoryClassName
 358  
      *            a class name
 359  
      */
 360  
     public void feedFacesContextFactory(String factoryClassName)
 361  
     {
 362  0
         facesContextFactories.add(factoryClassName);
 363  0
     }
 364  
 
 365  
     /**
 366  
      * Add another LifecycleFactory class name
 367  
      * 
 368  
      * @param factoryClassName
 369  
      *            a class name
 370  
      */
 371  
     public void feedLifecycleFactory(String factoryClassName)
 372  
     {
 373  0
         lifecycleFactories.add(factoryClassName);
 374  0
     }
 375  
 
 376  
     public void feedViewDeclarationLanguageFactory(String factoryClassName)
 377  
     {
 378  0
         viewDeclarationLanguageFactories.add(factoryClassName);
 379  0
     }
 380  
 
 381  
     public void feedPartialViewContextFactory(String factoryClassName)
 382  
     {
 383  0
         partialViewContextFactories.add(factoryClassName);
 384  0
     }
 385  
 
 386  
     /**
 387  
      * Add another RenderKitFactory class name
 388  
      * 
 389  
      * @param factoryClassName
 390  
      *            a class name
 391  
      */
 392  
     public void feedRenderKitFactory(String factoryClassName)
 393  
     {
 394  0
         renderKitFactories.add(factoryClassName);
 395  0
     }
 396  
 
 397  
     public void feedTagHandlerDelegateFactory(String factoryClassName)
 398  
     {
 399  0
         tagHandlerDelegateFactories.add(factoryClassName);
 400  0
     }
 401  
 
 402  
     public void feedVisitContextFactory(String factoryClassName)
 403  
     {
 404  0
         visitContextFactories.add(factoryClassName);
 405  0
     }
 406  
 
 407  
     /**
 408  
      * @return Collection over ApplicationFactory class names
 409  
      */
 410  
     public Collection<String> getApplicationFactoryIterator()
 411  
     {
 412  0
         if (umapplicationFactories == null)
 413  
         {
 414  0
             umapplicationFactories = Collections.unmodifiableList(applicationFactories);
 415  
         }
 416  0
         return umapplicationFactories;
 417  
     }
 418  
 
 419  
     public Collection<String> getExceptionHandlerFactoryIterator()
 420  
     {
 421  0
         if (umexceptionHandlerFactories == null)
 422  
         {
 423  0
             umexceptionHandlerFactories = Collections.unmodifiableList(exceptionHandlerFactories);
 424  
         }
 425  0
         return umexceptionHandlerFactories;
 426  
     }
 427  
 
 428  
     public Collection<String> getExternalContextFactoryIterator()
 429  
     {
 430  0
         if (umexternalContextFactories == null)
 431  
         {
 432  0
             umexternalContextFactories = Collections.unmodifiableList(externalContextFactories);
 433  
         }
 434  0
         return umexternalContextFactories;
 435  
     }
 436  
 
 437  
     /**
 438  
      * @return Collection over FacesContextFactory class names
 439  
      */
 440  
     public Collection<String> getFacesContextFactoryIterator()
 441  
     {
 442  0
         if (umfacesContextFactories == null)
 443  
         {
 444  0
             umfacesContextFactories = Collections.unmodifiableList(facesContextFactories);
 445  
         }
 446  0
         return umfacesContextFactories;
 447  
     }
 448  
 
 449  
     /**
 450  
      * @return Collection over LifecycleFactory class names
 451  
      */
 452  
     public Collection<String> getLifecycleFactoryIterator()
 453  
     {
 454  0
         if (umlifecycleFactories == null)
 455  
         {
 456  0
             umlifecycleFactories = Collections.unmodifiableList(lifecycleFactories);
 457  
         }
 458  0
         return umlifecycleFactories;
 459  
     }
 460  
 
 461  
     public Collection<String> getViewDeclarationLanguageFactoryIterator()
 462  
     {
 463  0
         if (umviewDeclarationLanguageFactories == null)
 464  
         {
 465  0
             umviewDeclarationLanguageFactories = Collections.unmodifiableList(viewDeclarationLanguageFactories);
 466  
         }
 467  0
         return umviewDeclarationLanguageFactories;
 468  
     }
 469  
 
 470  
     public Collection<String> getPartialViewContextFactoryIterator()
 471  
     {
 472  0
         if (umpartialViewContextFactories == null)
 473  
         {
 474  0
             umpartialViewContextFactories = Collections.unmodifiableList(partialViewContextFactories);
 475  
         }
 476  0
         return umpartialViewContextFactories;
 477  
     }
 478  
 
 479  
     /**
 480  
      * @return Collection over RenderKit factory class names
 481  
      */
 482  
     public Collection<String> getRenderKitFactoryIterator()
 483  
     {
 484  0
         if (umrenderKitFactories == null)
 485  
         {
 486  0
             umrenderKitFactories = Collections.unmodifiableList(renderKitFactories);
 487  
         }
 488  0
         return umrenderKitFactories;
 489  
     }
 490  
 
 491  
     public Collection<String> getTagHandlerDelegateFactoryIterator()
 492  
     {
 493  0
         if (umtagHandlerDelegateFactories == null)
 494  
         {
 495  0
             umtagHandlerDelegateFactories = Collections.unmodifiableList(tagHandlerDelegateFactories);
 496  
         }
 497  0
         return umtagHandlerDelegateFactories;
 498  
     }
 499  
 
 500  
     public Collection<String> getVisitContextFactoryIterator()
 501  
     {
 502  0
         if (umvisitContextFactories == null)
 503  
         {
 504  0
             umvisitContextFactories = Collections.unmodifiableList(visitContextFactories);
 505  
         }
 506  0
         return umvisitContextFactories;
 507  
     }
 508  
 
 509  
     /**
 510  
      * @return Collection over ActionListener class names
 511  
      */
 512  
     public Collection<String> getActionListenerIterator()
 513  
     {
 514  0
         if (umactionListeners == null)
 515  
         {
 516  0
             umactionListeners = Collections.unmodifiableList(actionListeners);
 517  
         }
 518  0
         return umactionListeners;
 519  
     }
 520  
 
 521  
     /**
 522  
      * @return the default render kit id
 523  
      */
 524  
     public String getDefaultRenderKitId()
 525  
     {
 526  0
         return defaultRenderKitId;
 527  
     }
 528  
 
 529  
     /**
 530  
      * @return Collection over message bundle names
 531  
      */
 532  
     public String getMessageBundle()
 533  
     {
 534  0
         return messageBundle;
 535  
     }
 536  
 
 537  
     /**
 538  
      * @return Collection over NavigationHandler class names
 539  
      */
 540  
     public Collection<String> getNavigationHandlerIterator()
 541  
     {
 542  0
         if (umnavigationHandlers == null)
 543  
         {
 544  0
             umnavigationHandlers = Collections.unmodifiableList(navigationHandlers);
 545  
         }
 546  0
         return umnavigationHandlers;
 547  
     }
 548  
 
 549  
     /**
 550  
      * @return the partial traversal class name
 551  
      */
 552  
     public String getPartialTraversal ()
 553  
     {
 554  0
         return partialTraversal;
 555  
     }
 556  
     
 557  
     /**
 558  
      * @return Collection over ResourceHandler class names
 559  
      */
 560  
     @Override
 561  
     public Collection<String> getResourceHandlerIterator()
 562  
     {
 563  0
         if (umresourceHandlers == null)
 564  
         {
 565  0
             umresourceHandlers = Collections.unmodifiableList(resourceHandlers);
 566  
         }
 567  0
         return umresourceHandlers;
 568  
     }
 569  
 
 570  
     /**
 571  
      * @return Collection over ViewHandler class names
 572  
      */
 573  
     @Override
 574  
     public Collection<String> getViewHandlerIterator()
 575  
     {
 576  0
         if (umviewHandlers == null)
 577  
         {
 578  0
             umviewHandlers = Collections.unmodifiableList(viewHandlers);
 579  
         }
 580  0
         return umviewHandlers;
 581  
     }
 582  
 
 583  
     /**
 584  
      * @return Collection over StateManager class names
 585  
      */
 586  
     @Override
 587  
     public Collection<String> getStateManagerIterator()
 588  
     {
 589  0
         if (umstateManagers == null)
 590  
         {
 591  0
             umstateManagers = Collections.unmodifiableList(stateManagers);
 592  
         }
 593  0
         return umstateManagers;
 594  
     }
 595  
 
 596  
     /**
 597  
      * @return Collection over PropertyResolver class names
 598  
      */
 599  
     @Override
 600  
     public Collection<String> getPropertyResolverIterator()
 601  
     {
 602  0
         if (umpropertyResolver == null)
 603  
         {
 604  0
             umpropertyResolver = Collections.unmodifiableList(propertyResolver);
 605  
         }
 606  0
         return umpropertyResolver;
 607  
     }
 608  
 
 609  
     /**
 610  
      * @return Collection over VariableResolver class names
 611  
      */
 612  
     @Override
 613  
     public Collection<String> getVariableResolverIterator()
 614  
     {
 615  0
         if (umvariableResolver == null)
 616  
         {
 617  0
             umvariableResolver = Collections.unmodifiableList(variableResolver);
 618  
         }
 619  0
         return umvariableResolver;
 620  
     }
 621  
 
 622  
     /**
 623  
      * @return the default locale name
 624  
      */
 625  
     @Override
 626  
     public String getDefaultLocale()
 627  
     {
 628  0
         if (localeConfig != null)
 629  
         {
 630  0
             return localeConfig.getDefaultLocale();
 631  
         }
 632  0
         return null;
 633  
     }
 634  
 
 635  
     /**
 636  
      * @return Collection over supported locale names
 637  
      */
 638  
     @Override
 639  
     public Collection<String> getSupportedLocalesIterator()
 640  
     {
 641  
         Collection<String> locale;
 642  0
         if (localeConfig != null)
 643  
         {
 644  0
             locale = Collections.unmodifiableCollection(localeConfig.getSupportedLocales());
 645  
         }
 646  
         else
 647  
         {
 648  0
             locale = Collections.emptyList();
 649  
         }
 650  
 
 651  0
         return locale;
 652  
     }
 653  
 
 654  
     /**
 655  
      * @return Collection over all defined component types
 656  
      */
 657  
     @Override
 658  
     public Collection<String> getComponentTypes()
 659  
     {
 660  0
         return Collections.unmodifiableCollection(components.keySet());
 661  
     }
 662  
 
 663  
     @Override
 664  
     public Map<String, String> getComponentClassesByType()
 665  
     {
 666  0
         return Collections.unmodifiableMap(components);
 667  
     }
 668  
         
 669  
     /**
 670  
      * @return component class that belongs to the given component type
 671  
      */
 672  
     @Override
 673  
     public String getComponentClass(String componentType)
 674  
     {
 675  0
         return components.get(componentType);
 676  
     }
 677  
 
 678  
     /**
 679  
      * @return Collection over all defined converter ids
 680  
      */
 681  
     @Override
 682  
     public Collection<String> getConverterIds()
 683  
     {
 684  0
         return Collections.unmodifiableCollection(converterById.keySet());
 685  
     }
 686  
 
 687  
     @Override
 688  
     public Map<String, String> getConverterClassesById()
 689  
     {
 690  0
         return Collections.unmodifiableMap(converterById);
 691  
     }
 692  
 
 693  
     /**
 694  
      * @return Collection over all classes with an associated converter
 695  
      */
 696  
     @Override
 697  
     public Collection<String> getConverterClasses()
 698  
     {
 699  0
         return Collections.unmodifiableCollection(converterByClass.keySet());
 700  
     }
 701  
 
 702  
     @Override
 703  
     public Map<String, String> getConverterClassesByClass()
 704  
     {
 705  0
         return Collections.unmodifiableMap(converterByClass);
 706  
     }
 707  
 
 708  
     @Override
 709  
     public Collection<String> getConverterConfigurationByClassName()
 710  
     {
 711  0
         return Collections.unmodifiableCollection(converterConfigurationByClassName.keySet());
 712  
     }
 713  
 
 714  
     @Override
 715  
     public Converter getConverterConfiguration(String converterClassName)
 716  
     {
 717  0
         return converterConfigurationByClassName.get(converterClassName);
 718  
     }
 719  
 
 720  
     /**
 721  
      * @return converter class that belongs to the given converter id
 722  
      */
 723  
     @Override
 724  
     public String getConverterClassById(String converterId)
 725  
     {
 726  0
         return converterById.get(converterId);
 727  
     }
 728  
 
 729  
     /**
 730  
      * @return converter class that is associated with the given class name
 731  
      */
 732  
     @Override
 733  
     public String getConverterClassByClass(String className)
 734  
     {
 735  0
         return converterByClass.get(className);
 736  
     }
 737  
 
 738  
     /**
 739  
      * @return Collection over all defined default validator ids
 740  
      */
 741  
     @Override
 742  
     public Collection<String> getDefaultValidatorIds ()
 743  
     {
 744  0
         List<String> allDefaultValidatorIds = new ArrayList<String>();
 745  0
         allDefaultValidatorIds.addAll(defaultAnnotatedValidatorIds);
 746  0
         allDefaultValidatorIds.addAll(defaultValidatorIds);
 747  0
         return Collections.unmodifiableCollection(allDefaultValidatorIds);
 748  
     }
 749  
     
 750  
     /**
 751  
      * @return Collection over all defined validator ids
 752  
      */
 753  
     @Override
 754  
     public Collection<String> getValidatorIds()
 755  
     {
 756  0
         return Collections.unmodifiableCollection(validators.keySet());
 757  
     }
 758  
 
 759  
     @Override
 760  
     public Map<String, String> getValidatorClassesById()
 761  
     {
 762  0
         return Collections.unmodifiableMap(validators);
 763  
     }
 764  
 
 765  
     /**
 766  
      * @return validator class name that belongs to the given validator id
 767  
      */
 768  
     @Override
 769  
     public String getValidatorClass(String validatorId)
 770  
     {
 771  0
         return validators.get(validatorId);
 772  
     }
 773  
 
 774  
     /**
 775  
      * @return Collection over {@link org.apache.myfaces.config.element.ManagedBean ManagedBean}s
 776  
      */
 777  
     @Override
 778  
     public Collection<ManagedBean> getManagedBeans()
 779  
     {
 780  0
         if (ummanagedBeans == null)
 781  
         {
 782  0
             ummanagedBeans = Collections.unmodifiableList(managedBeans);
 783  
         }
 784  0
         return ummanagedBeans;
 785  
     }
 786  
 
 787  
     /**
 788  
      * @return Collection over {@link org.apache.myfaces.config.element.NavigationRule NavigationRule}s
 789  
      */
 790  
     @Override
 791  
     public Collection<NavigationRule> getNavigationRules()
 792  
     {
 793  0
         if (umnavigationRules == null)
 794  
         {
 795  0
             umnavigationRules = Collections.unmodifiableList(navigationRules);
 796  
         }
 797  0
         return umnavigationRules;
 798  
     }
 799  
 
 800  
     /**
 801  
      * @return Collection over all defined renderkit ids
 802  
      */
 803  
     @Override
 804  
     public Collection<String> getRenderKitIds()
 805  
     {
 806  0
         return Collections.unmodifiableCollection(renderKits.keySet());
 807  
     }
 808  
 
 809  
     /**
 810  
      * @return renderkit class name for given renderkit id
 811  
      */
 812  
     @Override
 813  
     public Collection<String> getRenderKitClasses(String renderKitId)
 814  
     {
 815  0
         return renderKits.get(renderKitId).getRenderKitClasses();
 816  
     }
 817  
 
 818  
     /**
 819  
      * @return Iterator over
 820  
      * {@link org.apache.myfaces.config.element.ClientBehaviorRenderer ClientBehaviorRenderer}s
 821  
      * for the given renderKitId
 822  
      */
 823  
     @Override
 824  
     public Collection<ClientBehaviorRenderer> getClientBehaviorRenderers (String renderKitId)
 825  
     {
 826  0
         return renderKits.get (renderKitId).getClientBehaviorRenderers();
 827  
     }
 828  
     
 829  
     /**
 830  
      * @return Collection over {@link org.apache.myfaces.config.element.Renderer Renderer}s for the given renderKitId
 831  
      */
 832  
     @Override
 833  
     public Collection<Renderer> getRenderers(String renderKitId)
 834  
     {
 835  0
         return renderKits.get(renderKitId).getRenderer();
 836  
     }
 837  
 
 838  
     /**
 839  
      * @return Collection over {@link javax.faces.event.PhaseListener} implementation class names
 840  
      */
 841  
     @Override
 842  
     public Collection<String> getLifecyclePhaseListeners()
 843  
     {
 844  0
         if (umlifecyclePhaseListeners == null)
 845  
         {
 846  0
             umlifecyclePhaseListeners = Collections.unmodifiableList(lifecyclePhaseListeners);
 847  
         }
 848  0
         return umlifecyclePhaseListeners;
 849  
     }
 850  
 
 851  
     @Override
 852  
     public Collection<ResourceBundle> getResourceBundles()
 853  
     {
 854  0
         if (umresourceBundles == null)
 855  
         {
 856  0
             umresourceBundles = Collections.unmodifiableList(resourceBundles);
 857  
         }
 858  0
         return umresourceBundles;
 859  
     }
 860  
 
 861  
     @Override
 862  
     public Collection<String> getElResolvers()
 863  
     {
 864  0
         if (umelResolvers == null)
 865  
         {
 866  0
             umelResolvers = Collections.unmodifiableList(elResolvers);
 867  
         }
 868  0
         return umelResolvers;
 869  
     }
 870  
 
 871  
     @Override
 872  
     public Collection<SystemEventListener> getSystemEventListeners()
 873  
     {        
 874  0
         if (umsystemEventListeners == null)
 875  
         {
 876  0
             umsystemEventListeners = Collections.unmodifiableList(systemEventListeners);
 877  
         }
 878  0
         return umsystemEventListeners;
 879  
     }
 880  
     
 881  
     @Override
 882  
     public Collection<Behavior> getBehaviors ()
 883  
     {
 884  0
         if (umbehaviors == null)
 885  
         {
 886  0
             umbehaviors = Collections.unmodifiableList(behaviors);
 887  
         }
 888  0
         return umbehaviors;
 889  
     }
 890  
     
 891  
     @Override
 892  
     public String getFacesVersion ()
 893  
     {
 894  0
         return facesVersion;
 895  
     }
 896  
     
 897  
     @Override
 898  
     public Collection<NamedEvent> getNamedEvents()
 899  
     {
 900  0
         if (umnamedEvents == null)
 901  
         {
 902  0
             umnamedEvents = Collections.unmodifiableList(namedEvents);
 903  
         }
 904  0
         return umnamedEvents;
 905  
     }
 906  
     
 907  
     @Override
 908  
     public Collection<FaceletsProcessing> getFaceletsProcessing()
 909  
     {
 910  0
         return Collections.unmodifiableCollection(faceletsProcessingByFileExtension.values());
 911  
     }
 912  
 
 913  
     @Override
 914  
     public FaceletsProcessing getFaceletsProcessingConfiguration(String fileExtension)
 915  
     {
 916  0
         return faceletsProcessingByFileExtension.get(fileExtension);
 917  
     }
 918  
 
 919  
     @Override
 920  
     public void feedFaceletCacheFactory(String factoryClassName)
 921  
     {
 922  0
         faceletCacheFactories.add(factoryClassName);
 923  0
     }
 924  
 
 925  
     @Override
 926  
     public Collection<String> getFaceletCacheFactoryIterator()
 927  
     {
 928  0
         if (umfaceletCacheFactories == null)
 929  
         {
 930  0
             umfaceletCacheFactories = Collections.unmodifiableList(faceletCacheFactories);
 931  
         }
 932  0
         return umfaceletCacheFactories;
 933  
     }
 934  
 
 935  
     @Override
 936  
     public void feedFlashFactory(String factoryClassName)
 937  
     {
 938  0
         flashFactories.add(factoryClassName);
 939  0
     }
 940  
 
 941  
     @Override
 942  
     public Collection<String> getFlashFactoryIterator()
 943  
     {
 944  0
         if (umflashFactories == null)
 945  
         {
 946  0
             umflashFactories = Collections.unmodifiableList(flashFactories);
 947  
         }
 948  0
         return umflashFactories;
 949  
     }
 950  
     
 951  
     @Override
 952  
     public Collection<String> getFlowHandlerFactoryIterator()
 953  
     {
 954  0
         if (umflowHandlerFactories == null)
 955  
         {
 956  0
             umflowHandlerFactories = Collections.unmodifiableList(flowHandlerFactories);
 957  
         }
 958  0
         return umflowHandlerFactories;
 959  
     }
 960  
 
 961  
     @Override
 962  
     public void feedClientWindowFactory(String factoryClassName)
 963  
     {
 964  0
         clientWindowFactories.add(factoryClassName);
 965  0
     }
 966  
 
 967  
     @Override
 968  
     public Collection<String> getClientWindowFactoryIterator()
 969  
     {
 970  0
         if (umclientWindowFactories == null)
 971  
         {
 972  0
             umclientWindowFactories = Collections.unmodifiableList(clientWindowFactories);
 973  
         }
 974  0
         return umclientWindowFactories;
 975  
     }
 976  
     
 977  
     @Override
 978  
     public Collection<FacesFlowDefinition> getFacesFlowDefinitions()
 979  
     {
 980  0
         if (umfacesFlowDefinitions == null)
 981  
         {
 982  0
             umfacesFlowDefinitions = Collections.unmodifiableList(facesFlowDefinitions);
 983  
         }
 984  0
         return umfacesFlowDefinitions;
 985  
     }
 986  
 
 987  
     @Override
 988  
     public Collection<String> getProtectedViewUrlPatterns()
 989  
     {
 990  0
         if (umprotectedViewUrlPatterns == null)
 991  
         {
 992  0
             umprotectedViewUrlPatterns = Collections.unmodifiableList(protectedViewUrlPatterns);
 993  
         }
 994  0
         return umprotectedViewUrlPatterns;
 995  
     }
 996  
 
 997  
     @Override
 998  
     public Collection<ContractMapping> getResourceLibraryContractMappings()
 999  
     {
 1000  0
         if (umresourceLibraryContractMappings == null)
 1001  
         {
 1002  0
             umresourceLibraryContractMappings = Collections.unmodifiableList(resourceLibraryContractMappings);
 1003  
         }
 1004  0
         return umresourceLibraryContractMappings;
 1005  
     }
 1006  
 
 1007  
     @Override
 1008  
     public Collection<ComponentTagDeclaration> getComponentTagDeclarations()
 1009  
     {
 1010  0
         if (umcomponentTagDeclarations == null)
 1011  
         {
 1012  0
             umcomponentTagDeclarations = Collections.unmodifiableList(componentTagDeclarations);
 1013  
         }
 1014  0
         return umcomponentTagDeclarations;
 1015  
     }
 1016  
 
 1017  
     @Override
 1018  
     public Collection<String> getResourceResolvers()
 1019  
     {
 1020  0
         if (umresourceResolvers == null)
 1021  
         {
 1022  0
             umresourceResolvers = Collections.unmodifiableList(resourceResolvers);
 1023  
         }
 1024  0
         return umresourceResolvers;
 1025  
     }
 1026  
 
 1027  
     @Override
 1028  
     public Collection<FaceletTagLibrary> getTagLibraries()
 1029  
     {
 1030  0
         if (umfaceletTagLibraries == null)
 1031  
         {
 1032  0
             umfaceletTagLibraries = Collections.unmodifiableList(faceletTagLibraries);
 1033  
         }
 1034  0
         return umfaceletTagLibraries;
 1035  
     }
 1036  
     
 1037  
     @Override
 1038  
     public Collection<ViewPoolMapping> getViewPoolMappings()
 1039  
     {
 1040  0
         if (umviewPoolMappings == null)
 1041  
         {
 1042  0
             umviewPoolMappings = Collections.unmodifiableList(viewPoolMappings);
 1043  
         }
 1044  0
         return umviewPoolMappings;
 1045  
     }
 1046  
 }