KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > bea > wls > web > WeblogicWebXmlSubTask


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

5 package xdoclet.modules.bea.wls.web;
6
7 import xdoclet.XDocletException;
8
9 import xdoclet.XmlSubTask;
10 import xdoclet.util.Translator;
11
12 /**
13  * Generates weblogic.xml deployment descriptor for Web apps.
14  *
15  * @author <a HREF="aslak.nospam@users.sf.net">Aslak Hellesøy</a>
16  * @created October 9, 2001
17  * @ant.element display-name="WebLogic Server" name="weblogicwebxml" parent="xdoclet.modules.web.WebDocletTask"
18  * @version $Revision: 1.7 $
19  */

20 public class WeblogicWebXmlSubTask extends XmlSubTask
21 {
22     /**
23      * The default template file - weblogic_web_xml.xdt.
24      */

25     private final static String JavaDoc DEFAULT_TEMPLATE_FILE = "resources/weblogic_web_xml.xdt";
26
27     /**
28      * The generated file name - weblogic.xml.
29      */

30     private final static String JavaDoc GENERATED_FILE_NAME = "weblogic.xml";
31
32     private final static String JavaDoc WEBLOGIC_WEB_PUBLICID = "-//BEA Systems, Inc.//DTD Web Application 6.0//EN";
33
34     private final static String JavaDoc WEBLOGIC_WEB_SYSTEMID = "http://www.bea.com/servers/wls600/dtd/weblogic-web-jar.dtd";
35
36     private final static String JavaDoc WEBLOGIC_WEB_DTD_FILE_NAME = "resources/weblogic-web-jar.dtd";
37
38     /**
39      * The Security Domain, defaults to "" because it is not included if not set in the build.xml.
40      */

41     private String JavaDoc securityDomain = "";
42
43     /**
44      * The description of the Web App.
45      */

46     private String JavaDoc description;
47
48     /**
49      * The web app's context root (overrides any value in application.xml)
50      */

51     private String JavaDoc contextRoot = null;
52
53     /**
54      * The WLS version.
55      */

56     private String JavaDoc version = "6.1";
57
58     /**
59      * Describe what the WeblogicWebXmlSubTask constructor does
60      *
61      * @exception XDocletException Describe the exception
62      */

63     public WeblogicWebXmlSubTask() throws XDocletException
64     {
65         setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
66         setDestinationFile(GENERATED_FILE_NAME);
67         setPublicId(WEBLOGIC_WEB_PUBLICID);
68         setSystemId(WEBLOGIC_WEB_SYSTEMID);
69         setDtdURL(getClass().getResource(WEBLOGIC_WEB_DTD_FILE_NAME));
70         setDescription(Translator.getString(XDocletModulesBeaWlsWebMessages.class, XDocletModulesBeaWlsWebMessages.GENERATED_ATTRIBUTE));
71     }
72
73     /**
74      * Return the WLS version.
75      *
76      * @return The WLS version
77      */

78     public String JavaDoc getVersion()
79     {
80         return version;
81     }
82
83     /**
84      * Return the Security Domain.
85      *
86      * @return The Security Domain value
87      */

88     public String JavaDoc getSecuritydomain()
89     {
90         return securityDomain;
91     }
92
93     /**
94      * Return the Description.
95      *
96      * @return The Description value
97      */

98     public String JavaDoc getDescription()
99     {
100         return description;
101     }
102
103     /**
104      * Return the Context Root.
105      *
106      * @return The ContextRoot value
107      */

108     public String JavaDoc getContextRoot()
109     {
110         return contextRoot;
111     }
112
113     /**
114      * Set the WLS version.
115      *
116      * @param version The new Version value
117      */

118     public void setVersion(String JavaDoc version)
119     {
120         this.version = version;
121     }
122
123     /**
124      * Set the Security Domain.
125      *
126      * @param securityDomain The new Security Domain value
127      */

128     public void setSecuritydomain(String JavaDoc securityDomain)
129     {
130         this.securityDomain = securityDomain;
131     }
132
133     /**
134      * Set the Description.
135      *
136      * @param description The new Description value
137      */

138     public void setDescription(String JavaDoc description)
139     {
140         this.description = description;
141     }
142
143     /**
144      * Set the Context Root.
145      *
146      * @param contextRoot The new ContextRoot value
147      */

148     public void setContextRoot(String JavaDoc contextRoot)
149     {
150         this.contextRoot = contextRoot;
151     }
152
153 }
154
Popular Tags