|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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.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 List<ExceptionMappingConfig> |
buildExceptionMappings(Element element,
PackageConfig.Builder packageContext)
Build a map of ResultConfig 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 |
loadGlobalResults(PackageConfig.Builder packageContext,
Element packageElement)
Load all of the global results for this package from the XML element. |
protected void |
loadGobalExceptionMappings(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 |
setObjectFactory(ObjectFactory objectFactory)
|
void |
setThrowExceptionOnDuplicateBeans(boolean val)
|
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 setThrowExceptionOnDuplicateBeans(boolean val)
public void setDtdMappings(Map<String,String> mappings)
public void setObjectFactory(ObjectFactory objectFactory)
public Map<String,String> getDtdMappings()
public void init(Configuration configuration)
ContainerProvider
init
in interface ContainerProvider
init
in interface PackageProvider
configuration
- The configurationpublic void destroy()
ContainerProvider
destroy
in interface ContainerProvider
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException
ContainerProvider
register
in interface ContainerProvider
containerBuilder
- The builder to register beans withprops
- The properties to register constants with
ConfigurationException
- If anything goes wrongpublic void loadPackages() throws ConfigurationException
PackageProvider
loadPackages
in interface PackageProvider
ConfigurationException
public boolean needsReload()
needsReload
in interface ContainerProvider
needsReload
in interface PackageProvider
protected void addAction(Element actionElement, PackageConfig.Builder 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.Builder packageContext, Element element)
protected Class verifyResultType(String className, Location loc)
protected List<InterceptorMapping> buildInterceptorList(Element element, PackageConfig.Builder context) throws ConfigurationException
ConfigurationException
protected PackageConfig.Builder buildPackageContext(Element packageElement)
protected Map<String,ResultConfig> buildResults(Element element, PackageConfig.Builder packageContext)
protected String guessResultType(String type)
protected List<ExceptionMappingConfig> buildExceptionMappings(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)
protected void loadDefaultClassRef(PackageConfig.Builder packageContext, Element element)
protected void loadGobalExceptionMappings(PackageConfig.Builder packageContext, Element packageElement)
protected InterceptorStackConfig loadInterceptorStack(Element element, PackageConfig.Builder context) throws ConfigurationException
ConfigurationException
protected void loadInterceptorStacks(Element element, PackageConfig.Builder context) throws ConfigurationException
ConfigurationException
protected void loadInterceptors(PackageConfig.Builder context, Element element) throws ConfigurationException
ConfigurationException
protected Iterator<URL> getConfigurationUrls(String fileName) throws IOException
IOException
protected void loadExtraConfiguration(Document doc)
doc
- The configuration document
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |