KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > openejb > ejb > OpenEJBSubTask


1 /*
2  * Copyright (c) 2001, 2002 The XDoclet team
3  * All rights reserved.
4  */

5 package xdoclet.modules.openejb.ejb;
6
7 import xdoclet.TemplateSubTask;
8 import xdoclet.XDocletException;
9
10 /**
11  * Creates openejb-jar.xml deployment descriptors for OpenEJB.
12  *
13  * @author Brian Topping (topping@orb.org)
14  * @created January 23, 2004
15  * @ant.element display-name="OpenEJB" name="openejb" parent="xdoclet.modules.ejb.EjbDocletTask"
16  * @version $Revision: 1.1 $
17  */

18 public class OpenEJBSubTask extends TemplateSubTask
19 {
20     private final static String JavaDoc DEFAULT_OPENEJB_XML_TEMPLATE_FILE = "resources/openejb-jar_xml.xdt";
21     private final static String JavaDoc OPENEJB_XML_FILE_NAME = "openejb-jar.xml";
22     private String JavaDoc openEJBTemplateFile = DEFAULT_OPENEJB_XML_TEMPLATE_FILE;
23     private String JavaDoc OPENEJB_DTD_FILE_NAME = "resources/openejb-jar_1_1.dtd";
24
25     public OpenEJBSubTask()
26     {
27         setTemplateURL(getClass().getResource(DEFAULT_OPENEJB_XML_TEMPLATE_FILE));
28         setDestinationFile(OPENEJB_XML_FILE_NAME);
29         setHavingClassTag("openejb");
30     }
31
32     public String JavaDoc getOpenEJBTemplateFile()
33     {
34         return openEJBTemplateFile;
35     }
36
37     public void setOpenEJBTemplateFile(String JavaDoc openEJBTemplateFile)
38     {
39         this.openEJBTemplateFile = openEJBTemplateFile;
40     }
41
42     /**
43      * Called to validate configuration parameters.
44      *
45      * @exception XDocletException Description of Exception
46      */

47     public void validateOptions() throws XDocletException
48     {
49         // OpenEJB does not require a template url or a destination file
50
super.validateOptions();
51     }
52
53 }
54
Popular Tags