Java Doc for WebXml.java in  » Testing » jakarta-cactus » org » apache » cactus » integration » ant » deployment » webapp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » jakarta cactus » org.apache.cactus.integration.ant.deployment.webapp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cactus.integration.ant.deployment.webapp.WebXml

WebXml
public class WebXml (Code)
Encapsulates the DOM representation of a web deployment descriptor web.xml to provide convenience methods for easy access and manipulation.
since:
   Cactus 1.5
version:
   $Id: WebXml.java 239137 2005-02-10 19:51:34Z vmassol $



Constructor Summary
public  WebXml(Document theDocument)
     Constructor.

Method Summary
final public  voidaddContextParam(Element theContextParam)
     Adds a new context-param element to the descriptor.
final public  voidaddElement(WebXmlTag theTag, Element theElement)
     Adds an element of the specified tag to the descriptor.
final public  voidaddFilter(String theFilterName, String theFilterClass)
     Adds a new servlet filter to the descriptor.
final public  voidaddFilter(Element theFilter)
     Adds a new servlet filter to the descriptor.
final public  voidaddFilterInitParam(String theFilterName, String theParamName, String theParamValue)
     Adds an initialization parameter to the specified filter.
final public  voidaddFilterMapping(String theFilterName, String theUrlPattern)
     Adds a filter mapping to the descriptor.
final public  voidaddJspFile(String theServletName, String theJspFile)
     Adds a mapped JSP file to the descriptor.
final public  voidaddSecurityConstraint(String theWebResourceName, String theUrlPattern, List theRoles)
     Creates and adds a security-constraint to the descriptor.
final public  voidaddSecurityRole(String theRoleName)
     Adds a new security role to the descriptor.
final public  voidaddServlet(String theServletName, String theServletClass)
     Adds a new servlet to the descriptor.
final public  voidaddServlet(Element theServlet)
     Adds a new servlet to the descriptor.
final public  voidaddServletInitParam(String theServletName, String theParamName, String theParamValue)
     Adds an initialization parameter to the specified servlet.
final public  voidaddServletMapping(String theServletName, String theUrlPattern)
     Adds a servlet mapping to the descriptor.
final public  voidaddServletRunAsRoleName(String theServletName, String theRoleName)
     Adds a run-as declaration to the specified servlet.
final public  ElementgetContextParam(String theParamName)
     Returns the element that contains the definition of a specific context param, or null if a context param of the specified name is not defined in the descriptor.
final public  StringgetContextParamName(Element theContextParam)
    
final public  DocumentgetDocument()
     Returns the DOM document representing the deployment descriptor.
final public  IteratorgetElements(WebXmlTag theTag)
     Returns an iterator over the elements that match the specified tag.
final public  ElementgetFilter(String theFilterName)
     Returns the element that contains the definition of a specific servlet filter, or null if a filter of the specified name is not defined in the descriptor.
final public  StringgetFilterInitParam(String theFilterName, String theParamName)
     Returns the value of an initialization parameter of the specified filter.
final public  IteratorgetFilterInitParamNames(String theFilterName)
     Returns the names of the initialization parameters of the specified servlet filter.
final public  IteratorgetFilterMappings(String theFilterName)
     Returns the URL-patterns that the specified filter is mapped to in an ordered list.
final public  IteratorgetFilterNames()
     Returns the names of all filters defined in the deployment descriptor.
final public  IteratorgetFilterNamesForClass(String theClassName)
     Returns a list of names of filters that are mapped to the specified class.
final public  ElementgetLoginConfig()
     Returns whether the descriptor has a login configuration.
final public  StringgetLoginConfigAuthMethod()
     Returns the authorization method defined by the login configuration.
final public  ElementgetSecurityConstraint(String theUrlPattern)
     Returns the element that contains the security constraint defined for the specified URL pattern.
final public  ElementgetSecurityRole(String theRoleName)
     Returns the element that contains the specified security role, or null if the role is not defined in the descriptor.
final public  IteratorgetSecurityRoleNames()
    
final public  ElementgetServlet(String theServletName)
     Returns the element that contains the definition of a specific servlet, or null if a servlet of the specified name is not defined in the descriptor.
final public  StringgetServletInitParam(String theServletName, String theParamName)
     Returns the value of an initialization parameter of the specified servlet.
