|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider
org.apache.struts2.config.StrutsXmlConfigurationProvider
public class StrutsXmlConfigurationProvider
Override Xwork class so we can use an arbitrary config file
| Field Summary | |
|---|---|
private File |
baseDir
|
private String |
filename
|
private static Logger |
LOG
|
private String |
reloadKey
|
private ServletContext |
servletContext
|
| Constructor Summary | |
|---|---|
StrutsXmlConfigurationProvider(boolean errorIfMissing)
Constructs the configuration provider |
|
StrutsXmlConfigurationProvider(String filename,
boolean errorIfMissing,
ServletContext ctx)
Constructs the configuration provider |
|
| Method Summary | |
|---|---|
protected URL |
findInFileSystem(String fileName)
|
protected Iterator<URL> |
getConfigurationUrls(String fileName)
Look for the configuration file on the classpath and in the file system |
void |
loadPackages()
Loads the packages for the configuration. |
boolean |
needsReload()
Overrides needs reload to ensure it is only checked once per request |
void |
register(ContainerBuilder containerBuilder,
LocatableProperties props)
Registers beans and properties for the Container |
String |
toString()
|
| Methods inherited from class com.opensymphony.xwork2.config.providers.XmlConfigurationProvider |
|---|
addAction, addPackage, addResultTypes, buildExceptionMappings, buildInterceptorList, buildPackageContext, buildResults, destroy, equals, getDtdMappings, hashCode, init, loadDefaultActionRef, loadDefaultClassRef, loadDefaultInterceptorRef, loadExtraConfiguration, loadGlobalResults, loadGobalExceptionMappings, loadInterceptors, loadInterceptorStack, loadInterceptorStacks, setDtdMappings, setObjectFactory, setThrowExceptionOnDuplicateBeans, verifyAction, verifyResultType |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final Logger LOG
private File baseDir
private String filename
private String reloadKey
private ServletContext servletContext
| Constructor Detail |
|---|
public StrutsXmlConfigurationProvider(boolean errorIfMissing)
errorIfMissing - If we should throw an exception if the file can't be found
public StrutsXmlConfigurationProvider(String filename,
boolean errorIfMissing,
ServletContext ctx)
filename - The filename to look forerrorIfMissing - If we should throw an exception if the file can't be foundctx - Our ServletContext| Method Detail |
|---|
public void register(ContainerBuilder containerBuilder,
LocatableProperties props)
throws ConfigurationException
ContainerProvider
register in interface ContainerProviderregister in class XmlConfigurationProvidercontainerBuilder - The builder to register beans withprops - The properties to register constants with
ConfigurationException - If anything goes wrongpublic void loadPackages()
PackageProvider
loadPackages in interface PackageProviderloadPackages in class XmlConfigurationProvider
protected Iterator<URL> getConfigurationUrls(String fileName)
throws IOException
getConfigurationUrls in class XmlConfigurationProviderfileName - The file name to retrieve
IOExceptionXmlConfigurationProvider.getConfigurationUrls(java.lang.String)
protected URL findInFileSystem(String fileName)
throws IOException
IOExceptionpublic boolean needsReload()
needsReload in interface ContainerProviderneedsReload in interface PackageProviderneedsReload in class XmlConfigurationProviderpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||