info.magnolia.cms.util
Class WebXmlUtil

java.lang.Object
  extended by info.magnolia.cms.util.WebXmlUtil

public class WebXmlUtil
extends java.lang.Object

Contains utility methods to register or check for the existence of elements in web.xml.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
WebXmlUtil()
           
WebXmlUtil(java.io.InputStream inputStream)
          Test-friendly constructor.
 
Method Summary
 boolean areFilterDispatchersConfiguredProperly(java.lang.String filterClass, java.util.List mandatoryDispatchers, java.util.List optionalDispatchers)
          Deprecated. since 3.6.4, use checkFilterDispatchersConfiguration()
 int checkFilterDispatchersConfiguration(java.lang.String filterClass, java.util.List mandatoryDispatchers, java.util.List optionalDispatchers)
          Returns: +1 if all mandatory dispatchers are present and no additional unsupported dispatcher is present, or this filter class isn't registered.
 java.util.Collection getServletMappings(java.lang.String servletName)
           
 boolean isFilterRegistered(java.lang.String filterClass)
           
 boolean isListenerRegistered(java.lang.String deprecatedListenerClass)
           
 boolean isServletMappingRegistered(java.lang.String servletName)
           
 boolean isServletMappingRegistered(java.lang.String servletName, java.lang.String urlPattern)
           
 boolean isServletOrMappingRegistered(java.lang.String servletName)
           
 boolean isServletRegistered(java.lang.String servletName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebXmlUtil

public WebXmlUtil()

WebXmlUtil

public WebXmlUtil(java.io.InputStream inputStream)
Test-friendly constructor.

Method Detail

isServletOrMappingRegistered

public boolean isServletOrMappingRegistered(java.lang.String servletName)

isServletRegistered

public boolean isServletRegistered(java.lang.String servletName)

isServletMappingRegistered

public boolean isServletMappingRegistered(java.lang.String servletName)

isServletMappingRegistered

public boolean isServletMappingRegistered(java.lang.String servletName,
                                          java.lang.String urlPattern)

getServletMappings

public java.util.Collection getServletMappings(java.lang.String servletName)

isFilterRegistered

public boolean isFilterRegistered(java.lang.String filterClass)

areFilterDispatchersConfiguredProperly

public boolean areFilterDispatchersConfiguredProperly(java.lang.String filterClass,
                                                      java.util.List mandatoryDispatchers,
                                                      java.util.List optionalDispatchers)
Deprecated. since 3.6.4, use checkFilterDispatchersConfiguration()


checkFilterDispatchersConfiguration

public int checkFilterDispatchersConfiguration(java.lang.String filterClass,
                                               java.util.List mandatoryDispatchers,
                                               java.util.List optionalDispatchers)
Returns: +1 if all mandatory dispatchers are present and no additional unsupported dispatcher is present, or this filter class isn't registered. 0 if all mandatory dispatchers are present but additional unsupported dispatchers are present. -1 if not all mandatory dispatchers are present.


isListenerRegistered

public boolean isListenerRegistered(java.lang.String deprecatedListenerClass)


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.