Save This Page
Home » cactus-1.8.0-src » org.apache.cactus.integration.ant.deployment.webapp » [javadoc | source]
org.apache.cactus.integration.ant.deployment.webapp
public class: WebXml [javadoc | source]
java.lang.Object
   org.apache.cactus.integration.ant.deployment.webapp.WebXml
Encapsulates the DOM representation of a web deployment descriptor web.xml to provide convenience methods for easy access and manipulation.
Constructor:
 public WebXml(Document theDocument) 
    Constructor.
    Parameters:
    theDocument - The DOM document representing the parsed deployment descriptor
Method from org.apache.cactus.integration.ant.deployment.webapp.WebXml Summary:
addContextParam,   addElement,   addFilter,   addFilter,   addFilterInitParam,   addFilterMapping,   addJspFile,   addSecurityConstraint,   addSecurityRole,   addServlet,   addServlet,   addServletInitParam,   addServletMapping,   addServletRunAsRoleName,   getContextParam,   getContextParamName,   getDocument,   getElements,   getFilter,   getFilterInitParam,   getFilterInitParamNames,   getFilterMappings,   getFilterNames,   getFilterNamesForClass,   getLoginConfig,   getLoginConfigAuthMethod,   getSecurityConstraint,   getSecurityRole,   getSecurityRoleNames,   getServlet,   getServletInitParam,   getServletInitParamNames,   getServletMappings,   getServletNames,   getServletNamesForClass,   getServletNamesForJspFile,   getServletRunAsRoleName,   getVersion,   hasContextParam,   hasFilter,   hasLoginConfig,   hasSecurityConstraint,   hasSecurityRole,   hasServlet,   replaceElement,   setLoginConfig
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cactus.integration.ant.deployment.webapp.WebXml Detail:
 public final  void addContextParam(Element theContextParam) 
    Adds a new context-param element to the descriptor.
 public final  void addElement(WebXmlTag theTag,
    Element theElement) 
    Adds an element of the specified tag to the descriptor.
 public final  void addFilter(Element theFilter) 
    Adds a new servlet filter to the descriptor.
 public final  void addFilter(String theFilterName,
    String theFilterClass) 
    Adds a new servlet filter to the descriptor.
 public final  void addFilterInitParam(String theFilterName,
    String theParamName,
    String theParamValue) 
    Adds an initialization parameter to the specified filter.
 public final  void addFilterMapping(String theFilterName,
    String theUrlPattern) 
    Adds a filter mapping to the descriptor.
 public final  void addJspFile(String theServletName,
    String theJspFile) 
    Adds a mapped JSP file to the descriptor.
 public final  void addSecurityConstraint(String theWebResourceName,
    String theUrlPattern,
    List theRoles) 
    Creates and adds a security-constraint to the descriptor.
 public final  void addSecurityRole(String theRoleName) 
    Adds a new security role to the descriptor.
 public final  void addServlet(Element theServlet) 
    Adds a new servlet to the descriptor.
 public final  void addServlet(String theServletName,
    String theServletClass) 
    Adds a new servlet to the descriptor.
 public final  void addServletInitParam(String theServletName,
    String theParamName,
    String theParamValue) 
    Adds an initialization parameter to the specified servlet.
 public final  void addServletMapping(String theServletName,
    String theUrlPattern) 
    Adds a servlet mapping to the descriptor.
 public final  void addServletRunAsRoleName(String theServletName,
    String theRoleName) 
    Adds a run-as declaration to the specified servlet.
 public final Element getContextParam(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.
 public final String getContextParamName(Element theContextParam) 
 public final Document getDocument() 
    Returns the DOM document representing the deployment descriptor. The document will contain any modifications made through this instance.
 public final Iterator getElements(WebXmlTag theTag) 
    Returns an iterator over the elements that match the specified tag.
 public final Element getFilter(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.
 public final String getFilterInitParam(String theFilterName,
    String theParamName) 
    Returns the value of an initialization parameter of the specified filter.
 public final Iterator getFilterInitParamNames(String theFilterName) 
    Returns the names of the initialization parameters of the specified servlet filter.
 public final Iterator getFilterMappings(String theFilterName) 
    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.
 public final Iterator getFilterNames() 
    Returns the names of all filters defined in the deployment descriptor. The names are returned as an iterator over an ordered list.
 public final Iterator getFilterNamesForClass(String theClassName) 
    Returns a list of names of filters that are mapped to the specified class.
 public final Element getLoginConfig() 
    Returns whether the descriptor has a login configuration.
 public final String getLoginConfigAuthMethod() 
    Returns the authorization method defined by the login configuration.
 public final Element getSecurityConstraint(String theUrlPattern) 
    Returns the element that contains the security constraint defined for the specified URL pattern.
 public final Element getSecurityRole(String theRoleName) 
    Returns the element that contains the specified security role, or null if the role is not defined in the descriptor.
 public final Iterator getSecurityRoleNames() 
    Returns a list of the security role names defined in the deployment descriptor
 public final Element getServlet(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.
 public final String getServletInitParam(String theServletName,
    String theParamName) 
    Returns the value of an initialization parameter of the specified servlet.
 public final Iterator getServletInitParamNames(String theServletName) 
    Returns the names of the initialization parameters of the specified servlet.
 public final Iterator getServletMappings(String theServletName) 
    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.
 public final Iterator getServletNames() 
    Returns the names of all servlets defined in the deployment descriptor. The names are returned as an iterator over an ordered list.
 public final Iterator getServletNamesForClass(String theClassName) 
    Returns a list of names of servlets that are mapped to the specified class.
 public final Iterator getServletNamesForJspFile(String theJspFile) 
    Returns a list of names of servlets that are mapped to the specified JSP file.
 public final String getServletRunAsRoleName(String theServletName) 
    Returns the role name that the servlet is running as.
 public final WebXmlVersion getVersion() 
    Returns the servlet API version.
 public final boolean hasContextParam(String theParamName) 
    Returns whether a context param by the specified name is defined in the deployment descriptor.
 public final boolean hasFilter(String theFilterName) 
    Returns whether a servlet filter by the specified name is defined in the deployment descriptor.
 public final boolean hasLoginConfig() 
    Returns whether the descriptor has a login configuration.
 public final boolean hasSecurityConstraint(String theUrlPattern) 
    Returns whether a security constraint has been mapped to the specified URL pattern.
 public final boolean hasSecurityRole(String theRoleName) 
    Returns whether a specific security role has been defined.
 public final boolean hasServlet(String theServletName) 
    Returns whether a servlet by the specified name is defined in the deployment descriptor.
 public final  void replaceElement(WebXmlTag theTag,
    Element theElement) 
    Replaces all elements of the specified tag with the provided element.
 public final  void setLoginConfig(String theAuthMethod,
    String theRealmName) 
    Sets the login configuration.