|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.core.container.spring.avalon.ConfigurationReader
This component reads in Avalon style configuration files and returns all contained components and their configurations.
Field Summary | |
protected List |
componentConfigs
All component configurations. |
protected ConfigurationInfo |
configInfo
The configuration info. |
protected boolean |
isRootContext
Is this the root context? |
protected Log |
logger
Logger (we use the same logging mechanism as Spring!) |
protected ServletContextResourcePatternResolver |
resolver
Resolver for reading configuration files. |
Method Summary | |
protected void |
configureRoles(Configuration configuration)
Reads a configuration object and creates the role, shorthand, and class name mapping. |
protected void |
convert(Configuration config,
Configuration additionalConfig,
String rootUri)
|
protected void |
convert(String relativePath)
|
protected void |
convertSitemap(String sitemapLocation)
|
protected String |
convertUrl(String url)
Convert an avalon url (with possible cocoon protocols) to a spring url. |
protected String |
correctUrl(String url)
Copied from ResourceUtils.correctUri(String) . |
protected InputSource |
getInputSource(Resource rsrc)
Construct input source from given Resource, initialize system Id. |
protected String |
getUrl(Resource rsrc)
|
protected String |
getUrl(String url,
String base)
|
protected void |
handleBeanInclude(String contextURI,
Configuration includeStatement)
Handle include for spring bean configurations. |
protected void |
handleInclude(String contextURI,
Set loadedURIs,
Configuration includeStatement)
Handle includes of avalon configurations. |
protected void |
loadURI(Resource src,
Set loadedURIs,
Configuration includeStatement)
|
protected void |
parseConfiguration(Configuration configuration,
String contextURI,
Set loadedURIs)
|
protected void |
processComponents()
|
static ConfigurationInfo |
readConfiguration(Configuration rolesConfig,
Configuration componentConfig)
|
static ConfigurationInfo |
readConfiguration(String source,
ResourceLoader resourceLoader)
This method reads in an Avalon style configuration. |
static ConfigurationInfo |
readSitemap(ConfigurationInfo parentInfo,
String src,
ResourceLoader resourceLoader)
This method reads in an Avalon style sitemap. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final Log logger
protected final ServletContextResourcePatternResolver resolver
protected final ConfigurationInfo configInfo
protected final List componentConfigs
protected final boolean isRootContext
Method Detail |
public static ConfigurationInfo readConfiguration(String source, ResourceLoader resourceLoader) throws Exception
source
- The location of the configuration.resourceLoader
- The resource loader to load included configs.
Exception
public static ConfigurationInfo readSitemap(ConfigurationInfo parentInfo, String src, ResourceLoader resourceLoader) throws Exception
src
- The location of the sitemap.resourceLoader
- The resource loader to load included configs.
Exception
public static ConfigurationInfo readConfiguration(Configuration rolesConfig, Configuration componentConfig) throws Exception
Exception
protected String convertUrl(String url)
url
- The avalon url.
protected String correctUrl(String url)
ResourceUtils.correctUri(String)
. Comment says:
If it is a file we have to recreate the url, otherwise we get problems under windows with some file references starting with "/DRIVELETTER" and some just with "DRIVELETTER".
url
- to correct
protected String getUrl(Resource rsrc) throws IOException
IOException
protected String getUrl(String url, String base)
protected InputSource getInputSource(Resource rsrc) throws IOException
rsrc
- Resource for the input source
Exception
- if resource URL is not valid or input stream is not available
IOException
protected void convert(String relativePath) throws Exception
Exception
protected void convertSitemap(String sitemapLocation) throws Exception
Exception
protected void convert(Configuration config, Configuration additionalConfig, String rootUri) throws Exception
Exception
protected void parseConfiguration(Configuration configuration, String contextURI, Set loadedURIs) throws ConfigurationException
ConfigurationException
protected void processComponents() throws ConfigurationException
ConfigurationException
protected void handleInclude(String contextURI, Set loadedURIs, Configuration includeStatement) throws ConfigurationException
contextURI
- loadedURIs
- includeStatement
-
ConfigurationException
protected void loadURI(Resource src, Set loadedURIs, Configuration includeStatement) throws ConfigurationException, IOException
ConfigurationException
IOException
protected void handleBeanInclude(String contextURI, Configuration includeStatement) throws ConfigurationException
contextURI
- includeStatement
-
ConfigurationException
protected final void configureRoles(Configuration configuration) throws ConfigurationException
configuration
- The configuration object.
ConfigurationException
- if the configuration is malformed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |