User: rinkrank
Date: 02/04/03 16:27:49
Modified: core/src/xdoclet/web JspTaglibSubTask.java
WebDocletTask.java WebXmlSubTask.java
Log:
Re-enabled the beautifier (which I turned off during xjavadoc refactoring)
Revision Changes Path
1.14 +419 -155 xdoclet/core/src/xdoclet/web/JspTaglibSubTask.java
Index: JspTaglibSubTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/web/JspTaglibSubTask.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -r1.13 -r1.14
--- JspTaglibSubTask.java 24 Mar 2002 17:44:19 -0000 1.13
+++ JspTaglibSubTask.java 4 Apr 2002 00:27:49 -0000 1.14
@@ -1,3 +1,38 @@
+/*
+ * Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of BEKK Consulting nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+/*
+ * Change log
+ *
+ */
package xdoclet.web;
import xdoclet.XmlSubTask;
@@ -11,35 +46,89 @@
*
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created July 12, 2001
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
*/
-public class JspTaglibSubTask extends XmlSubTask
-{
- public final static String SUBTASK_NAME = "jspTagLib";
-
- private static String DEFAULT_TEMPLATE_FILE = "/xdoclet/web/taglib_tld.j";
- private static String TLD_PUBLICID_1_2 = "-//Sun Microsystems, Inc.//DTD JSP
XTag Library 1.2//EN";
- private static String TLD_PUBLICID_1_1 = "-//Sun Microsystems, Inc.//DTD JSP
XTag Library 1.1//EN";
- private static String TLD_SYSTEMID_1_2 =
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";
- private static String TLD_SYSTEMID_1_1 =
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";
- private static String TLD_DTD_FILE_NAME_1_2 =
"/xdoclet/web/web-jsptaglibrary_1_2.dtd";
- private static String TLD_DTD_FILE_NAME_1_1 =
"/xdoclet/web/web-jsptaglibrary_1_1.dtd";
+public class JspTaglibSubTask extends XmlSubTask {
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String taglibversion = "1.0";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String jspversion = "1.2";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String shortname = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String uri = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String displayname = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String smallicon = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String largeicon = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String description = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String filename = "taglib.tld";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ public final static String SUBTASK_NAME = "jspTagLib";
- public JspTaglibSubTask()
- {
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String DEFAULT_TEMPLATE_FILE = "/xdoclet/web/taglib_tld.j";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String TLD_PUBLICID_1_2 = "-//Sun Microsystems, Inc.//DTD JSP
XTag Library 1.2//EN";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String TLD_PUBLICID_1_1 = "-//Sun Microsystems, Inc.//DTD JSP
XTag Library 1.1//EN";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String TLD_SYSTEMID_1_2 =
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String TLD_SYSTEMID_1_1 =
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String TLD_DTD_FILE_NAME_1_2 =
"/xdoclet/web/web-jsptaglibrary_1_2.dtd";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String TLD_DTD_FILE_NAME_1_1 =
"/xdoclet/web/web-jsptaglibrary_1_1.dtd";
+
+
+ /**
+ * Describe what the JspTaglibSubTask constructor does @todo-javadoc Write
+ * javadocs for constructor
+ */
+ public JspTaglibSubTask() {
setTemplateURL( getClass().getResource( DEFAULT_TEMPLATE_FILE ) );
setDestinationFile( filename );
@@ -49,127 +138,225 @@
setDtdFileName( TLD_DTD_FILE_NAME_1_2 );
}
- public String getSubTaskName()
- {
- return SUBTASK_NAME;
+
+ /**
+ * Sets the Taglibversion attribute of the JspTaglibSubTask object
+ *
+ * @param taglibversion The new Taglibversion value
+ */
+ public void setTaglibversion(String taglibversion) {
+ this.taglibversion = taglibversion;
}
- public String getTaglibversion()
- {
- return taglibversion;
+
+ /**
+ * Sets the Jspversion attribute of the JspTaglibSubTask object
+ *
+ * @param jspversion The new Jspversion value
+ */
+ public void setJspversion(JspVersionTypes jspversion) {
+ this.jspversion = jspversion.getValue();
}
- public String getJspversion()
- {
- return jspversion;
+
+ /**
+ * Sets the Shortname attribute of the JspTaglibSubTask object
+ *
+ * @param shortname The new Shortname value
+ */
+ public void setShortname(String shortname) {
+ this.shortname = shortname;
}
- public String getShortname()
- {
- return shortname;
+
+ /**
+ * Sets the Uri attribute of the JspTaglibSubTask object
+ *
+ * @param uri The new Uri value
+ */
+ public void setUri(String uri) {
+ this.uri = uri;
}
- public String getUri()
- {
- return uri;
+
+ /**
+ * Sets the Displayname attribute of the JspTaglibSubTask object
+ *
+ * @param new_display_name The new Displayname value
+ */
+ public void setDisplayname(String new_display_name) {
+ displayname = new_display_name;
}
- public String getDisplayname()
- {
- return displayname;
+
+ /**
+ * Sets the Smallicon attribute of the JspTaglibSubTask object
+ *
+ * @param new_icon The new Smallicon value
+ */
+ public void setSmallicon(String new_icon) {
+ smallicon = new_icon;
}
- public String getSmallicon()
- {
- return smallicon;
+
+ /**
+ * Sets the Largeicon attribute of the JspTaglibSubTask object
+ *
+ * @param new_icon The new Largeicon value
+ */
+ public void setLargeicon(String new_icon) {
+ largeicon = new_icon;
}
- public String getLargeicon()
- {
- return largeicon;
+
+ /**
+ * Sets the Description attribute of the JspTaglibSubTask object
+ *
+ * @param new_description The new Description value
+ */
+ public void setDescription(String new_description) {
+ description = new_description;
}
- public String getDescription()
- {
- return description;
+
+ /**
+ * Sets the Filename attribute of the JspTaglibSubTask object
+ *
+ * @param new_filename The new Filename value
+ */
+ public void setFilename(String new_filename) {
+ filename = new_filename;
+ setDestinationFile(filename);
}
- public String getFilename()
- {
- return filename;
+
+ /**
+ * Gets the SubTaskName attribute of the JspTaglibSubTask object
+ *
+ * @return The SubTaskName value
+ */
+ public String getSubTaskName() {
+ return SUBTASK_NAME;
}
- public void setTaglibversion( String taglibversion )
- {
- this.taglibversion = taglibversion;
+
+ /**
+ * Gets the Taglibversion attribute of the JspTaglibSubTask object
+ *
+ * @return The Taglibversion value
+ */
+ public String getTaglibversion() {
+ return taglibversion;
}
- public void setJspversion( JspVersionTypes jspversion )
- {
- this.jspversion = jspversion.getValue();
+
+ /**
+ * Gets the Jspversion attribute of the JspTaglibSubTask object
+ *
+ * @return The Jspversion value
+ */
+ public String getJspversion() {
+ return jspversion;
}
- public void setShortname( String shortname )
- {
- this.shortname = shortname;
+
+ /**
+ * Gets the Shortname attribute of the JspTaglibSubTask object
+ *
+ * @return The Shortname value
+ */
+ public String getShortname() {
+ return shortname;
}
- public void setUri( String uri )
- {
- this.uri = uri;
+
+ /**
+ * Gets the Uri attribute of the JspTaglibSubTask object
+ *
+ * @return The Uri value
+ */
+ public String getUri() {
+ return uri;
}
- public void setDisplayname( String new_display_name )
- {
- displayname = new_display_name;
+
+ /**
+ * Gets the Displayname attribute of the JspTaglibSubTask object
+ *
+ * @return The Displayname value
+ */
+ public String getDisplayname() {
+ return displayname;
}
- public void setSmallicon( String new_icon )
- {
- smallicon = new_icon;
+
+ /**
+ * Gets the Smallicon attribute of the JspTaglibSubTask object
+ *
+ * @return The Smallicon value
+ */
+ public String getSmallicon() {
+ return smallicon;
}
- public void setLargeicon( String new_icon )
- {
- largeicon = new_icon;
+
+ /**
+ * Gets the Largeicon attribute of the JspTaglibSubTask object
+ *
+ * @return The Largeicon value
+ */
+ public String getLargeicon() {
+ return largeicon;
}
- public void setDescription( String new_description )
- {
- description = new_description;
+
+ /**
+ * Gets the Description attribute of the JspTaglibSubTask object
+ *
+ * @return The Description value
+ */
+ public String getDescription() {
+ return description;
}
- public void setFilename( String new_filename )
- {
- filename = new_filename;
- setDestinationFile( filename );
+
+ /**
+ * Gets the Filename attribute of the JspTaglibSubTask object
+ *
+ * @return The Filename value
+ */
+ public String getFilename() {
+ return filename;
}
+
/**
* Called to validate configuration parameters.
*
* @exception XDocletException Description of Exception
*/
- public void validateOptions() throws XDocletException
- {
+ public void validateOptions() throws XDocletException {
super.validateOptions();
- if( getShortname() == null || getShortname().trim().equals( "" ) )
- {
+ if (getShortname() == null || getShortname().trim().equals("")) {
throw new XDocletException( Translator.getString(
"parameter_missing_or_empty", new String[]{"shortName"} ) );
}
}
- public void execute() throws XDocletException
- {
- if( getJspversion().equals( "1.1" ) )
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @exception XDocletException Describe the exception @todo-javadoc Write
+ * javadocs for exception
+ */
+ public void execute() throws XDocletException {
+ if (getJspversion().equals("1.1")) {
setPublicId( TLD_PUBLICID_1_1 );
setSystemId( TLD_SYSTEMID_1_1 );
setDtdFileName( TLD_DTD_FILE_NAME_1_1 );
}
- else
- {
+ else {
setPublicId( TLD_PUBLICID_1_2 );
setSystemId( TLD_SYSTEMID_1_2 );
setDtdFileName( TLD_DTD_FILE_NAME_1_2 );
@@ -178,89 +365,166 @@
startProcess();
}
- protected void engineStarted() throws XDocletException
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @exception XDocletException Describe the exception @todo-javadoc Write
+ * javadocs for exception
+ */
+ protected void engineStarted() throws XDocletException {
System.out.println( Translator.getString( "generating_something",
new String[]{getDestinationFile().toString()} ) );
}
+
/**
+ * @author Aslak Helles�y
* @created July 28, 2001
*/
- public static class ContextParam implements java.io.Serializable
- {
+ public static class ContextParam implements java.io.Serializable {
+ /**
+ * @todo-javadoc Describe the field
+ */
private String paramName = null;
+ /**
+ * @todo-javadoc Describe the field
+ */
private String paramValue = null;
+ /**
+ * @todo-javadoc Describe the field
+ */
private String description = "";
- public String getName()
- {
- return paramName;
+
+ /**
+ * Sets the Name attribute of the ContextParam object
+ *
+ * @param name The new Name value
+ */
+ public void setName(String name) {
+ paramName = name;
}
- public String getValue()
- {
- return paramValue;
+
+ /**
+ * Sets the Value attribute of the ContextParam object
+ *
+ * @param value The new Value value
+ */
+ public void setValue(String value) {
+ paramValue = value;
}
- public String getDescription()
- {
- return description;
+
+ /**
+ * Sets the Description attribute of the ContextParam object
+ *
+ * @param desc The new Description value
+ */
+ public void setDescription(String desc) {
+ description = desc;
}
- public void setName( String name )
- {
- paramName = name;
+
+ /**
+ * Gets the Name attribute of the ContextParam object
+ *
+ * @return The Name value
+ */
+ public String getName() {
+ return paramName;
}
- public void setValue( String value )
- {
- paramValue = value;
+
+ /**
+ * Gets the Value attribute of the ContextParam object
+ *
+ * @return The Value value
+ */
+ public String getValue() {
+ return paramValue;
}
- public void setDescription( String desc )
- {
- description = desc;
+
+ /**
+ * Gets the Description attribute of the ContextParam object
+ *
+ * @return The Description value
+ */
+ public String getDescription() {
+ return description;
}
}
+
/**
+ * @author Aslak Helles�y
* @created July 28, 2001
*/
- public static class TagLib implements java.io.Serializable
- {
+ public static class TagLib implements java.io.Serializable {
+ /**
+ * @todo-javadoc Describe the field
+ */
private String taglibURI = null;
+ /**
+ * @todo-javadoc Describe the field
+ */
private String taglibLocation = null;
- public String getURI()
- {
- return taglibURI;
+
+ /**
+ * Sets the URI attribute of the TagLib object
+ *
+ * @param uri The new URI value
+ */
+ public void setURI(String uri) {
+ taglibURI = uri;
}
- public String getLocation()
- {
- return taglibLocation;
+
+ /**
+ * Sets the Location attribute of the TagLib object
+ *
+ * @param location The new Location value
+ */
+ public void setLocation(String location) {
+ taglibLocation = location;
}
- public void setURI( String uri )
- {
- taglibURI = uri;
+
+ /**
+ * Gets the URI attribute of the TagLib object
+ *
+ * @return The URI value
+ */
+ public String getURI() {
+ return taglibURI;
}
- public void setLocation( String location )
- {
- taglibLocation = location;
+
+ /**
+ * Gets the Location attribute of the TagLib object
+ *
+ * @return The Location value
+ */
+ public String getLocation() {
+ return taglibLocation;
}
}
+
/**
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created July 19, 2001
*/
- public static class JspVersionTypes extends
org.apache.tools.ant.types.EnumeratedAttribute
- {
- public java.lang.String[] getValues()
- {
+ public static class JspVersionTypes extends
org.apache.tools.ant.types.EnumeratedAttribute {
+ /**
+ * Gets the Values attribute of the JspVersionTypes object
+ *
+ * @return The Values value
+ */
+ public java.lang.String[] getValues() {
return ( new java.lang.String[]{"1.1", "1.2"} );
}
}
1.18 +144 -31 xdoclet/core/src/xdoclet/web/WebDocletTask.java
Index: WebDocletTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/web/WebDocletTask.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -r1.17 -r1.18
--- WebDocletTask.java 26 Mar 2002 00:01:18 -0000 1.17
+++ WebDocletTask.java 4 Apr 2002 00:27:49 -0000 1.18
@@ -1,3 +1,38 @@
+/*
+ * Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of BEKK Consulting nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+/*
+ * Change log
+ *
+ */
package xdoclet.web;
import xdoclet.DocletTask;
@@ -14,69 +49,147 @@
/**
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created July 2, 2001
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
+ */
+public class WebDocletTask extends DocletTask {
+ /**
+ * @todo-javadoc Describe the field
*/
-public class WebDocletTask extends DocletTask
-{
protected WebXmlSubTask deploymentdescriptor;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected JspTaglibSubTask jsptaglib;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected JBossWebXmlSubTask jbosswebxml;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected WeblogicWebXmlSubTask weblogicwebxml;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected StrutsConfigXmlSubTask strutsconfigxml;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected WebWorkConfigPropertiesSubTask webworkconfig;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected WebWorkActionDocsSubTask webworkdocs;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected JRunWebXmlSubTask jrunwebxml;
- public WebXmlSubTask createDeploymentdescriptor()
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ */
+ public WebXmlSubTask createDeploymentdescriptor() {
deploymentdescriptor = new WebXmlSubTask();
return deploymentdescriptor;
}
- public JspTaglibSubTask createJsptaglib()
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ */
+ public JspTaglibSubTask createJsptaglib() {
jsptaglib = new JspTaglibSubTask();
return jsptaglib;
}
- public JBossWebXmlSubTask createJbosswebxml()
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ */
+ public JBossWebXmlSubTask createJbosswebxml() {
jbosswebxml = new JBossWebXmlSubTask();
return jbosswebxml;
}
- public WeblogicWebXmlSubTask createWeblogicwebxml() throws XDocletException
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ * @exception XDocletException Describe the exception @todo-javadoc Write
+ * javadocs for exception
+ */
+ public WeblogicWebXmlSubTask createWeblogicwebxml() throws XDocletException {
weblogicwebxml = new WeblogicWebXmlSubTask();
return weblogicwebxml;
}
- public StrutsConfigXmlSubTask createStrutsconfigxml()
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ */
+ public StrutsConfigXmlSubTask createStrutsconfigxml() {
strutsconfigxml = new StrutsConfigXmlSubTask();
return strutsconfigxml;
}
- public WebWorkConfigPropertiesSubTask createWebworkconfigproperties()
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ */
+ public WebWorkConfigPropertiesSubTask createWebworkconfigproperties() {
webworkconfig = new WebWorkConfigPropertiesSubTask();
return webworkconfig;
}
- public WebWorkActionDocsSubTask createWebworkactiondocs()
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ */
+ public WebWorkActionDocsSubTask createWebworkactiondocs() {
webworkdocs = new WebWorkActionDocsSubTask();
return webworkdocs;
}
- public JRunWebXmlSubTask createJRunWebXml()
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @return Describe the return value @todo-javadoc Write javadocs for return
+ * value
+ */
+ public JRunWebXmlSubTask createJRunWebXml() {
jrunwebxml = new JRunWebXmlSubTask();
return jrunwebxml;
}
- protected List getSubTasks()
- {
+
+ /**
+ * Gets the SubTasks attribute of the WebDocletTask object
+ *
+ * @return The SubTasks value
+ */
+ protected List getSubTasks() {
List subtasks = super.getSubTasks();
subtasks.add( this.deploymentdescriptor );
1.18 +486 -173 xdoclet/core/src/xdoclet/web/WebXmlSubTask.java
Index: WebXmlSubTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/web/WebXmlSubTask.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -r1.17 -r1.18
--- WebXmlSubTask.java 28 Mar 2002 11:58:09 -0000 1.17
+++ WebXmlSubTask.java 4 Apr 2002 00:27:49 -0000 1.18
@@ -1,3 +1,38 @@
+/*
+ * Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of BEKK Consulting nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+/*
+ * Change log
+ *
+ */
package xdoclet.web;
import xdoclet.XDocletException;
@@ -12,175 +47,362 @@
*
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created June 19, 2001
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
+ */
+public class WebXmlSubTask extends XmlSubTask {
+ /**
+ * @todo-javadoc Describe the field
*/
-public class WebXmlSubTask extends XmlSubTask
-{
- public final static String SUBTASK_NAME = "deploymentDescriptor";
-
- private static String DEFAULT_TEMPLATE_FILE = "/xdoclet/web/web_xml.j";
- private static String GENERATED_FILE_NAME = "web.xml";
-
- private static String WEBXML_PUBLICID_2_3 = "-//Sun Microsystems, Inc.//DTD
Web Application 2.3//EN";
- private static String WEBXML_PUBLICID_2_2 = "-//Sun Microsystems, Inc.//DTD
Web Application 2.2//EN";
- private static String WEBXML_SYSTEMID_2_3 =
"http://java.sun.com/dtd/web-app_2_3.dtd";
- private static String WEBXML_SYSTEMID_2_2 =
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";
- private static String WEBXML_DTD_FILE_NAME_2_3 = "/xdoclet/web/web-jar-23.dtd";
- private static String WEBXML_DTD_FILE_NAME_2_2 = "/xdoclet/web/web-jar-22.dtd";
protected String servletspec = "2.3";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String smallicon = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String largeicon = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String displayname = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected String description = "";
+ /**
+ * @todo-javadoc Describe the field
+ */
protected boolean distributable = true;
+ /**
+ * @todo-javadoc Describe the field
+ */
protected ArrayList contextParams = new ArrayList();
+ /**
+ * @todo-javadoc Describe the field
+ */
protected int sessiontimeout = 0;
//container default
+ /**
+ * @todo-javadoc Describe the field
+ */
protected ArrayList welcomeFiles = new ArrayList();
+ /**
+ * @todo-javadoc Describe the field
+ */
protected ArrayList tagLibs = new ArrayList();
+ /**
+ * @todo-javadoc Describe the field
+ */
+ public final static String SUBTASK_NAME = "deploymentDescriptor";
+
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String DEFAULT_TEMPLATE_FILE = "/xdoclet/web/web_xml.j";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String GENERATED_FILE_NAME = "web.xml";
- public WebXmlSubTask()
- {
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String WEBXML_PUBLICID_2_3 = "-//Sun Microsystems, Inc.//DTD
Web Application 2.3//EN";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String WEBXML_PUBLICID_2_2 = "-//Sun Microsystems, Inc.//DTD
Web Application 2.2//EN";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String WEBXML_SYSTEMID_2_3 =
"http://java.sun.com/dtd/web-app_2_3.dtd";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String WEBXML_SYSTEMID_2_2 =
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String WEBXML_DTD_FILE_NAME_2_3 = "/xdoclet/web/web-jar-23.dtd";
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static String WEBXML_DTD_FILE_NAME_2_2 = "/xdoclet/web/web-jar-22.dtd";
+
+
+ /**
+ * Describe what the WebXmlSubTask constructor does @todo-javadoc Write
+ * javadocs for constructor
+ */
+ public WebXmlSubTask() {
setTemplateURL( getClass().getResource( DEFAULT_TEMPLATE_FILE ) );
setDestinationFile( GENERATED_FILE_NAME );
}
- public String getSubTaskName()
- {
- return SUBTASK_NAME;
+
+ /**
+ * Sets the Servletspec attribute of the WebXmlSubTask object
+ *
+ * @param new_servletspec The new Servletspec value
+ */
+ public void setServletspec(ServletVersionTypes new_servletspec) {
+ servletspec = new_servletspec.getValue();
}
- public String getServletspec()
- {
- return servletspec;
+
+ /**
+ * Sets the Smallicon attribute of the WebXmlSubTask object
+ *
+ * @param new_icon The new Smallicon value
+ */
+ public void setSmallicon(String new_icon) {
+ smallicon = new_icon;
}
- public ArrayList getContextParams()
- {
- return contextParams;
+
+ /**
+ * Sets the Largeicon attribute of the WebXmlSubTask object
+ *
+ * @param new_icon The new Largeicon value
+ */
+ public void setLargeicon(String new_icon) {
+ largeicon = new_icon;
}
- public String getSmallicon()
- {
- return smallicon;
+
+ /**
+ * Sets the Displayname attribute of the WebXmlSubTask object
+ *
+ * @param new_display_name The new Displayname value
+ */
+ public void setDisplayname(String new_display_name) {
+ displayname = new_display_name;
}
- public String getLargeicon()
- {
- return largeicon;
+
+ /**
+ * Sets the Description attribute of the WebXmlSubTask object
+ *
+ * @param new_description The new Description value
+ */
+ public void setDescription(String new_description) {
+ description = new_description;
}
- public String getDisplayname()
- {
- return displayname;
+
+ /**
+ * Sets the Distributable attribute of the WebXmlSubTask object
+ *
+ * @param distributable The new Distributable value
+ */
+ public void setDistributable(boolean distributable) {
+ this.distributable = distributable;
}
- public String getDescription()
- {
- return description;
+
+ /**
+ * Sets the Sessiontimeout attribute of the WebXmlSubTask object
+ *
+ * @param session_timeout The new Sessiontimeout value
+ */
+ public void setSessiontimeout(int session_timeout) {
+ sessiontimeout = session_timeout;
}
- public boolean getDistributable()
- {
- return distributable;
+
+ /**
+ * Sets the TagLibs attribute of the WebXmlSubTask object
+ *
+ * @param tagLibs The new TagLibs value
+ */
+ public void setTagLibs(ArrayList tagLibs) {
+ this.tagLibs = tagLibs;
}
- public int getSessiontimeout()
- {
- return sessiontimeout;
+
+ /**
+ * Sets the WelcomeFiles attribute of the WebXmlSubTask object
+ *
+ * @param welcomeFiles The new WelcomeFiles value
+ */
+ public void setWelcomeFiles(ArrayList welcomeFiles) {
+ this.welcomeFiles = welcomeFiles;
}
- public ArrayList getWelcomeFiles()
- {
- return welcomeFiles;
+
+ /**
+ * Sets the ContextParams attribute of the WebXmlSubTask object
+ *
+ * @param contextParams The new ContextParams value
+ */
+ public void setContextParams(ArrayList contextParams) {
+ this.contextParams = contextParams;
}
- public ArrayList getTagLibs()
- {
- return tagLibs;
+
+ /**
+ * Gets the SubTaskName attribute of the WebXmlSubTask object
+ *
+ * @return The SubTaskName value
+ */
+ public String getSubTaskName() {
+ return SUBTASK_NAME;
}
- public void setServletspec( ServletVersionTypes new_servletspec )
- {
- servletspec = new_servletspec.getValue();
+
+ /**
+ * Gets the Servletspec attribute of the WebXmlSubTask object
+ *
+ * @return The Servletspec value
+ */
+ public String getServletspec() {
+ return servletspec;
}
- public void setSmallicon( String new_icon )
- {
- smallicon = new_icon;
+
+ /**
+ * Gets the ContextParams attribute of the WebXmlSubTask object
+ *
+ * @return The ContextParams value
+ */
+ public ArrayList getContextParams() {
+ return contextParams;
}
- public void setLargeicon( String new_icon )
- {
- largeicon = new_icon;
+
+ /**
+ * Gets the Smallicon attribute of the WebXmlSubTask object
+ *
+ * @return The Smallicon value
+ */
+ public String getSmallicon() {
+ return smallicon;
}
- public void setDisplayname( String new_display_name )
- {
- displayname = new_display_name;
+
+ /**
+ * Gets the Largeicon attribute of the WebXmlSubTask object
+ *
+ * @return The Largeicon value
+ */
+ public String getLargeicon() {
+ return largeicon;
}
- public void setDescription( String new_description )
- {
- description = new_description;
+
+ /**
+ * Gets the Displayname attribute of the WebXmlSubTask object
+ *
+ * @return The Displayname value
+ */
+ public String getDisplayname() {
+ return displayname;
}
- public void setDistributable( boolean distributable )
- {
- this.distributable = distributable;
+
+ /**
+ * Gets the Description attribute of the WebXmlSubTask object
+ *
+ * @return The Description value
+ */
+ public String getDescription() {
+ return description;
}
- public void setSessiontimeout( int session_timeout )
- {
- sessiontimeout = session_timeout;
+
+ /**
+ * Gets the Distributable attribute of the WebXmlSubTask object
+ *
+ * @return The Distributable value
+ */
+ public boolean getDistributable() {
+ return distributable;
}
- public void setTagLibs( ArrayList tagLibs )
- {
- this.tagLibs = tagLibs;
+
+ /**
+ * Gets the Sessiontimeout attribute of the WebXmlSubTask object
+ *
+ * @return The Sessiontimeout value
+ */
+ public int getSessiontimeout() {
+ return sessiontimeout;
}
- public void setWelcomeFiles( ArrayList welcomeFiles )
- {
- this.welcomeFiles = welcomeFiles;
+
+ /**
+ * Gets the WelcomeFiles attribute of the WebXmlSubTask object
+ *
+ * @return The WelcomeFiles value
+ */
+ public ArrayList getWelcomeFiles() {
+ return welcomeFiles;
}
- public void setContextParams( ArrayList contextParams )
- {
- this.contextParams = contextParams;
+
+ /**
+ * Gets the TagLibs attribute of the WebXmlSubTask object
+ *
+ * @return The TagLibs value
+ */
+ public ArrayList getTagLibs() {
+ return tagLibs;
}
- public void addContextparam( ContextParam cp )
- {
+
+ /**
+ * Describe the method @todo-javadoc Describe the method
+ *
+ * @param cp Describe the method parameter @todo-javadoc Describe the method
+ * parameter
+ */
+ public void addContextparam(ContextParam cp) {
contextParams.add( cp );
}
- public void addWelcomefile( WelcomeFile file )
- {
+
+ /**
+ * Describe the method @todo-javadoc Describe the method
+ *
+ * @param file Describe the method parameter @todo-javadoc Describe the method
+ * parameter
+ */
+ public void addWelcomefile(WelcomeFile file) {
welcomeFiles.add( file );
}
- public void addTaglib( TagLib taglib )
- {
+
+ /**
+ * Describe the method @todo-javadoc Describe the method
+ *
+ * @param taglib Describe the method parameter @todo-javadoc Describe the
+ * method parameter
+ */
+ public void addTaglib(TagLib taglib) {
tagLibs.add( taglib );
}
- public void execute() throws XDocletException
- {
- if( getServletspec().equals( "2.2" ) )
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @exception XDocletException Describe the exception @todo-javadoc Write
+ * javadocs for exception
+ */
+ public void execute() throws XDocletException {
+ if (getServletspec().equals("2.2")) {
setPublicId( WEBXML_PUBLICID_2_2 );
setSystemId( WEBXML_SYSTEMID_2_2 );
setDtdFileName( WEBXML_DTD_FILE_NAME_2_2 );
}
- else
- {
+ else {
setPublicId( WEBXML_PUBLICID_2_3 );
setSystemId( WEBXML_SYSTEMID_2_3 );
setDtdFileName( WEBXML_DTD_FILE_NAME_2_3 );
@@ -189,106 +411,197 @@
startProcess();
}
- protected void engineStarted() throws XDocletException
- {
+
+ /**
+ * Describe what the method does @todo-javadoc Write javadocs for method
+ *
+ * @exception XDocletException Describe the exception @todo-javadoc Write
+ * javadocs for exception
+ */
+ protected void engineStarted() throws XDocletException {
System.out.println( Translator.getString( "generating_something", new
String[]{getDestinationFile()} ) );
}
+
/**
+ * @author Aslak Helles�y
* @created July 28, 2001
*/
- public static class ContextParam implements java.io.Serializable
- {
+ public static class ContextParam implements java.io.Serializable {
+ /**
+ * @todo-javadoc Describe the field
+ */
private String paramName = null;
+ /**
+ * @todo-javadoc Describe the field
+ */
private String paramValue = null;
+ /**
+ * @todo-javadoc Describe the field
+ */
private String description = "";
- public String getName()
- {
- return paramName;
+
+ /**
+ * Sets the Name attribute of the ContextParam object
+ *
+ * @param name The new Name value
+ */
+ public void setName(String name) {
+ paramName = name;
}
- public String getValue()
- {
- return paramValue;
+
+ /**
+ * Sets the Value attribute of the ContextParam object
+ *
+ * @param value The new Value value
+ */
+ public void setValue(String value) {
+ paramValue = value;
}
- public String getDescription()
- {
- return description;
+
+ /**
+ * Sets the Description attribute of the ContextParam object
+ *
+ * @param desc The new Description value
+ */
+ public void setDescription(String desc) {
+ description = desc;
}
- public void setName( String name )
- {
- paramName = name;
+
+ /**
+ * Gets the Name attribute of the ContextParam object
+ *
+ * @return The Name value
+ */
+ public String getName() {
+ return paramName;
}
- public void setValue( String value )
- {
- paramValue = value;
+
+ /**
+ * Gets the Value attribute of the ContextParam object
+ *
+ * @return The Value value
+ */
+ public String getValue() {
+ return paramValue;
}
- public void setDescription( String desc )
- {
- description = desc;
+
+ /**
+ * Gets the Description attribute of the ContextParam object
+ *
+ * @return The Description value
+ */
+ public String getDescription() {
+ return description;
}
}
+
/**
+ * @author Aslak Helles�y
* @created July 28, 2001
*/
- public static class TagLib implements java.io.Serializable
- {
+ public static class TagLib implements java.io.Serializable {
+ /**
+ * @todo-javadoc Describe the field
+ */
private String taglibUri = null;
+ /**
+ * @todo-javadoc Describe the field
+ */
private String taglibLocation = null;
- public String getUri()
- {
- return taglibUri;
+
+ /**
+ * Sets the Uri attribute of the TagLib object
+ *
+ * @param uri The new Uri value
+ */
+ public void setUri(String uri) {
+ taglibUri = uri;
}
- public String getLocation()
- {
- return taglibLocation;
+
+ /**
+ * Sets the Location attribute of the TagLib object
+ *
+ * @param location The new Location value
+ */
+ public void setLocation(String location) {
+ taglibLocation = location;
}
- public void setUri( String uri )
- {
- taglibUri = uri;
+
+ /**
+ * Gets the Uri attribute of the TagLib object
+ *
+ * @return The Uri value
+ */
+ public String getUri() {
+ return taglibUri;
}
- public void setLocation( String location )
- {
- taglibLocation = location;
+
+ /**
+ * Gets the Location attribute of the TagLib object
+ *
+ * @return The Location value
+ */
+ public String getLocation() {
+ return taglibLocation;
}
}
+
/**
+ * @author Aslak Helles�y
* @created Sep 18, 2001
*/
- public static class WelcomeFile implements java.io.Serializable
- {
+ public static class WelcomeFile implements java.io.Serializable {
+ /**
+ * @todo-javadoc Describe the field
+ */
private String file = null;
- public String getFile()
- {
- return file;
- }
- public void setFile( String file )
- {
+ /**
+ * Sets the File attribute of the WelcomeFile object
+ *
+ * @param file The new File value
+ */
+ public void setFile(String file) {
this.file = file;
}
+
+
+ /**
+ * Gets the File attribute of the WelcomeFile object
+ *
+ * @return The File value
+ */
+ public String getFile() {
+ return file;
+ }
}
+
/**
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created October 20, 2001
*/
- public static class ServletVersionTypes extends
org.apache.tools.ant.types.EnumeratedAttribute
- {
- public java.lang.String[] getValues()
- {
+ public static class ServletVersionTypes extends
org.apache.tools.ant.types.EnumeratedAttribute {
+ /**
+ * Gets the Values attribute of the ServletVersionTypes object
+ *
+ * @return The Values value
+ */
+ public java.lang.String[] getValues() {
return ( new java.lang.String[]{"2.2", "2.3"} );
}
}
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel