public class XmlConfigurationProvider extends Object implements ConfigurationProvider
| Constructor and Description | 
|---|
XmlConfigurationProvider()  | 
XmlConfigurationProvider(String filename)  | 
XmlConfigurationProvider(String filename,
                        boolean errorIfMissing)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addAction(Element actionElement,
         PackageConfig.Builder packageContext)  | 
protected PackageConfig | 
addPackage(Element packageElement)
Create a PackageConfig from an XML element representing it. 
 | 
protected void | 
addResultTypes(PackageConfig.Builder packageContext,
              Element element)  | 
protected Set<String> | 
buildAllowedMethods(Element element,
                   PackageConfig.Builder packageContext)  | 
protected List<ExceptionMappingConfig> | 
buildExceptionMappings(Element element,
                      PackageConfig.Builder packageContext)
Build a list of exception mapping objects from below a given XML element. 
 | 
protected List<InterceptorMapping> | 
buildInterceptorList(Element element,
                    PackageConfig.Builder context)  | 
protected PackageConfig.Builder | 
buildPackageContext(Element packageElement)
 This method builds a package context by looking for the parents of this new package. 
 | 
protected Map<String,ResultConfig> | 
buildResults(Element element,
            PackageConfig.Builder packageContext)
Build a map of ResultConfig objects from below a given XML element. 
 | 
void | 
destroy()
Called before removed from the configuration manager 
 | 
boolean | 
equals(Object o)  | 
protected Iterator<URL> | 
getConfigurationUrls(String fileName)  | 
Map<String,String> | 
getDtdMappings()
Returns an unmodifiable map of DTD mappings 
 | 
protected String | 
guessResultType(String type)  | 
int | 
hashCode()  | 
void | 
init(Configuration configuration)
Initializes with the configuration 
 | 
protected void | 
loadDefaultActionRef(PackageConfig.Builder packageContext,
                    Element element)  | 
protected void | 
loadDefaultClassRef(PackageConfig.Builder packageContext,
                   Element element)  | 
protected void | 
loadDefaultInterceptorRef(PackageConfig.Builder packageContext,
                         Element element)  | 
protected void | 
loadExtraConfiguration(Document doc)
Allows subclasses to load extra information from the document 
 | 
protected void | 
loadGlobalAllowedMethods(PackageConfig.Builder packageContext,
                        Element packageElement)  | 
protected void | 
loadGlobalExceptionMappings(PackageConfig.Builder packageContext,
                           Element packageElement)
Load all of the global results for this package from the XML element. 
 | 
protected void | 
loadGlobalResults(PackageConfig.Builder packageContext,
                 Element packageElement)
Load all of the global results for this package from the XML element. 
 | 
protected void | 
loadInterceptors(PackageConfig.Builder context,
                Element element)  | 
protected InterceptorStackConfig | 
loadInterceptorStack(Element element,
                    PackageConfig.Builder context)  | 
protected void | 
loadInterceptorStacks(Element element,
                     PackageConfig.Builder context)  | 
void | 
loadPackages()
Loads the packages for the configuration. 
 | 
boolean | 
needsReload()
Tells whether the ConfigurationProvider should reload its configuration. 
 | 
void | 
register(ContainerBuilder containerBuilder,
        LocatableProperties props)
Registers beans and properties for the Container 
 | 
void | 
setDtdMappings(Map<String,String> mappings)  | 
void | 
setFileManagerFactory(FileManagerFactory fileManagerFactory)  | 
void | 
setObjectFactory(ObjectFactory objectFactory)  | 
void | 
setThrowExceptionOnDuplicateBeans(boolean val)  | 
void | 
setValueSubstitutor(ValueSubstitutor valueSubstitutor)  | 
String | 
toString()  | 
protected boolean | 
verifyAction(String className,
            String name,
            Location loc)  | 
protected Class | 
verifyResultType(String className,
                Location loc)  | 
public XmlConfigurationProvider()
public XmlConfigurationProvider(String filename)
public XmlConfigurationProvider(String filename, boolean errorIfMissing)
public void setThrowExceptionOnDuplicateBeans(boolean val)
public void setObjectFactory(ObjectFactory objectFactory)
public void setFileManagerFactory(FileManagerFactory fileManagerFactory)
public void setValueSubstitutor(ValueSubstitutor valueSubstitutor)
public Map<String,String> getDtdMappings()
public void init(Configuration configuration)
ContainerProviderinit in interface ContainerProviderinit in interface PackageProviderconfiguration - The configurationpublic void destroy()
ContainerProviderdestroy in interface ContainerProviderpublic void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException
ContainerProviderregister in interface ContainerProvidercontainerBuilder - The builder to register beans withprops - The properties to register constants withConfigurationException - If anything goes wrongpublic void loadPackages()
                  throws ConfigurationException
PackageProviderloadPackages in interface PackageProviderConfigurationException - in case of configuration errorspublic boolean needsReload()
needsReload in interface ContainerProviderneedsReload in interface PackageProviderprotected void addAction(Element actionElement, PackageConfig.Builder packageContext) throws ConfigurationException
ConfigurationExceptionprotected PackageConfig addPackage(Element packageElement) throws ConfigurationException
packageElement - the given XML elementConfigurationException - in case of configuration errorsprotected void addResultTypes(PackageConfig.Builder packageContext, Element element)
protected List<InterceptorMapping> buildInterceptorList(Element element, PackageConfig.Builder context) throws ConfigurationException
ConfigurationExceptionprotected PackageConfig.Builder buildPackageContext(Element packageElement)
This method builds a package context by looking for the parents of this new package.
If no parents are found, it will return a root package.
packageElement - the package elementprotected Map<String,ResultConfig> buildResults(Element element, PackageConfig.Builder packageContext)
element - the given XML elementpackageContext - the package contextprotected List<ExceptionMappingConfig> buildExceptionMappings(Element element, PackageConfig.Builder packageContext)
element - the given XML elementpackageContext - the package contextprotected Set<String> buildAllowedMethods(Element element, PackageConfig.Builder packageContext)
protected void loadDefaultInterceptorRef(PackageConfig.Builder packageContext, Element element)
protected void loadDefaultActionRef(PackageConfig.Builder packageContext, Element element)
protected void loadGlobalResults(PackageConfig.Builder packageContext, Element packageElement)
packageContext - the package contextpackageElement - the given XML elementprotected void loadGlobalAllowedMethods(PackageConfig.Builder packageContext, Element packageElement)
protected void loadDefaultClassRef(PackageConfig.Builder packageContext, Element element)
protected void loadGlobalExceptionMappings(PackageConfig.Builder packageContext, Element packageElement)
packageContext - the package contextpackageElement - the given XML elementprotected InterceptorStackConfig loadInterceptorStack(Element element, PackageConfig.Builder context) throws ConfigurationException
ConfigurationExceptionprotected void loadInterceptorStacks(Element element, PackageConfig.Builder context) throws ConfigurationException
ConfigurationExceptionprotected void loadInterceptors(PackageConfig.Builder context, Element element) throws ConfigurationException
ConfigurationExceptionprotected Iterator<URL> getConfigurationUrls(String fileName) throws IOException
IOExceptionprotected void loadExtraConfiguration(Document doc)
doc - The configuration documentCopyright © 2000–2020 Apache Software Foundation. All rights reserved.