KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > soto > config > Application


1 package org.sapia.soto.config;
2
3 import org.sapia.soto.SotoContainer;
4 import org.sapia.soto.util.CompositeObjectFactoryEx;
5 import org.sapia.soto.util.Namespace;
6
7 import org.sapia.util.xml.confix.ConfigurationException;
8 import org.sapia.util.xml.confix.ObjectHandlerIF;
9
10
11 /**
12  * This class implements the <code>soto:app</code> tag.
13  *
14  * @author Yanick Duchesne
15  * <dl>
16  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
17  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
18  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
19  * </dl>
20  */

21 public class Application implements ObjectHandlerIF {
22   private CompositeObjectFactoryEx _fac;
23   private SotoContainer _cont;
24
25   /**
26    * Constructor for Application.
27    */

28   public Application(SotoContainer cont, CompositeObjectFactoryEx fac) {
29     _fac = fac;
30     _cont = cont;
31   }
32
33   /**
34    * @see org.sapia.util.xml.confix.ObjectHandlerIF#handleObject(String, Object)
35    */

36   public void handleObject(String JavaDoc elementName, Object JavaDoc obj)
37     throws ConfigurationException {
38     if (obj instanceof ServiceTag) {
39       // ServiceTag tag = (ServiceTag) obj;
40
// Service svc = tag.getService();
41
//
42
// if (tag.getId() == null) {
43
// throw new ConfigurationException(
44
// "'id' attribute not specified on element " + elementName);
45
// }
46
//
47
// _cont.bind(tag.getId(), svc);
48
} else if (obj instanceof Namespace) {
49       Namespace ns = (Namespace) obj;
50       _fac.registerDefs(ns);
51     }
52   }
53 }
54
Popular Tags