org.apache.cocoon.core.container.spring.avalon
Class SitemapHelper

java.lang.Object
  extended byorg.apache.cocoon.core.container.spring.avalon.SitemapHelper

public class SitemapHelper
extends Object

Since:
2.2
Version:
$Id: SitemapHelper.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static String DEFAULT_CHILD_PROPERTIES_LOCATION
          The default location of spring related child configuration files.
static String DEFAULT_CHILD_SPRING_CONFIGURATION_LOCATION
          The default location of spring related child configuration files.
 
Constructor Summary
SitemapHelper()
           
 
Method Summary
protected static void addAttribute(StringBuffer buffer, String name, String value)
          Append an attribute to the xml stream if it has a value.
protected static void addFooter(StringBuffer buffer)
          Add the footer for the xml configuration file.
protected static void addHeader(StringBuffer buffer)
          Add the header for the xml configuration file.
static WebApplicationContext createContainer(Configuration config, String sitemapLocation, org.apache.cocoon.classloader.reloading.Monitor fam, ServletContext servletContext)
          Create the per sitemap container.
protected static String createDefinition(String uriPrefix, String sitemapLocation, List beanIncludes, List propertyIncludes, Properties props)
           
static Configuration createSitemapConfiguration(Configuration config)
           
protected static List getBeanIncludes(WebApplicationContext webAppContext, String contextUrl, Configuration sitemap)
          Get all includes for bean configurations from the sitemap.
protected static Properties getGlobalSitemapVariables(Configuration sitemap)
          compatibility with 2.1.x - check for global variables in sitemap TODO - This will be removed in later versions!
protected static List getPropertiesIncludes(WebApplicationContext webAppContext, String contextUrl, Configuration sitemap)
          Get all includes for properties from the sitemap.
protected static boolean isUsingDefaultIncludes(Configuration config)
          Should the default includes be read for this sitemap?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHILD_SPRING_CONFIGURATION_LOCATION

public static final String DEFAULT_CHILD_SPRING_CONFIGURATION_LOCATION
The default location of spring related child configuration files.

See Also:
Constant Field Values

DEFAULT_CHILD_PROPERTIES_LOCATION

public static final String DEFAULT_CHILD_PROPERTIES_LOCATION
The default location of spring related child configuration files.

See Also:
Constant Field Values
Constructor Detail

SitemapHelper

public SitemapHelper()
Method Detail

createDefinition

protected static String createDefinition(String uriPrefix,
                                         String sitemapLocation,
                                         List beanIncludes,
                                         List propertyIncludes,
                                         Properties props)

addHeader

protected static void addHeader(StringBuffer buffer)
Add the header for the xml configuration file.


addFooter

protected static void addFooter(StringBuffer buffer)
Add the footer for the xml configuration file.


addAttribute

protected static void addAttribute(StringBuffer buffer,
                                   String name,
                                   String value)
Append an attribute to the xml stream if it has a value.


isUsingDefaultIncludes

protected static boolean isUsingDefaultIncludes(Configuration config)
Should the default includes be read for this sitemap?


getBeanIncludes

protected static List getBeanIncludes(WebApplicationContext webAppContext,
                                      String contextUrl,
                                      Configuration sitemap)
                               throws ConfigurationException
Get all includes for bean configurations from the sitemap.

Parameters:
sitemap -
Returns:
Throws:
ConfigurationException

getPropertiesIncludes

protected static List getPropertiesIncludes(WebApplicationContext webAppContext,
                                            String contextUrl,
                                            Configuration sitemap)
                                     throws ConfigurationException
Get all includes for properties from the sitemap.

Parameters:
sitemap -
Returns:
Throws:
ConfigurationException

getGlobalSitemapVariables

protected static Properties getGlobalSitemapVariables(Configuration sitemap)
                                               throws ConfigurationException
compatibility with 2.1.x - check for global variables in sitemap TODO - This will be removed in later versions!

Throws:
ConfigurationException

createSitemapConfiguration

public static Configuration createSitemapConfiguration(Configuration config)
                                                throws ConfigurationException
Throws:
ConfigurationException

createContainer

public static WebApplicationContext createContainer(Configuration config,
                                                    String sitemapLocation,
                                                    org.apache.cocoon.classloader.reloading.Monitor fam,
                                                    ServletContext servletContext)
                                             throws Exception
Create the per sitemap container.

Parameters:
config - The sitemap as a configuration object.
sitemapLocation - The uri of the sitemap
fam -
servletContext - The servlet context
Returns:
Throws:
Exception


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.