1 /** ------------------------------------
2 * SweetDEV RIA library
3 * Copyright [2006 - 2010] [Ideo Technologies]
4 * ------------------------------------
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 *
19 * For more information, please contact us at:
20 * Ideo Technologies S.A
21 * 124 rue de Verdun
22 * 92800 Puteaux - France
23 *
24 * France & Europe Phone : +33 1.46.25.09.60
25 *
26 *
27 * web : http://www.ideotechnologies.com
28 * email : SweetDEV-RIA@ideotechnologies.com
29 *
30 *
31 * @version ${pom.version}
32 * @author Ideo Technologies
33 */
34 package com.ideo.sweetdevria.config.factories;
35
36 import org.apache.commons.digester.AbstractObjectCreationFactory;
37 import org.xml.sax.Attributes;
38
39 import com.ideo.sweetdevria.util.ClassUtils;
40
41 /**
42 * Drawer factory.
43 */
44 public class DrawerMappingFactory extends AbstractObjectCreationFactory {
45
46 /**
47 * Class name to build.
48 */
49 private static final String className = "com.ideo.sweetdevria.config.elements.DrawerConfig";
50
51 /**
52 * Supply a new instance of a drawer config object
53 */
54 public Object createObject(Attributes arg0) throws Exception {
55 Object drawerMapping = null;
56 try {
57 drawerMapping = ClassUtils.applicationInstance(className);
58 } catch (Exception e) {
59 super.digester.getLogger().error("BuilderMappingFactory.createObject: ", e);
60 }
61 return drawerMapping;
62 }
63
64 }