|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider
public class XmlConfigurationProvider
Looks in the classpath for an XML file, "xwork.xml" by default, and uses it for the XWork configuration.
| Constructor Summary | |
|---|---|
XmlConfigurationProvider()
|
|
XmlConfigurationProvider(String filename)
|
|
XmlConfigurationProvider(String filename,
boolean errorIfMissing)
|
|
| Method Summary | |
|---|---|
protected void |
addAction(Element actionElement,
PackageConfig packageContext)
|
protected PackageConfig |
addPackage(Element packageElement)
Create a PackageConfig from an XML element representing it. |
protected void |
addResultTypes(PackageConfig packageContext,
Element element)
|
protected List |
buildExceptionMappings(Element element,
PackageConfig packageContext)
Build a map of ResultConfig objects from below a given XML element. |
protected List |
buildInterceptorList(Element element,
PackageConfig context)
|
protected PackageConfig |
buildPackageContext(Element packageElement)
This method builds a package context by looking for the parents of this new package. |
protected Map |
buildResults(Element element,
PackageConfig packageContext)
Build a map of ResultConfig objects from below a given XML element. |
void |
destroy()
|
boolean |
equals(Object o)
|
protected Iterator<URL> |
getConfigurationUrls(String fileName)
|
Map<String,String> |
getDtdMappings()
Returns an unmodifiable map of DTD mappings |
int |
hashCode()
|
void |
init(Configuration configuration)
|
protected void |
loadDefaultActionRef(PackageConfig packageContext,
Element element)
|
protected void |
loadDefaultClassRef(PackageConfig packageContext,
Element element)
|
protected void |
loadDefaultInterceptorRef(PackageConfig packageContext,
Element element)
|
protected void |
loadExtraConfiguration(Document doc)
Allows subclasses to load extra information from the document |
protected void |
loadGlobalResults(PackageConfig packageContext,
Element packageElement)
Load all of the global results for this package from the XML element. |
protected void |
loadGobalExceptionMappings(PackageConfig packageContext,
Element packageElement)
Load all of the global results for this package from the XML element. |
protected void |
loadInterceptors(PackageConfig context,
Element element)
|
protected InterceptorStackConfig |
loadInterceptorStack(Element element,
PackageConfig context)
|
protected void |
loadInterceptorStacks(Element element,
PackageConfig context)
|
void |
loadPackages()
|
boolean |
needsReload()
Tells whether the ConfigurationProvider should reload its configuration. |
void |
register(ContainerBuilder containerBuilder,
LocatableProperties props)
|
void |
setDtdMappings(Map<String,String> mappings)
|
void |
setObjectFactory(ObjectFactory objectFactory)
|
protected boolean |
verifyAction(String className,
String name,
Location loc)
|
protected Class |
verifyResultType(String className,
Location loc)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlConfigurationProvider()
public XmlConfigurationProvider(String filename)
public XmlConfigurationProvider(String filename,
boolean errorIfMissing)
| Method Detail |
|---|
public void setDtdMappings(Map<String,String> mappings)
public void setObjectFactory(ObjectFactory objectFactory)
public Map<String,String> getDtdMappings()
public void init(Configuration configuration)
init in interface ConfigurationProviderpublic void destroy()
destroy in interface ConfigurationProviderpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void register(ContainerBuilder containerBuilder,
LocatableProperties props)
throws ConfigurationException
register in interface ConfigurationProviderConfigurationException
public void loadPackages()
throws ConfigurationException
loadPackages in interface ConfigurationProviderConfigurationExceptionpublic boolean needsReload()
needsReload in interface ConfigurationProvider
protected void addAction(Element actionElement,
PackageConfig packageContext)
throws ConfigurationException
ConfigurationException
protected boolean verifyAction(String className,
String name,
Location loc)
protected PackageConfig addPackage(Element packageElement)
throws ConfigurationException
ConfigurationException
protected void addResultTypes(PackageConfig packageContext,
Element element)
protected Class verifyResultType(String className,
Location loc)
protected List buildInterceptorList(Element element,
PackageConfig context)
throws ConfigurationException
ConfigurationExceptionprotected PackageConfig buildPackageContext(Element packageElement)
protected Map buildResults(Element element,
PackageConfig packageContext)
protected List buildExceptionMappings(Element element,
PackageConfig packageContext)
protected void loadDefaultInterceptorRef(PackageConfig packageContext,
Element element)
protected void loadDefaultActionRef(PackageConfig packageContext,
Element element)
protected void loadGlobalResults(PackageConfig packageContext,
Element packageElement)
protected void loadDefaultClassRef(PackageConfig packageContext,
Element element)
protected void loadGobalExceptionMappings(PackageConfig packageContext,
Element packageElement)
protected InterceptorStackConfig loadInterceptorStack(Element element,
PackageConfig context)
throws ConfigurationException
ConfigurationException
protected void loadInterceptorStacks(Element element,
PackageConfig context)
throws ConfigurationException
ConfigurationException
protected void loadInterceptors(PackageConfig context,
Element element)
throws ConfigurationException
ConfigurationException
protected Iterator<URL> getConfigurationUrls(String fileName)
throws IOException
IOExceptionprotected void loadExtraConfiguration(Document doc)
doc - The configuration document
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||