Coverage Report - org.seasar.teeda.core.webapp.TeedaPortletExtendedServlet
 
Classes in this File Line Coverage Branch Coverage Complexity
TeedaPortletExtendedServlet
0%
0/20
0%
0/2
1.2
 
 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.webapp;
 17  
 
 18  
 import java.util.Iterator;
 19  
 
 20  
 import javax.faces.FactoryFinder;
 21  
 
 22  
 import org.seasar.framework.container.servlet.PortletExtendedS2ContainerServlet;
 23  
 import org.seasar.framework.log.Logger;
 24  
 import org.seasar.teeda.core.EnvironmentInfo;
 25  
 import org.seasar.teeda.core.ProductInfo;
 26  
 
 27  
 /**
 28  
  * @author shinsuke
 29  
  */
 30  
 public class TeedaPortletExtendedServlet extends
 31  
         PortletExtendedS2ContainerServlet {
 32  
 
 33  
     private static final long serialVersionUID = 2290614456118342149L;
 34  
 
 35  0
     private static Logger logger = Logger
 36  0
             .getLogger(TeedaPortletExtendedServlet.class);
 37  
 
 38  
     public TeedaPortletExtendedServlet() {
 39  0
         super();
 40  0
     }
 41  
 
 42  
     public void init() {
 43  0
         super.init();
 44  0
         printProductInfo();
 45  0
         printEnvironmentInfo();
 46  0
         TeedaInitializer initializer = new TeedaInitializer();
 47  0
         initializer.setServletContext(getServletContext());
 48  0
         initializer.initializeFaces();
 49  0
     }
 50  
 
 51  
     public void destroy() {
 52  0
         super.destroy();
 53  0
         FactoryFinder.releaseFactories();
 54  0
     }
 55  
 
 56  
     protected void printProductInfo() {
 57  0
         logger.debug(ProductInfo.getProductName() + " : "
 58  
                 + ProductInfo.getVersion());
 59  0
     }
 60  
 
 61  
     protected void printEnvironmentInfo() {
 62  0
         for (Iterator itr = EnvironmentInfo.getEnvironmentInfo().iterator(); itr
 63  0
                 .hasNext();) {
 64  0
             logger.debug(itr.next());
 65  
         }
 66  
 
 67  0
     }
 68  
 }