Class XmlConfigurationProvider
java.lang.Object
org.apache.struts2.config.providers.XmlDocConfigurationProvider
org.apache.struts2.config.providers.XmlConfigurationProvider
- All Implemented Interfaces:
- ConfigurationProvider,- ContainerProvider,- PackageProvider
- Direct Known Subclasses:
- StrutsXmlConfigurationProvider
Looks in the classpath for an XML file, "struts.xml" by default,
 and uses it for the XWork configuration.
- Version:
- $Revision$
- Author:
- tmjee, Rainer Hermanns, Neo
- 
Field SummaryFieldsFields inherited from class org.apache.struts2.config.providers.XmlDocConfigurationProviderallowlistClasses, configuration, declaredPackages, documents, dtdMappings, objectFactory, providerAllowlist, throwExceptionOnDuplicateBeans, valueSubstitutor
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetConfigurationUrls(String fileName) getFinalDocs(List<Document> docs) inthashCode()voidinit(Configuration configuration) Initializes with the configurationloadConfigurationFiles(String fileName, Element includeElement) voidLoads the packages for the configuration.booleanTells whether the ConfigurationProvider should reload its configuration.voidregister(ContainerBuilder containerBuilder, LocatableProperties props) Registers beans and properties for the ContainervoidsetFileManagerFactory(FileManagerFactory fileManagerFactory) toString()Methods inherited from class org.apache.struts2.config.providers.XmlDocConfigurationProvideraddAction, addAllowedMethodsToSet, addPackage, addResultTypes, allowAndLoadClass, buildActionConfig, buildAllowedMethods, buildExceptionMappings, buildInterceptorConfig, buildInterceptorList, buildPackageContext, buildResultConfig, buildResultParams, buildResults, buildResultTypeConfig, destroy, getDtdMappings, guessResultType, iterateChildren, iterateChildrenByTagName, iterateElementChildren, iterateElementChildren, loadClass, loadDefaultActionRef, loadDefaultClassRef, loadDefaultInterceptorRef, loadExtraConfiguration, loadGlobalAllowedMethods, loadGlobalExceptionMappings, loadGlobalResults, loadInterceptors, loadInterceptorStack, loadInterceptorStacks, lookupInterceptorReference, registerBean, registerBeanSelection, registerConstant, registerUnknownHandlerStack, setDtdMappings, setObjectFactory, setProviderAllowlist, setThrowExceptionOnDuplicateBeans, setValueSubstitutor, verifyAction, verifyInterceptor, verifyResultType
- 
Field Details- 
fileManager
 
- 
- 
Constructor Details- 
XmlConfigurationProviderpublic XmlConfigurationProvider()
- 
XmlConfigurationProvider
 
- 
- 
Method Details- 
setFileManagerFactory
- 
initDescription copied from interface:ContainerProviderInitializes with the configuration- Specified by:
- initin interface- ContainerProvider
- Specified by:
- initin interface- PackageProvider
- Overrides:
- initin class- XmlDocConfigurationProvider
- Parameters:
- configuration- The configuration
 
- 
loadPackagesDescription copied from interface:PackageProviderLoads the packages for the configuration.- Specified by:
- loadPackagesin interface- PackageProvider
- Overrides:
- loadPackagesin class- XmlDocConfigurationProvider
- Throws:
- ConfigurationException- in case of configuration errors
 
- 
registerpublic void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException Description copied from interface:ContainerProviderRegisters beans and properties for the Container- Specified by:
- registerin interface- ContainerProvider
- Overrides:
- registerin class- XmlDocConfigurationProvider
- Parameters:
- containerBuilder- The builder to register beans with
- props- The properties to register constants with
- Throws:
- ConfigurationException- If anything goes wrong
 
- 
needsReloadpublic boolean needsReload()Tells whether the ConfigurationProvider should reload its configuration. This method should only be called if ConfigurationManager.isReloadingConfigs() is true.- Specified by:
- needsReloadin interface- ContainerProvider
- Specified by:
- needsReloadin interface- PackageProvider
- Overrides:
- needsReloadin class- XmlDocConfigurationProvider
- Returns:
- true if the file has been changed since the last time we read it
 
- 
parseFile
- 
loadConfigurationFiles
- 
getURLs
- 
getConfigurationUrls- Throws:
- IOException
 
- 
getDocs
- 
getFinalDocs
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-