final public  IteratorgetServletInitParamNames(String theServletName)
     Returns the names of the initialization parameters of the specified servlet.
final public  IteratorgetServletMappings(String theServletName)
     Returns the URL-patterns that the specified servlet is mapped to in an ordered list.
final public  IteratorgetServletNames()
     Returns the names of all servlets defined in the deployment descriptor.
final public  IteratorgetServletNamesForClass(String theClassName)
     Returns a list of names of servlets that are mapped to the specified class.
final public  IteratorgetServletNamesForJspFile(String theJspFile)
     Returns a list of names of servlets that are mapped to the specified JSP file.
final public  StringgetServletRunAsRoleName(String theServletName)
     Returns the role name that the servlet is running as.
final public  WebXmlVersiongetVersion()
     Returns the servlet API version.
final public  booleanhasContextParam(String theParamName)
     Returns whether a context param by the specified name is defined in the deployment descriptor.
final public  booleanhasFilter(String theFilterName)
     Returns whether a servlet filter by the specified name is defined in the deployment descriptor.
final public  booleanhasLoginConfig()
     Returns whether the descriptor has a login configuration.
final public  booleanhasSecurityConstraint(String theUrlPattern)
     Returns whether a security constraint has been mapped to the specified URL pattern.
final public  booleanhasSecurityRole(String theRoleName)
     Returns whether a specific security role has been defined.
final public  booleanhasServlet(String theServletName)
     Returns whether a servlet by the specified name is defined in the deployment descriptor.
final public  voidreplaceElement(WebXmlTag theTag, Element theElement)
     Replaces all elements of the specified tag with the provided element.
final public  voidsetLoginConfig(String theAuthMethod, String theRealmName)
     Sets the login configuration.


Constructor Detail
WebXml
public WebXml(Document theDocument)(Code)
Constructor.
Parameters:
  theDocument - The DOM document representing the parsed deploymentdescriptor




Method Detail
addContextParam
final public void addContextParam(Element theContextParam)(Code)
Adds a new context-param element to the descriptor.
Parameters:
  theContextParam - The element representing the context-param definition



addElement
final public void addElement(WebXmlTag theTag, Element theElement)(Code)
Adds an element of the specified tag to the descriptor.
Parameters:
  theTag - The descriptor tag
Parameters:
  theElement - The element to add



addFilter
final public void addFilter(String theFilterName, String theFilterClass)(Code)
Adds a new servlet filter to the descriptor.
Parameters:
  theFilterName - The name of the filter to add
Parameters:
  theFilterClass - The name of the class implementing the filter



addFilter
final public void addFilter(Element theFilter)(Code)
Adds a new servlet filter to the descriptor.
Parameters:
  theFilter - The element representing the filter definition



addFilterInitParam
final public void addFilterInitParam(String theFilterName, String theParamName, String theParamValue)(Code)
Adds an initialization parameter to the specified filter.
Parameters:
  theFilterName - The name of the filter
Parameters:
  theParamName - The name of the parameter
Parameters:
  theParamValue - The parameter value



addFilterMapping
final public void addFilterMapping(String theFilterName, String theUrlPattern)(Code)
Adds a filter mapping to the descriptor.
Parameters:
  theFilterName - The name of the filter
Parameters:
  theUrlPattern - The URL pattern the filter should be mapped to



addJspFile
final public void addJspFile(String theServletName, String theJspFile)(Code)
Adds a mapped JSP file to the descriptor.
Parameters:
  theServletName - The name of the servlet to add
Parameters:
  theJspFile - The path to the JSP file relative to the root of theweb application



addSecurityConstraint
final public void addSecurityConstraint(String theWebResourceName, String theUrlPattern, List theRoles)(Code)
Creates and adds a security-constraint to the descriptor.
Parameters:
  theWebResourceName - The name of the web resource collection toprotect
Parameters:
  theUrlPattern - The URL pattern to apply the constraint to
Parameters:
  theRoles - The list of authorized roles



addSecurityRole
final public void addSecurityRole(String theRoleName)(Code)
Adds a new security role to the descriptor.
Parameters:
  theRoleName - The name of the role to add



addServlet
final public void addServlet(String theServletName, String theServletClass)(Code)
Adds a new servlet to the descriptor.
Parameters:
  theServletName - The name of the servlet to add
