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 Summary
FieldsFields inherited from class org.apache.struts2.config.providers.XmlDocConfigurationProvider
allowlistClasses, configuration, declaredPackages, documents, dtdMappings, objectFactory, providerAllowlist, throwExceptionOnDuplicateBeans, valueSubstitutor -
Constructor Summary
Constructors -
Method Summary
Modifier 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.XmlDocConfigurationProvider
addAction, 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
-
XmlConfigurationProvider
public XmlConfigurationProvider() -
XmlConfigurationProvider
-
-
Method Details
-
setFileManagerFactory
-
init
Description copied from interface:ContainerProviderInitializes with the configuration- Specified by:
initin interfaceContainerProvider- Specified by:
initin interfacePackageProvider- Overrides:
initin classXmlDocConfigurationProvider- Parameters:
configuration- The configuration
-
loadPackages
Description copied from interface:PackageProviderLoads the packages for the configuration.- Specified by:
loadPackagesin interfacePackageProvider- Overrides:
loadPackagesin classXmlDocConfigurationProvider- Throws:
ConfigurationException- in case of configuration errors
-
register
public void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException Description copied from interface:ContainerProviderRegisters beans and properties for the Container- Specified by:
registerin interfaceContainerProvider- Overrides:
registerin classXmlDocConfigurationProvider- Parameters:
containerBuilder- The builder to register beans withprops- The properties to register constants with- Throws:
ConfigurationException- If anything goes wrong
-
needsReload
public boolean needsReload()Tells whether the ConfigurationProvider should reload its configuration. This method should only be called if ConfigurationManager.isReloadingConfigs() is true.- Specified by:
needsReloadin interfaceContainerProvider- Specified by:
needsReloadin interfacePackageProvider- Overrides:
needsReloadin classXmlDocConfigurationProvider- Returns:
- true if the file has been changed since the last time we read it
-
parseFile
-
loadConfigurationFiles
-
getURLs
-
getConfigurationUrls
- Throws:
IOException
-
getDocs
-
getFinalDocs
-
equals
-
hashCode
public int hashCode() -
toString
-