Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
PojoPlugin |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2004 Jonathan M. Lehr | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. | |
5 | * You may obtain a copy of the License at | |
6 | * | |
7 | * http://www.apache.org/licenses/LICENSE-2.0 | |
8 | * | |
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" | |
10 | * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language | |
11 | * governing permissions and limitations under the License. | |
12 | * | |
13 | */ | |
14 | ||
15 | // begin Kuali Foundation modification | |
16 | package org.kuali.rice.kns.web.struts.form.pojo; | |
17 | ||
18 | // deleted some imports | |
19 | // end Kuali Foundation modification | |
20 | ||
21 | ||
22 | import org.apache.commons.beanutils.BeanUtilsBean; | |
23 | import org.apache.commons.beanutils.ConvertUtilsBean; | |
24 | import org.apache.commons.beanutils.PropertyUtilsBean; | |
25 | import org.apache.struts.action.ActionServlet; | |
26 | import org.apache.struts.action.PlugIn; | |
27 | import org.apache.struts.config.ModuleConfig; | |
28 | ||
29 | import javax.servlet.ServletException; | |
30 | import java.util.logging.Logger; | |
31 | ||
32 | /** | |
33 | * begin Kuali Foundation modification | |
34 | * This class is the POJO Plugin implementation of the PlugIn interface. | |
35 | * end Kuali Foundation modification | |
36 | * | |
37 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
38 | */ | |
39 | // Kuali Foundation modification: class originally named SL plugin | |
40 | public class PojoPlugin implements PlugIn { | |
41 | 0 | static final Logger logger = Logger.getLogger(PojoPlugin.class.getName()); |
42 | ||
43 | 0 | public PojoPlugin() { |
44 | 0 | } |
45 | ||
46 | public void init(ActionServlet servlet, ModuleConfig config) throws ServletException { | |
47 | // begin Kuali Foundation modification | |
48 | 0 | ConvertUtilsBean convUtils = new ConvertUtilsBean(); |
49 | 0 | PropertyUtilsBean propUtils = new PojoPropertyUtilsBean(); |
50 | 0 | BeanUtilsBean pojoBeanUtils = new BeanUtilsBean(convUtils, propUtils); |
51 | ||
52 | 0 | BeanUtilsBean.setInstance(pojoBeanUtils); |
53 | 0 | logger.fine("Initialized BeanUtilsBean with " + pojoBeanUtils); |
54 | // end Kuali Foundation modification | |
55 | 0 | } |
56 | ||
57 | public void destroy() { | |
58 | 0 | } |
59 | } |