Coverage Report - org.seasar.teeda.core.config.faces.assembler.LifecycleChildAssembler
 
Classes in this File Line Coverage Branch Coverage Complexity
LifecycleChildAssembler
100%
10/10
100%
2/2
1.25
 
 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.assembler;
 17  
 
 18  
 import java.util.Collections;
 19  
 import java.util.Iterator;
 20  
 import java.util.List;
 21  
 
 22  
 import javax.faces.lifecycle.Lifecycle;
 23  
 
 24  
 import org.seasar.teeda.core.util.IteratorUtil;
 25  
 import org.seasar.teeda.core.util.LifecycleUtil;
 26  
 
 27  
 /**
 28  
  * @author shot
 29  
  */
 30  
 public abstract class LifecycleChildAssembler implements JsfAssembler {
 31  
 
 32  4
     private List targetLists_ = Collections.EMPTY_LIST;
 33  
 
 34  4
     public LifecycleChildAssembler(List targetLists) {
 35  4
         targetLists_ = targetLists;
 36  4
     }
 37  
 
 38  
     public void assemble() {
 39  4
         for (Iterator itr = IteratorUtil.getIterator(targetLists_); itr
 40  7
                 .hasNext();) {
 41  3
             String targetName = (String) itr.next();
 42  3
             doAssemble(targetName);
 43  
         }
 44  4
     }
 45  
 
 46  
     protected Lifecycle getLifecycle() {
 47  3
         return LifecycleUtil.getLifecycle();
 48  
     }
 49  
 
 50  
     protected abstract void doAssemble(String targetName);
 51  
 }