org.apache.struts2.config
Class StrutsXMLConfigurationProvider

java.lang.Object
  extended by com.opensymphony.xwork2.config.providers.XmlConfigurationProvider
      extended by org.apache.struts2.config.StrutsXMLConfigurationProvider
All Implemented Interfaces:
com.opensymphony.xwork2.config.ConfigurationProvider

public class StrutsXMLConfigurationProvider
extends com.opensymphony.xwork2.config.providers.XmlConfigurationProvider

Override Xwork class so we can use an arbitrary config file


Constructor Summary
StrutsXMLConfigurationProvider(boolean errorIfMissing)
          Constructs the configuration provider
StrutsXMLConfigurationProvider(java.lang.String filename, boolean errorIfMissing)
          Constructs the configuration provider
 
Method Summary
protected  java.net.URL findInFileSystem(java.lang.String fileName)
           
protected  java.util.Iterator<java.net.URL> getConfigurationUrls(java.lang.String fileName)
          Look for the configuration file on the classpath and in the file system
 
Methods inherited from class com.opensymphony.xwork2.config.providers.XmlConfigurationProvider
addAction, addPackage, addResultTypes, buildExceptionMappings, buildExternalRefs, buildInterceptorList, buildPackageContext, buildResults, destroy, equals, getDtdMappings, hashCode, init, loadDefaultActionRef, loadDefaultInterceptorRef, loadExtraConfiguration, loadGlobalResults, loadGobalExceptionMappings, loadInterceptors, loadInterceptorStack, loadInterceptorStacks, needsReload, setDtdMappings, verifyAction, verifyResultType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrutsXMLConfigurationProvider

public StrutsXMLConfigurationProvider(boolean errorIfMissing)
Constructs the configuration provider

Parameters:
errorIfMissing - If we should throw an exception if the file can't be found

StrutsXMLConfigurationProvider

public StrutsXMLConfigurationProvider(java.lang.String filename,
                                      boolean errorIfMissing)
Constructs the configuration provider

Parameters:
filename - The filename to look for
errorIfMissing - If we should throw an exception if the file can't be found
Method Detail

getConfigurationUrls

protected java.util.Iterator<java.net.URL> getConfigurationUrls(java.lang.String fileName)
                                                         throws java.io.IOException
Look for the configuration file on the classpath and in the file system

Overrides:
getConfigurationUrls in class com.opensymphony.xwork2.config.providers.XmlConfigurationProvider
Parameters:
fileName - The file name to retrieve
Throws:
java.io.IOException
See Also:
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider#getInputStream(java.lang.String)

findInFileSystem

protected java.net.URL findInFileSystem(java.lang.String fileName)
                                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.