Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.config
Class StrutsXmlConfigurationProvider

    java.lang.Object
      com.opensymphony.xwork2.config.providers.XmlConfigurationProvider
          org.apache.struts2.config.StrutsXmlConfigurationProvider

All Implemented Interfaces:
  ConfigurationProvider, ContainerProvider, PackageProvider

    public class StrutsXmlConfigurationProvider

extends XmlConfigurationProvider

Override Xwork class so we can use an arbitrary config file

Constructor Summary
`StrutsXmlConfigurationProvider(boolean errorIfMissing)` Constructs the configuration provider
`StrutsXmlConfigurationProvider(String filename, boolean errorIfMissing, javax.servlet.ServletContext ctx)` Constructs the configuration provider

Method Summary
`protected URL` | `findInFileSystem(String fileName)`
`protected Iterator<URL>` | `getConfigurationUrls(String fileName)` Look for the configuration file on the classpath and in the file system
`void` | `loadPackages()`
`boolean` | `needsReload()` Overrides needs reload to ensure it is only checked once per request
`void` | `register(ContainerBuilder containerBuilder, LocatableProperties props)`
`String` | `toString()`

Methods inherited from class com.opensymphony.xwork2.config.providers.XmlConfigurationProvider
`addAction, addPackage, addResultTypes, buildAllowedMethods, buildExceptionMappings, buildInterceptorList, buildPackageContext, buildResults, destroy, equals, getDtdMappings, guessResultType, hashCode, init, loadDefaultActionRef, loadDefaultClassRef, loadDefaultInterceptorRef, loadExtraConfiguration, loadGlobalResults, loadGobalExceptionMappings, loadInterceptors, loadInterceptorStack, loadInterceptorStacks, setDtdMappings, setFileManagerFactory, setObjectFactory, setThrowExceptionOnDuplicateBeans, verifyAction, verifyResultType`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, 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(String filename,
                                          boolean errorIfMissing,
                                          javax.servlet.ServletContext ctx)

  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
    `ctx` - Our ServletContext

Method Detail

### register

    public void register(ContainerBuilder containerBuilder,
                         LocatableProperties props)
                  throws ConfigurationException

  Specified by:
    `register` in interface `ContainerProvider`
  Overrides:
    `register` in class `XmlConfigurationProvider`
  Throws:
    `ConfigurationException`

### loadPackages

    public void loadPackages()

  Specified by:
    `loadPackages` in interface `PackageProvider`
  Overrides:
    `loadPackages` in class `XmlConfigurationProvider`

### getConfigurationUrls

    protected Iterator<URL> getConfigurationUrls(String fileName)
                                          throws IOException

  Look for the configuration file on the classpath and in the file system

  Overrides:
    `getConfigurationUrls` in class `XmlConfigurationProvider`
  Parameters:
    `fileName` - The file name to retrieve
  Throws:
    `IOException`
  See Also:
    `XmlConfigurationProvider.getConfigurationUrls(java.lang.String)`

### findInFileSystem

    protected URL findInFileSystem(String fileName)
                            throws IOException

  Throws:
    `IOException`

### needsReload

    public boolean needsReload()

  Overrides needs reload to ensure it is only checked once per request

  Specified by:
    `needsReload` in interface `ContainerProvider`
  Specified by:
    `needsReload` in interface `PackageProvider`
  Overrides:
    `needsReload` in class `XmlConfigurationProvider`

### toString

    public String toString()

  Overrides:
    `toString` in class `XmlConfigurationProvider`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2017 Apache Software Foundation. All rights reserved.