Coverage Report - org.kuali.rice.kns.web.listener.JstlConstantsInitListener
 
Classes in this File Line Coverage Branch Coverage Complexity
JstlConstantsInitListener
0%
0/13
N/A
1
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in
 5  
  * compliance with the License. You may obtain a copy of the License at
 6  
  * 
 7  
  * http://www.opensource.org/licenses/ecl2.php
 8  
  * 
 9  
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
 10  
  * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
 11  
  * language governing permissions and limitations under the License.
 12  
  */
 13  
 package org.kuali.rice.kns.web.listener;
 14  
 
 15  
 import javax.servlet.ServletContext;
 16  
 import javax.servlet.ServletContextEvent;
 17  
 import javax.servlet.ServletContextListener;
 18  
 
 19  
 import org.apache.log4j.Logger;
 20  
 import org.kuali.rice.core.util.RiceConstants;
 21  
 import org.kuali.rice.kew.util.KEWConstants;
 22  
 import org.kuali.rice.kns.ConfigProperties;
 23  
 import org.kuali.rice.kns.authorization.AuthorizationConstants;
 24  
 import org.kuali.rice.kns.service.KNSServiceLocator;
 25  
 import org.kuali.rice.kns.util.KNSConstants;
 26  
 import org.kuali.rice.kns.util.KNSPropertyConstants;
 27  
 
 28  
 /**
 29  
  * This class is the JstlContants implementation of the ServletContextListener.
 30  
  */
 31  0
 public class JstlConstantsInitListener implements ServletContextListener {
 32  
 
 33  0
     private static final Logger LOG = Logger.getLogger(JstlConstantsInitListener.class);
 34  
 
 35  
     public void contextInitialized(ServletContextEvent sce) {
 36  
 
 37  0
         LOG.info("Starting " + JstlConstantsInitListener.class.getName() + "...");
 38  0
         ServletContext context = sce.getServletContext();
 39  
 
 40  
         // publish application constants into JSP app context with name "Constants"
 41  0
         context.setAttribute("Constants", new KNSConstants());
 42  
 
 43  
         // publish application constants into JSP app context with name "Constants"
 44  0
         context.setAttribute("RiceConstants", new RiceConstants());
 45  
 
 46  
         // publish application constants into JSP app context with name "Constants"
 47  0
         context.setAttribute("KEWConstants", new KEWConstants());
 48  
         
 49  
         // publish configuration properties into JSP app context with name "ConfigProperties"
 50  0
         context.setAttribute("ConfigProperties", new ConfigProperties());
 51  
 
 52  
         // publish dataDictionary property Map into JSP app context with name "DataDictionary"
 53  0
         context.setAttribute("DataDictionary", KNSServiceLocator.getDataDictionaryService().getDataDictionaryMap());
 54  
 
 55  
         // public AuthorizationConstants property Map into JSP app context with name "AuthorizationConstants"
 56  0
         context.setAttribute("AuthorizationConstants", new AuthorizationConstants());
 57  
 
 58  
         // publish property constants into JSP app context with name "PropertyConstants"
 59  0
         context.setAttribute("PropertyConstants", new KNSPropertyConstants());
 60  0
     }
 61  
 
 62  0
     public void contextDestroyed(ServletContextEvent sce) {}
 63  
 
 64  
 }