Parameters:
  theServletClass - The name of the class implementing the servlet



addServlet
final public void addServlet(Element theServlet)(Code)
Adds a new servlet to the descriptor.
Parameters:
  theServlet - The element representing the servlet definition



addServletInitParam
final public void addServletInitParam(String theServletName, String theParamName, String theParamValue)(Code)
Adds an initialization parameter to the specified servlet.
Parameters:
  theServletName - The name of the filter
Parameters:
  theParamName - The name of the parameter
Parameters:
  theParamValue - The parameter value



addServletMapping
final public void addServletMapping(String theServletName, String theUrlPattern)(Code)
Adds a servlet mapping to the descriptor.
Parameters:
  theServletName - The name of the servlet
Parameters:
  theUrlPattern - The URL pattern the servlet should be mapped to



addServletRunAsRoleName
final public void addServletRunAsRoleName(String theServletName, String theRoleName)(Code)
Adds a run-as declaration to the specified servlet.
Parameters:
  theServletName - the name of the servlet to manipulate
Parameters:
  theRoleName - the role name that the servlet should be running as



getContextParam
final public Element getContextParam(String theParamName)(Code)
Returns the element that contains the definition of a specific context param, or null if a context param of the specified name is not defined in the descriptor.
Parameters:
  theParamName - The context param name The DOM element representing the context param definition



getContextParamName
final public String getContextParamName(Element theContextParam)(Code)

Parameters:
  theContextParam - the context param element from which to extract the name the name of the passed context param element



getDocument
final public Document getDocument()(Code)
Returns the DOM document representing the deployment descriptor. The document will contain any modifications made through this instance. The document representing the deploy descriptor



getElements
final public Iterator getElements(WebXmlTag theTag)(Code)
Returns an iterator over the elements that match the specified tag.
Parameters:
  theTag - The descriptor tag of which the elements should bereturned An iterator over the elements matching the tag, in the order they occur in the descriptor



getFilter
final public Element getFilter(String theFilterName)(Code)
Returns the element that contains the definition of a specific servlet filter, or null if a filter of the specified name is not defined in the descriptor.
Parameters:
  theFilterName - The name of the servlet filter The DOM element representing the filter definition



getFilterInitParam
final public String getFilterInitParam(String theFilterName, String theParamName)(Code)
Returns the value of an initialization parameter of the specified filter.
Parameters:
  theFilterName - The name of the servlet filter
Parameters:
  theParamName - The name of the initialization parameter The parameter value



getFilterInitParamNames
final public Iterator getFilterInitParamNames(String theFilterName)(Code)
Returns the names of the initialization parameters of the specified servlet filter.
Parameters:
  theFilterName - The name of the servlet filter of which theparameter names should be retrieved An iterator over the ordered list of parameter names



getFilterMappings
final public Iterator getFilterMappings(String theFilterName)(Code)
Returns the URL-patterns that the specified filter is mapped to in an ordered list. If there are no mappings for the specified filter, an iterator over an empty list is returned.
Parameters:
  theFilterName - The name of the servlet filter of which the mappings should be retrieved An iterator over the ordered list of URL-patterns



getFilterNames
final public Iterator getFilterNames()(Code)
Returns the names of all filters defined in the deployment descriptor. The names are returned as an iterator over an ordered list. The filter names



getFilterNamesForClass
final public Iterator getFilterNamesForClass(String theClassName)(Code)
Returns a list of names of filters that are mapped to the specified class.
Parameters:
  theClassName - The fully qualified name of the filter class An iterator over the names of the filters mapped to the class



getLoginConfig
final public Element getLoginConfig()(Code)
Returns whether the descriptor has a login configuration. true if a login config is defined,false otherwise



getLoginConfigAuthMethod
final public String getLoginConfigAuthMethod()(Code)
Returns the authorization method defined by the login configuration. The authorization method



getSecurityConstraint
final public Element getSecurityConstraint(String theUrlPattern)(Code)
Returns the element that contains the security constraint defined for the specified URL pattern.
Parameters:
  theUrlPattern - The URL pattern The DOM element representing the security constraint



getSecurityRole
final public Element getSecurityRole(String theRoleName)(Code)
Returns the element that contains the specified security role, or null if the role is not defined in the descriptor.
Parameters:
  theRoleName - The name of the role The DOM element representing the security role



