Coverage Report - org.seasar.teeda.core.config.faces.impl.FacesConfigBuilderImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
FacesConfigBuilderImpl
0%
0/12
0%
0/4
1.667
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 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,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.config.faces.impl;
 17  
 
 18  
 import java.util.Collections;
 19  
 import java.util.Iterator;
 20  
 import java.util.LinkedList;
 21  
 import java.util.List;
 22  
 
 23  
 import org.seasar.teeda.core.config.faces.FacesConfigBuilder;
 24  
 import org.seasar.teeda.core.config.faces.FacesConfigurator;
 25  
 import org.seasar.teeda.core.config.faces.element.FacesConfig;
 26  
 
 27  
 /**
 28  
  * @author shot
 29  
  */
 30  
 public class FacesConfigBuilderImpl implements FacesConfigBuilder {
 31  
 
 32  0
     private List configurators_ = Collections
 33  
             .synchronizedList(new LinkedList());
 34  
 
 35  0
     public FacesConfigBuilderImpl() {
 36  0
     }
 37  
 
 38  
     public FacesConfig buildFacesConfigs() {
 39  0
         List configs = new LinkedList();
 40  0
         for (Iterator itr = configurators_.iterator(); itr.hasNext();) {
 41  0
             FacesConfigurator configurator = (FacesConfigurator) itr.next();
 42  0
             FacesConfig config = configurator.configure();
 43  0
             if (config != null) {
 44  0
                 configs.add(config);
 45  
             }
 46  
         }
 47  0
         return FacesConfigUtil.collectAllFacesConfig(configs);
 48  
     }
 49  
 
 50  
     public void addFacesConfigurator(FacesConfigurator configurator) {
 51  0
         configurators_.add(configurator);
 52  0
     }
 53  
 
 54  
 }