info.magnolia.cms.util
Class WebXmlUtil

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

public class WebXmlUtil
extends 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(InputStream inputStream)
          Test-friendly constructor.
 
Method Summary
 boolean areFilterDispatchersConfiguredProperly(String filterClass, List mandatoryDispatchers, List optionalDispatchers)
          Deprecated. since 3.6.4, use checkFilterDispatchersConfiguration()
 int checkFilterDispatchersConfiguration(String filterClass, List mandatoryDispatchers, List optionalDispatchers)
          Returns: +1 if all mandatory dispatchers are present and no additional unsupported dispatcher is present, or this filter class isn't registered.
 Collection getServletMappings(String servletName)
           
 boolean isFilterRegistered(String filterClass)
           
 boolean isListenerRegistered(String deprecatedListenerClass)
           
 boolean isServletMappingRegistered(String servletName)
           
 boolean isServletMappingRegistered(String servletName, String urlPattern)
           
 boolean isServletOrMappingRegistered(String servletName)
           
 boolean isServletRegistered(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(InputStream inputStream)
Test-friendly constructor.

Method Detail

isServletOrMappingRegistered

public boolean isServletOrMappingRegistered(String servletName)

isServletRegistered

public boolean isServletRegistered(String servletName)

isServletMappingRegistered

public boolean isServletMappingRegistered(String servletName)

isServletMappingRegistered

public boolean isServletMappingRegistered(String servletName,
                                          String urlPattern)

getServletMappings

public Collection getServletMappings(String servletName)

isFilterRegistered

public boolean isFilterRegistered(String filterClass)

areFilterDispatchersConfiguredProperly

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


checkFilterDispatchersConfiguration

public int checkFilterDispatchersConfiguration(String filterClass,
                                               List mandatoryDispatchers,
                                               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(String deprecatedListenerClass)


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