You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by cm...@apache.org on 2003/04/09 22:09:17 UTC
cvs commit: jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant WebXmlMergeTask.java
cmlenz 2003/04/09 13:09:17
Modified: integration/ant/src/java/org/apache/cactus/integration/ant/webxml
WebXmlMerger.java WebXml.java
integration/ant/src/java/org/apache/cactus/integration/ant
WebXmlMergeTask.java
Log:
Design and document for inheritance or else prohibit it?
Prohibit it ;-)
Revision Changes Path
1.4 +6 -6 jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/webxml/WebXmlMerger.java
Index: WebXmlMerger.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/webxml/WebXmlMerger.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WebXmlMerger.java 16 Mar 2003 12:09:11 -0000 1.3
+++ WebXmlMerger.java 9 Apr 2003 20:09:17 -0000 1.4
@@ -93,7 +93,7 @@
* that are to be merged into the original descriptor
* @return The number of filters merged into the original descriptor
*/
- public int mergeFilters(WebXml theWebXml)
+ public final int mergeFilters(WebXml theWebXml)
{
Iterator filterNames = theWebXml.getFilterNames();
int count = 0;
@@ -138,7 +138,7 @@
* that are to be merged into the original descriptor
* @return The number of servlets merged into the original descriptor
*/
- public int mergeServlets(WebXml theWebXml)
+ public final int mergeServlets(WebXml theWebXml)
{
Iterator servletNames = theWebXml.getServletNames();
int count = 0;
@@ -184,7 +184,7 @@
* @return The number of security constraints merged into the original
* descriptor
*/
- public int mergeSecurityConstraints(WebXml theWebXml)
+ public final int mergeSecurityConstraints(WebXml theWebXml)
{
Iterator securityConstraints =
theWebXml.getElements(WebXmlTag.SECURITY_CONSTRAINT);
@@ -206,7 +206,7 @@
* is to be merged into the original descriptor
* @return Whether the login config was merged
*/
- public boolean mergeLoginConfig(WebXml theWebXml)
+ public final boolean mergeLoginConfig(WebXml theWebXml)
{
Iterator loginConfigs = theWebXml.getElements(WebXmlTag.LOGIN_CONFIG);
if (loginConfigs.hasNext())
@@ -226,7 +226,7 @@
* @return The number of security constraints merged into the original
* descriptor
*/
- public int mergeSecurityRoles(WebXml theWebXml)
+ public final int mergeSecurityRoles(WebXml theWebXml)
{
Iterator securityRoles =
theWebXml.getElements(WebXmlTag.SECURITY_ROLE);
1.15 +29 -26 jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/webxml/WebXml.java
Index: WebXml.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/webxml/WebXml.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- WebXml.java 19 Mar 2003 12:26:22 -0000 1.14
+++ WebXml.java 9 Apr 2003 20:09:17 -0000 1.15
@@ -168,7 +168,7 @@
*
* @return The document representing the deploy descriptor
*/
- public Document getDocument()
+ public final Document getDocument()
{
return this.document;
}
@@ -179,7 +179,7 @@
*
* @return The servlet API version.
*/
- public String getVersion()
+ public final String getVersion()
{
DocumentType docType = this.document.getDoctype();
if (docType != null)
@@ -202,7 +202,7 @@
*
* @param theFilter The element representing the filter definition
*/
- public void addFilter(Element theFilter)
+ public final void addFilter(Element theFilter)
{
checkElement(theFilter, WebXmlTag.FILTER);
String filterName = getNestedText(theFilter, WebXmlTag.FILTER_NAME);
@@ -225,8 +225,8 @@
* @param theParamName The name of the parameter
* @param theParamValue The parameter value
*/
- public void addFilterInitParam(String theFilterName, String theParamName,
- String theParamValue)
+ public final void addFilterInitParam(String theFilterName,
+ String theParamName, String theParamValue)
{
Element filterElement = getFilter(theFilterName);
if (filterElement == null)
@@ -243,7 +243,8 @@
* @param theFilterName The name of the filter
* @param theUrlPattern The URL pattern the filter should be mapped to
*/
- public void addFilterMapping(String theFilterName, String theUrlPattern)
+ public final void addFilterMapping(String theFilterName,
+ String theUrlPattern)
{
if (!hasFilter(theFilterName))
{
@@ -267,7 +268,7 @@
* @param theFilterName The name of the servlet filter
* @return The DOM element representing the filter definition
*/
- public Element getFilter(String theFilterName)
+ public final Element getFilter(String theFilterName)
{
if (theFilterName == null)
{
@@ -293,7 +294,8 @@
* @param theParamName The name of the initialization parameter
* @return The parameter value
*/
- public String getFilterInitParam(String theFilterName, String theParamName)
+ public final String getFilterInitParam(String theFilterName,
+ String theParamName)
{
return getInitParam(getFilter(theFilterName), theParamName);
}
@@ -306,7 +308,7 @@
* parameter names should be retrieved
* @return An iterator over the ordered list of parameter names
*/
- public Iterator getFilterInitParamNames(String theFilterName)
+ public final Iterator getFilterInitParamNames(String theFilterName)
{
return getInitParamNames(getFilter(theFilterName));
}
@@ -320,7 +322,7 @@
* mappings should be retrieved
* @return An iterator over the ordered list of URL-patterns
*/
- public Iterator getFilterMappings(String theFilterName)
+ public final Iterator getFilterMappings(String theFilterName)
{
if (theFilterName == null)
{
@@ -352,7 +354,7 @@
*
* @return The filter names
*/
- public Iterator getFilterNames()
+ public final Iterator getFilterNames()
{
List filterNames = new ArrayList();
Iterator filterElements = getElements(WebXmlTag.FILTER);
@@ -377,7 +379,7 @@
* @return <code>true</code> if the filter is defined, <code>false</code>
* otherwise
*/
- public boolean hasFilter(String theFilterName)
+ public final boolean hasFilter(String theFilterName)
{
return (getFilter(theFilterName) != null);
}
@@ -387,7 +389,7 @@
*
* @param theServlet The element representing the servlet definition
*/
- public void addServlet(Element theServlet)
+ public final void addServlet(Element theServlet)
{
checkElement(theServlet, WebXmlTag.SERVLET);
String servletName = getNestedText(theServlet, WebXmlTag.SERVLET_NAME);
@@ -410,8 +412,8 @@
* @param theParamName The name of the parameter
* @param theParamValue The parameter value
*/
- public void addServletInitParam(String theServletName, String theParamName,
- String theParamValue)
+ public final void addServletInitParam(String theServletName,
+ String theParamName, String theParamValue)
{
Element servletElement = getServlet(theServletName);
if (servletElement == null)
@@ -428,7 +430,8 @@
* @param theServletName The name of the servlet
* @param theUrlPattern The URL pattern the servlet should be mapped to
*/
- public void addServletMapping(String theServletName, String theUrlPattern)
+ public final void addServletMapping(String theServletName,
+ String theUrlPattern)
{
if (!hasServlet(theServletName))
{
@@ -452,7 +455,7 @@
* @param theServletName The name of the servlet
* @return The DOM element representing the servlet definition
*/
- public Element getServlet(String theServletName)
+ public final Element getServlet(String theServletName)
{
if (theServletName == null)
{
@@ -479,7 +482,7 @@
* @param theParamName The name of the initialization parameter
* @return The parameter value
*/
- public String getServletInitParam(String theServletName,
+ public final String getServletInitParam(String theServletName,
String theParamName)
{
return getInitParam(getServlet(theServletName), theParamName);
@@ -493,7 +496,7 @@
* names should be retrieved
* @return An iterator over the ordered list of parameter names
*/
- public Iterator getServletInitParamNames(String theServletName)
+ public final Iterator getServletInitParamNames(String theServletName)
{
return getInitParamNames(getServlet(theServletName));
}
@@ -507,7 +510,7 @@
* should be retrieved
* @return An iterator over the ordered list of URL-patterns
*/
- public Iterator getServletMappings(String theServletName)
+ public final Iterator getServletMappings(String theServletName)
{
if (theServletName == null)
{
@@ -540,7 +543,7 @@
*
* @return The servlet names
*/
- public Iterator getServletNames()
+ public final Iterator getServletNames()
{
List servletNames = new ArrayList();
Iterator servletElements = getElements(WebXmlTag.SERVLET);
@@ -565,7 +568,7 @@
* @return <code>true</code> if the servlet is defined, <code>false</code>
* otherwise
*/
- public boolean hasServlet(String theServletName)
+ public final boolean hasServlet(String theServletName)
{
return (getServlet(theServletName) != null);
}
@@ -578,7 +581,7 @@
* @return An iterator over the elements matching the tag, in the order
* they occur in the descriptor
*/
- public Iterator getElements(WebXmlTag theTag)
+ public final Iterator getElements(WebXmlTag theTag)
{
List elements = new ArrayList();
NodeList nodeList =
@@ -596,7 +599,7 @@
* @param theTag The descriptor tag
* @param theElement The element to add
*/
- public void addElement(WebXmlTag theTag, Element theElement)
+ public final void addElement(WebXmlTag theTag, Element theElement)
{
if (!theTag.getTagName().equals(theElement.getNodeName()))
{
@@ -619,7 +622,7 @@
* @param theTag The descriptor tag
* @param theElement The element to replace the current elements with
*/
- public void replaceElement(WebXmlTag theTag, Element theElement)
+ public final void replaceElement(WebXmlTag theTag, Element theElement)
{
Iterator elements = getElements(theTag);
while (elements.hasNext())
1.10 +8 -8 jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/WebXmlMergeTask.java
Index: WebXmlMergeTask.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/ant/src/java/org/apache/cactus/integration/ant/WebXmlMergeTask.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- WebXmlMergeTask.java 19 Mar 2003 12:26:22 -0000 1.9
+++ WebXmlMergeTask.java 9 Apr 2003 20:09:17 -0000 1.10
@@ -201,7 +201,7 @@
*
* @param theXmlCatalog the XMLCatalog instance to use to look up DTDs
*/
- public void addConfiguredXMLCatalog(XMLCatalog theXmlCatalog)
+ public final void addConfiguredXMLCatalog(XMLCatalog theXmlCatalog)
{
this.xmlCatalog.addConfiguredXMLCatalog(theXmlCatalog);
}
@@ -212,7 +212,7 @@
*
* @param theSrcFile the original <code>web.xml</code>
*/
- public void setSrcFile(File theSrcFile)
+ public final void setSrcFile(File theSrcFile)
{
this.srcFile = theSrcFile;
}
@@ -222,7 +222,7 @@
*
* @param theMergeFile the <code>web.xml</code> to merge
*/
- public void setMergeFile(File theMergeFile)
+ public final void setMergeFile(File theMergeFile)
{
this.mergeFile = theMergeFile;
}
@@ -232,7 +232,7 @@
*
* @param theDestFile the resulting <code>web.xml</code>
*/
- public void setDestFile(File theDestFile)
+ public final void setDestFile(File theDestFile)
{
this.destFile = theDestFile;
}
@@ -243,7 +243,7 @@
*
* @param isForce Whether the merge should be forced
*/
- public void setForce(boolean isForce)
+ public final void setForce(boolean isForce)
{
this.force = isForce;
}
@@ -253,7 +253,7 @@
*
* @param theEncoding The encoding to set
*/
- public void setEncoding(String theEncoding)
+ public final void setEncoding(String theEncoding)
{
this.encoding = theEncoding;
}
@@ -264,7 +264,7 @@
*
* @param isIndent Whether the result should be indented
*/
- public void setIndent(boolean isIndent)
+ public final void setIndent(boolean isIndent)
{
this.indent = isIndent;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org