KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > caucho > ResinEjbSubTask


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

5 package xdoclet.modules.caucho;
6
7 import xdoclet.XmlSubTask;
8
9 /**
10  * Subtask for generation of resin-ejb.
11  *
12  * @author Yoritaka Sakakura (yori@teardrop.org)
13  * @created June 5, 2002
14  * @see <a HREF="http://caucho.com/products/resin-ejb/ejb-ref/resin-ejb-config.xtp">Resin CMP
15  * Configuration</a>
16  * @ant.element name="resin-ejb-xml" display-name="Resin" parent="xdoclet.modules.ejb.EjbDocletTask"
17  * @xdoclet.merge-file file="resin-query-functions.xml" relates-to="resin.ejb" description="An XML unparsed entity
18  * containing query-function elements to include in the descriptor."
19  */

20 public class ResinEjbSubTask extends XmlSubTask
21 {
22     private final static String JavaDoc DEFAULT_TEMPLATE_FILE = "resources/resin-ejb.xdt";
23     private final static String JavaDoc DD_FILE_NAME = "resin.ejb";
24
25     private String JavaDoc cacheSize = "";
26     private String JavaDoc cacheTimeout = "";
27     private String JavaDoc generateSourceComments = "true";
28
29
30     /**
31      * Default generated filename is resin.cmp.
32      */

33     public ResinEjbSubTask()
34     {
35         setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
36         setDestinationFile(DD_FILE_NAME);
37         setPublicId(null);
38         setSystemId(null);
39         setSchema(null);
40         setDtdURL(null);
41         setValidateXML(false);
42     }
43
44
45     /**
46      * resin-ejb/cache-size; no default.
47      *
48      * @return
49      */

50     public String JavaDoc getCacheSize()
51     {
52         return cacheSize;
53     }
54
55     /**
56      * resin-ejb/cache-timeout; no default.
57      *
58      * @return
59      */

60     public String JavaDoc getCacheTimeout()
61     {
62         return cacheTimeout;
63     }
64
65     /**
66      * Whether or not include debug comments pointing to origin class/method for elements in the deployment descriptor.
67      * Defaults to 'true'
68      *
69      * @return
70      */

71     public String JavaDoc getGenerateSourceComments()
72     {
73         return generateSourceComments;
74     }
75
76     public void setCacheSize(String JavaDoc cacheSize)
77     {
78         this.cacheSize = cacheSize;
79     }
80
81     public void setCacheTimeout(String JavaDoc cacheTimeout)
82     {
83         this.cacheTimeout = cacheTimeout;
84     }
85
86     public void setGenerateSourceComments(String JavaDoc generateSourceComments)
87     {
88         this.generateSourceComments = generateSourceComments;
89     }
90 }
91
Popular Tags