getSecurityRoleNames
final public Iterator getSecurityRoleNames()(Code)
Returns a list of the security role names defined in the deployment descriptor An iterator over the list of security role names, or an emptyiterator if no security roles are defined in the descriptor



getServlet
final public Element getServlet(String theServletName)(Code)
Returns the element that contains the definition of a specific servlet, or null if a servlet of the specified name is not defined in the descriptor.
Parameters:
  theServletName - The name of the servlet The DOM element representing the servlet definition



getServletInitParam
final public String getServletInitParam(String theServletName, String theParamName)(Code)
Returns the value of an initialization parameter of the specified servlet.
Parameters:
  theServletName - The name of the servlet
Parameters:
  theParamName - The name of the initialization parameter The parameter value



getServletInitParamNames
final public Iterator getServletInitParamNames(String theServletName)(Code)
Returns the names of the initialization parameters of the specified servlet.
Parameters:
  theServletName - The name of the servlet of which the parameternames should be retrieved An iterator over the ordered list of parameter names



getServletMappings
final public Iterator getServletMappings(String theServletName)(Code)
Returns the URL-patterns that the specified servlet is mapped to in an ordered list. If there are no mappings for the specified servlet, an iterator over an empty list is returned.
Parameters:
  theServletName - The name of the servlet of which the mappingsshould be retrieved An iterator over the ordered list of URL-patterns



getServletNames
final public Iterator getServletNames()(Code)
Returns the names of all servlets defined in the deployment descriptor. The names are returned as an iterator over an ordered list. The servlet names



getServletNamesForClass
final public Iterator getServletNamesForClass(String theClassName)(Code)
Returns a list of names of servlets that are mapped to the specified class.
Parameters:
  theClassName - The fully qualified name of the servlet class An iterator over the names of the servlets mapped to the class



getServletNamesForJspFile
final public Iterator getServletNamesForJspFile(String theJspFile)(Code)
Returns a list of names of servlets that are mapped to the specified JSP file.
Parameters:
  theJspFile - The path to the JSP file, relative to the root of theweb-application An iterator over the names of the servlets mapped to the JSP file



getServletRunAsRoleName
final public String getServletRunAsRoleName(String theServletName)(Code)
Returns the role name that the servlet is running as.
Parameters:
  theServletName - The name of the servlet of which the role name should be retrieved the roleName or null if non is specified



getVersion
final public WebXmlVersion getVersion()(Code)
Returns the servlet API version. The version



hasContextParam
final public boolean hasContextParam(String theParamName)(Code)
Returns whether a context param by the specified name is defined in the deployment descriptor.
Parameters:
  theParamName - The name of the context param true if the context param is defined,false otherwise



hasFilter
final public boolean hasFilter(String theFilterName)(Code)
Returns whether a servlet filter by the specified name is defined in the deployment descriptor.
Parameters:
  theFilterName - The name of the filter true if the filter is defined, falseotherwise



hasLoginConfig
final public boolean hasLoginConfig()(Code)
Returns whether the descriptor has a login configuration. true if a login config is defined,false otherwise



hasSecurityConstraint
final public boolean hasSecurityConstraint(String theUrlPattern)(Code)
Returns whether a security constraint has been mapped to the specified URL pattern.
Parameters:
  theUrlPattern - The URL patterm true if a security constraint is defined,false otherwise



hasSecurityRole
final public boolean hasSecurityRole(String theRoleName)(Code)
Returns whether a specific security role has been defined.
Parameters:
  theRoleName - The name of the role true if the security role is defined,false otherwise



hasServlet
final public boolean hasServlet(String theServletName)(Code)
Returns whether a servlet by the specified name is defined in the deployment descriptor.
Parameters:
  theServletName - The name of the servlet true if the servlet is defined, falseotherwise



replaceElement
final public void replaceElement(WebXmlTag theTag, Element theElement)(Code)
Replaces all elements of the specified tag with the provided element.
Parameters:
  theTag - The descriptor tag
Parameters:
  theElement - The element to replace the current elements with



setLoginConfig
final public void setLoginConfig(String theAuthMethod, String theRealmName)(Code)
Sets the login configuration.
Parameters:
  theAuthMethod - The authentication method (for example, BASIC)
Parameters:
  theRealmName - The name of the realm



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.