User: rinkrank
Date: 02/05/23 17:59:35
Modified: core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
TemplateSubTask.java
Log:
changes required for refactored document task
Revision Changes Path
No revision
No revision
1.41.2.13 +11 -15 xdoclet/core/src/xdoclet/TemplateSubTask.java
Index: TemplateSubTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/TemplateSubTask.java,v
retrieving revision 1.41.2.12
retrieving revision 1.41.2.13
diff -u -w -r1.41.2.12 -r1.41.2.13
--- TemplateSubTask.java 23 May 2002 22:25:06 -0000 1.41.2.12
+++ TemplateSubTask.java 24 May 2002 00:59:35 -0000 1.41.2.13
@@ -34,13 +34,13 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Sep 25, 2001
* @xdoclet:subtask name="template" parent="xdoclet.DocletTask"
- * @version $Revision: 1.41.2.12 $
+ * @version $Revision: 1.41.2.13 $
*/
public class TemplateSubTask extends SubTask
{
public final static String SUBTASK_NAME = "template";
- private URL templateFile = null;
+ private URL templateURL = null;
private transient TemplateEngine engine = null;
@@ -116,11 +116,6 @@
return generationManager;
}
- public URL getTemplateFile()
- {
- return templateFile;
- }
-
/**
* Gets the PackageSubstitutions attribute of the TemplateSubTask object
*
@@ -179,7 +174,7 @@
*/
public URL getTemplateURL()
{
- return templateFile;
+ return templateURL;
}
/**
@@ -316,11 +311,11 @@
* This method should be called to set a template file programmatically. The
URL is typically obtained with a
* getClass().getResource( templateName )
*
- * @param templateFile the URL of the template file
+ * @param templateURL
*/
- public void setTemplateURL(URL templateFile)
+ public void setTemplateURL(URL templateURL)
{
- this.templateFile = templateFile;
+ this.templateURL = templateURL;
}
/**
@@ -328,19 +323,20 @@
* method instead.
*
* @param templateFile the file name (real file!) of the template
+ * @exception XDocletException
*/
- public void setTemplateFile(File templateFile)
+ public void setTemplateFile(File templateFile) throws XDocletException
{
if (templateFile.exists()) {
try {
setTemplateURL(templateFile.toURL());
}
catch (MalformedURLException e) {
- throw new org.apache.tools.ant.BuildException(e.getMessage());
+ throw new XDocletException(e.getMessage());
}
}
else {
- throw new org.apache.tools.ant.BuildException("Couldn't find template:
" + templateFile.getAbsolutePath());
+ throw new XDocletException("Couldn't find template: " +
templateFile.getAbsolutePath());
}
}
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel