KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > mvcsoft > ejb > MVCSoftSubTask


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

5 package xdoclet.modules.mvcsoft.ejb;
6
7 import xdoclet.modules.ejb.dd.AbstractEjbDeploymentDescriptorSubTask;
8
9 /**
10  * Generates MVCSoft's xml.
11  *
12  * @author Daniel OConnor (docodan@mvcsoft.com)
13  * @created November 1, 2001
14  * @ant.element display-name="MVCSoft" name="mvcsoft" parent="xdoclet.modules.ejb.EjbDocletTask"
15  */

16 public class MVCSoftSubTask extends AbstractEjbDeploymentDescriptorSubTask
17 {
18     private static String JavaDoc DEFAULT_TEMPLATE_FILE = "resources/mvcsoft.xdt";
19
20     private static String JavaDoc DD_FILE_NAME = "mvcsoft-pm.xml";
21
22     private String JavaDoc deploymentVersion = MVCSoftVersionTypes.VERSION_1_0_0;
23
24     private String JavaDoc connectionJndiName = "false";
25
26     private String JavaDoc loggingType = "false";
27
28     private String JavaDoc lightweightFactoryName = "false";
29
30     /**
31      * Describe what the MVCSoftSubTask constructor does
32      */

33     public MVCSoftSubTask()
34     {
35         setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
36         setDestinationFile(DD_FILE_NAME);
37         setValidateXML(false);
38     }
39
40     /**
41      * Gets the DeploymentVersion attribute of the MVCSoftSubTask object
42      *
43      * @return The DeploymentVersion value
44      */

45     public String JavaDoc getDeploymentVersion()
46     {
47         return this.deploymentVersion;
48     }
49
50     /**
51      * Gets the Connectionjndiname attribute of the MVCSoftSubTask object
52      *
53      * @return The Connectionjndiname value
54      */

55     public String JavaDoc getConnectionjndiname()
56     {
57         return connectionJndiName;
58     }
59
60     /**
61      * Gets the Loggingtype attribute of the MVCSoftSubTask object
62      *
63      * @return The Loggingtype value
64      */

65     public String JavaDoc getLoggingtype()
66     {
67         return loggingType;
68     }
69
70     /**
71      * Gets the lightweightfactoryname attribute of the MVCSoftSubTask object
72      *
73      * @return The Lightweightfactoryname value
74      */

75     public String JavaDoc getLightweightfactoryname()
76     {
77         return lightweightFactoryName;
78     }
79
80     /**
81      * Sets the DeploymentVersion attribute of the MVCSoftSubTask object
82      *
83      * @param deploymentVersion The new DeploymentVersion value
84      */

85     public void setDeploymentVersion(MVCSoftVersionTypes deploymentVersion)
86     {
87         this.deploymentVersion = deploymentVersion.getValue();
88     }
89
90     /**
91      * Sets the Connectionjndiname attribute of the MVCSoftSubTask object
92      *
93      * @param jndiName The new Connectionjndiname value
94      * @ant.not-required No, default is "java:DefaultDS"
95      */

96     public void setConnectionjndiname(String JavaDoc jndiName)
97     {
98         connectionJndiName = jndiName;
99     }
100
101     /**
102      * Sets the Loggingtype attribute of the MVCSoftSubTask object
103      *
104      * @param loggingType The new Loggingtype value
105      * @ant.not-required No, default is "None"
106      */

107     public void setLoggingtype(String JavaDoc loggingType)
108     {
109         this.loggingType = loggingType;
110     }
111
112     /**
113      * Sets the lightweightfactoryname attribute of the MVCSoftSubTask object
114      *
115      * @param lightweightFactoryName
116      * @ant.not-required No, default is no value
117      */

118     public void setLightweightfactoryname(String JavaDoc lightweightFactoryName)
119     {
120         this.lightweightFactoryName = lightweightFactoryName;
121     }
122
123     /**
124      * @author Daniel OConnor (docodan@mvcsoft.com)
125      * @created November 1, 2001
126      */

127     public static class MVCSoftVersionTypes extends org.apache.tools.ant.types.EnumeratedAttribute
128     {
129         public final static String JavaDoc VERSION_1_0_0 = "1.0.0";
130         public final static String JavaDoc VERSION_1_1 = "1.1";
131
132         /**
133          * Gets the Values attribute of the MVCSoftVersionTypes object.
134          *
135          * @return The Values value
136          */

137         public String JavaDoc[] getValues()
138         {
139             return (new String JavaDoc[]{VERSION_1_0_0, VERSION_1_1});
140         }
141     }
142
143 }
144
Popular Tags