More Javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/velocity/engine/trunk@447113 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/java/org/apache/velocity/servlet/VelocityServlet.java b/src/java/org/apache/velocity/servlet/VelocityServlet.java
index fc6efa6..79b1c40 100644
--- a/src/java/org/apache/velocity/servlet/VelocityServlet.java
+++ b/src/java/org/apache/velocity/servlet/VelocityServlet.java
@@ -173,6 +173,8 @@
* to do anything to the environment before the
* initialization of the singelton takes place, or to
* initialize the singleton in other ways.
+ * @param config
+ * @throws ServletException
*/
protected void initVelocity( ServletConfig config )
throws ServletException
@@ -301,7 +303,11 @@
/**
* Handles HTTP <code>GET</code> requests by calling {@link
- * #doRequest()}.
+ * #doRequest(HttpServletRequest, HttpServletResponse)}.
+ * @param request
+ * @param response
+ * @throws ServletException
+ * @throws IOException
*/
public void doGet( HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
@@ -311,7 +317,11 @@
/**
* Handles HTTP <code>POST</code> requests by calling {@link
- * #doRequest()}.
+ * #doRequest(HttpServletRequest, HttpServletResponse)}.
+ * @param request
+ * @param response
+ * @throws ServletException
+ * @throws IOException
*/
public void doPost( HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
@@ -324,6 +334,8 @@
*
* @param request HttpServletRequest object containing client request
* @param response HttpServletResponse object for the response
+ * @throws ServletException
+ * @throws IOException
*/
protected void doRequest(HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
@@ -404,6 +416,12 @@
* @param template template object returned by the handleRequest() method
* @param context context created by the createContext() method
* @param response servlet reponse (use this to get the output stream or Writer
+ * @throws ResourceNotFoundException
+ * @throws ParseErrorException
+ * @throws MethodInvocationException
+ * @throws IOException
+ * @throws UnsupportedEncodingException
+ * @throws Exception
*/
protected void mergeTemplate( Template template, Context context, HttpServletResponse response )
throws ResourceNotFoundException, ParseErrorException,
@@ -501,6 +519,7 @@
* RuntimeSingleton's <code>output.encoding</code> property.
*
* @param request The servlet request from the client.
+ * @return The chosen character encoding.
*/
protected String chooseCharacterEncoding(HttpServletRequest request)
{
@@ -596,6 +615,7 @@
* @param ctx The context to add your data to.
* @return The template to merge with your context or null, indicating
* that you handled the processing.
+ * @throws Exception
*
* @since Velocity v1.1
*/
@@ -636,6 +656,7 @@
*
* @param ctx The context to add your data to.
* @return The template to merge with your context.
+ * @throws Exception
*/
protected Template handleRequest( Context ctx )
throws Exception
@@ -653,6 +674,8 @@
* @param request original HttpServletRequest from servlet container.
* @param response HttpServletResponse object from servlet container.
* @param cause Exception that was thrown by some other part of process.
+ * @throws ServletException
+ * @throws IOException
*/
protected void error( HttpServletRequest request, HttpServletResponse response, Exception cause )
throws ServletException, IOException
diff --git a/src/java/org/apache/velocity/texen/Generator.java b/src/java/org/apache/velocity/texen/Generator.java
index bda4e94..c028c4b 100644
--- a/src/java/org/apache/velocity/texen/Generator.java
+++ b/src/java/org/apache/velocity/texen/Generator.java
@@ -127,6 +127,7 @@
/**
* Set the velocity engine.
+ * @param ve
*/
public void setVelocityEngine(VelocityEngine ve)
{
@@ -139,8 +140,7 @@
* occurs during the reading operation the default properties
* are used.
*
- * @param String properties used to help populate the control context.
- * @return Generator generator used in the control context.
+ * @param propFile properties used to help populate the control context.
*/
public Generator (String propFile)
{
@@ -176,7 +176,7 @@
* Create a new Generator object with a given property
* set. The property set will be duplicated.
*
- * @param Properties properties object to help populate the control context.
+ * @param props properties object to help populate the control context.
*/
public Generator (Properties props)
{
@@ -217,7 +217,7 @@
* Set the template path, where Texen will look
* for Velocity templates.
*
- * @param String template path for velocity templates.
+ * @param templatePath template path for velocity templates.
*/
public void setTemplatePath(String templatePath)
{
@@ -237,8 +237,7 @@
/**
* Set the output path for the generated
* output.
- *
- * @return String output path for texen output.
+ * @param outputPath
*/
public void setOutputPath(String outputPath)
{
@@ -258,6 +257,7 @@
/**
* Set the output encoding.
+ * @param outputEncoding
*/
public void setOutputEncoding(String outputEncoding)
{
@@ -266,6 +266,7 @@
/**
* Set the input (template) encoding.
+ * @param inputEncoding
*/
public void setInputEncoding(String inputEncoding)
{
@@ -277,6 +278,8 @@
*
* @param path path to the output file
* @param encoding output encoding
+ * @return A Writer for this generator.
+ * @throws Exception
*/
public Writer getWriter(String path, String encoding) throws Exception {
Writer writer;
@@ -295,6 +298,8 @@
*
* @param templateName name of the template
* @param encoding template encoding
+ * @return A Template.
+ * @throws Exception
*/
public Template getTemplate(String templateName, String encoding) throws Exception {
Template template;
@@ -312,8 +317,10 @@
* output file parameter is null or an empty string the result is
* returned as a string object. Otherwise an empty string is returned.
*
- * @param String input template
- * @param String output file
+ * @param inputTemplate input template
+ * @param outputFile output file
+ * @return The parsed file.
+ * @throws Exception
*/
public String parse (String inputTemplate, String outputFile)
throws Exception
@@ -327,11 +334,12 @@
* returned as a string object. Otherwise an empty string is returned.
* You can add objects to the context with the objs Hashtable.
*
- * @param String input template
- * @param String output file
- * @param String id for object to be placed in the control context
- * @param String object to be placed in the context
+ * @param inputTemplate input template
+ * @param outputFile output file
+ * @param objectID id for object to be placed in the control context
+ * @param object object to be placed in the context
* @return String generated output from velocity
+ * @throws Exception
*/
public String parse (String inputTemplate,
String outputFile,
@@ -347,13 +355,14 @@
* returned as a string object. Otherwise an empty string is returned.
* You can add objects to the context with the objs Hashtable.
*
- * @param String input template
- * @param String inputEncoding template encoding
- * @param String output file
- * @param String outputEncoding encoding of output file
- * @param String id for object to be placed in the control context
- * @param String object to be placed in the context
+ * @param inputTemplate input template
+ * @param inputEncoding template encoding
+ * @param outputFile output file
+ * @param outputEncoding outputEncoding encoding of output file
+ * @param objectID id for object to be placed in the control context
+ * @param object object to be placed in the context
* @return String generated output from velocity
+ * @throws Exception
*/
public String parse (String inputTemplate,
String inputEncoding,
@@ -416,9 +425,10 @@
* Parse the control template and merge it with the control
* context. This is the starting point in texen.
*
- * @param String control template
- * @param Context control context
+ * @param controlTemplate control template
+ * @param controlContext control context
* @return String generated output
+ * @throws Exception
*/
public String parse (String controlTemplate, Context controlContext)
throws Exception
@@ -440,7 +450,7 @@
* objs Hashtable. Default objects and objects that comes from
* the properties of this Generator object is also added.
*
- * @param Hashtable objects to place in the control context
+ * @param objs objects to place in the control context
* @return Context context filled with objects
*/
protected Context getContext (Hashtable objs)
@@ -452,8 +462,8 @@
/**
* Add all the contents of a Hashtable to the context.
*
- * @param Context context to fill with objects
- * @param Hashtable source of objects
+ * @param context context to fill with objects
+ * @param objs source of objects
*/
protected void fillContextHash (Context context, Hashtable objs)
{
@@ -468,7 +478,7 @@
/**
* Add properties that will aways be in the context by default
*
- * @param Context control context to fill with default values.
+ * @param context control context to fill with default values.
*/
protected void fillContextDefaults (Context context)
{
@@ -479,7 +489,7 @@
/**
* Add objects to the context from the current properties.
*
- * @param Context control context to fill with objects
+ * @param context control context to fill with objects
* that are specified in the default.properties
* file
*/
diff --git a/src/java/org/apache/velocity/texen/ant/TexenTask.java b/src/java/org/apache/velocity/texen/ant/TexenTask.java
index 3394517..7cc2687 100644
--- a/src/java/org/apache/velocity/texen/ant/TexenTask.java
+++ b/src/java/org/apache/velocity/texen/ant/TexenTask.java
@@ -145,11 +145,15 @@
*/
protected String useResourceLoaderCache = "false";
+ /**
+ *
+ */
protected String resourceLoaderModificationCheckInterval = "2";
/**
* [REQUIRED] Set the control template for the
* generating process.
+ * @param controlTemplate
*/
public void setControlTemplate (String controlTemplate)
{
@@ -159,6 +163,7 @@
/**
* Get the control template for the
* generating process.
+ * @return The current control template.
*/
public String getControlTemplate()
{
@@ -169,6 +174,8 @@
* [REQUIRED] Set the path where Velocity will look
* for templates using the file template
* loader.
+ * @param templatePath
+ * @throws Exception
*/
public void setTemplatePath(String templatePath) throws Exception
@@ -195,6 +202,7 @@
* Get the path where Velocity will look
* for templates using the file template
* loader.
+ * @return The template path.
*/
public String getTemplatePath()
{
@@ -204,6 +212,7 @@
/**
* [REQUIRED] Set the output directory. It will be
* created if it doesn't exist.
+ * @param outputDirectory
*/
public void setOutputDirectory(File outputDirectory)
{
@@ -219,6 +228,7 @@
/**
* Get the output directory.
+ * @return The output directory.
*/
public String getOutputDirectory()
{
@@ -228,6 +238,7 @@
/**
* [REQUIRED] Set the output file for the
* generation process.
+ * @param outputFile
*/
public void setOutputFile(String outputFile)
{
@@ -236,6 +247,7 @@
/**
* Set the output encoding.
+ * @param outputEncoding
*/
public void setOutputEncoding(String outputEncoding)
{
@@ -244,6 +256,7 @@
/**
* Set the input (template) encoding.
+ * @param inputEncoding
*/
public void setInputEncoding(String inputEncoding)
{
@@ -253,6 +266,7 @@
/**
* Get the output file for the
* generation process.
+ * @return The output file.
*/
public String getOutputFile()
{
@@ -261,6 +275,7 @@
/**
* Sets the log file.
+ * @param log
*/
public void setLogFile(String log)
{
@@ -269,6 +284,7 @@
/**
* Gets the log file.
+ * @return The log file.
*/
public String getLogFile()
{
@@ -279,6 +295,7 @@
* Set the context properties that will be
* fed into the initial context be the
* generating process starts.
+ * @param file
*/
public void setContextProperties( String file )
{
@@ -343,6 +360,7 @@
* Get the context properties that will be
* fed into the initial context be the
* generating process starts.
+ * @return The current context properties.
*/
public ExtendedProperties getContextProperties()
{
@@ -359,11 +377,17 @@
this.useClasspath = useClasspath;
}
+ /**
+ * @param useResourceLoaderCache
+ */
public void setUseResourceLoaderCache(String useResourceLoaderCache)
{
this.useResourceLoaderCache = useResourceLoaderCache;
}
+ /**
+ * @param resourceLoaderModificationCheckInterval
+ */
public void setResourceLoaderModificationCheckInterval(String resourceLoaderModificationCheckInterval)
{
this.resourceLoaderModificationCheckInterval = resourceLoaderModificationCheckInterval;
diff --git a/src/java/org/apache/velocity/texen/util/FileUtil.java b/src/java/org/apache/velocity/texen/util/FileUtil.java
index 89a92f9..af88e5f 100644
--- a/src/java/org/apache/velocity/texen/util/FileUtil.java
+++ b/src/java/org/apache/velocity/texen/util/FileUtil.java
@@ -30,8 +30,8 @@
/**
* Creates the directory s (and any parent directories needed).
*
- * @param String path/directory to create.
- * @param String report of path/directory creation.
+ * @param s path/directory to create.
+ * @return report of path/directory creation.
*/
static public String mkdir (String s)
{
@@ -51,7 +51,7 @@
/**
* A method to get a File object.
*
- * @param String path to file object to create.
+ * @param s path to file object to create.
* @return File created file object.
*/
public static File file(String s)
@@ -63,8 +63,8 @@
/**
* A method to get a File object.
*
- * @param String base path
- * @param String file name
+ * @param base base path
+ * @param s file name
* @return File created file object.
*/
public static File file(String base, String s)
diff --git a/src/java/org/apache/velocity/texen/util/PropertiesUtil.java b/src/java/org/apache/velocity/texen/util/PropertiesUtil.java
index 84ef7da..a4e7423 100644
--- a/src/java/org/apache/velocity/texen/util/PropertiesUtil.java
+++ b/src/java/org/apache/velocity/texen/util/PropertiesUtil.java
@@ -82,6 +82,7 @@
* a relative pathname.
* @return a properties instance loaded with the properties from
* the file. If no file can be found it returns an empty instance.
+ * @throws Exception
*/
protected Properties loadFromTemplatePath(final String propertiesFile)
throws Exception
@@ -148,9 +149,10 @@
/**
* Load a properties file from the classpath
*
- * @param propertiesFile the properties file to load.
+ * @param propertiesName the properties file to load.
* @return a properties instance loaded with the properties from
* the file. If no file can be found it returns an empty instance.
+ * @throws Exception
*/
protected Properties loadFromClassPath(final String propertiesName)
throws Exception