cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r491022 - in /cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl: CocoonPropertyOverrideConfigurer.java Constants.java SettingsBeanFactoryPostProcessor.java SettingsElementParser.java
Date Fri, 29 Dec 2006 14:59:05 GMT
Author: cziegeler
Date: Fri Dec 29 06:59:05 2006
New Revision: 491022

URL: http://svn.apache.org/viewvc?view=rev&rev=491022
Log:
Use better names

Modified:
    cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/CocoonPropertyOverrideConfigurer.java
    cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/Constants.java
    cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsBeanFactoryPostProcessor.java
    cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsElementParser.java

Modified: cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/CocoonPropertyOverrideConfigurer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/CocoonPropertyOverrideConfigurer.java?view=diff&rev=491022&r1=491021&r2=491022
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/CocoonPropertyOverrideConfigurer.java
(original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/CocoonPropertyOverrideConfigurer.java
Fri Dec 29 06:59:05 2006
@@ -46,7 +46,7 @@
      * The locations of the directories where the different property files are
      * located.
      */
-    protected List locations = Collections.singletonList(Constants.DEFAULT_CLASSPATH_SPRING_CONFIGURATION_LOCATION);
+    protected List locations = Collections.singletonList(Constants.CLASSPATH_SPRING_CONFIGURATION_LOCATION);
 
     /**
      * The resource loader used to load the property files. This loader is

Modified: cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/Constants.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/Constants.java?view=diff&rev=491022&r1=491021&r2=491022
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/Constants.java
(original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/Constants.java
Fri Dec 29 06:59:05 2006
@@ -20,13 +20,32 @@
 
 /**
  * Some constants for the spring integration.
- * 
+ * The default location of spring related configuration files.
+ *
  * @version $Id$
  * @since 1.0
  */
 public abstract class Constants {
 
-    /** The default location of spring related configuration files. */
-    public static final String DEFAULT_CLASSPATH_SPRING_CONFIGURATION_LOCATION = "classpath*:META-INF/cocoon/spring";
-    public static final String DEFAULT_CLASSPATH_PROPERTIES_LOCATION = "classpath*:META-INF/cocoon/properties";
+    /**
+     * The location of spring configuration files in the classpath.
+     * From this location bean definitions (*.xml) and property overrides (*.properties)
+     * are read.
+     */
+    public static final String CLASSPATH_SPRING_CONFIGURATION_LOCATION = "classpath*:META-INF/cocoon/spring";
+
+    /**
+     * The location of property files (*.properties) for the settings.
+     */
+    public static final String CLASSPATH_PROPERTIES_LOCATION = "classpath*:META-INF/cocoon/properties";
+
+    /**
+     * The location of global property overrides (*.properties).
+     */
+    public static final String GLOBAL_SPRING_CONFIGURATION_LOCATION = "/WEB-INF/cocoon/spring";
+
+    /**
+     * The location of global property files (*.properties) for the settings.
+     */
+    public static final String GLOBAL_PROPERTIES_LOCATION = "/WEB-INF/cocoon/properties";
 }

Modified: cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsBeanFactoryPostProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsBeanFactoryPostProcessor.java?view=diff&rev=491022&r1=491021&r2=491022
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsBeanFactoryPostProcessor.java
(original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsBeanFactoryPostProcessor.java
Fri Dec 29 06:59:05 2006
@@ -165,10 +165,10 @@
         final Properties properties = new Properties();
 
         // now read all properties from the properties directory
-        ResourceUtils.readProperties(org.apache.cocoon.spring.impl.Constants.DEFAULT_CLASSPATH_PROPERTIES_LOCATION,
+        ResourceUtils.readProperties(org.apache.cocoon.spring.impl.Constants.CLASSPATH_PROPERTIES_LOCATION,
                 properties, this.getResourceLoader(), this.logger);
         // read all properties from the mode dependent directory
-        ResourceUtils.readProperties(org.apache.cocoon.spring.impl.Constants.DEFAULT_CLASSPATH_PROPERTIES_LOCATION
+        ResourceUtils.readProperties(org.apache.cocoon.spring.impl.Constants.CLASSPATH_PROPERTIES_LOCATION
                 + "/" + mode, properties, this.getResourceLoader(), this.logger);
 
         // fill from the servlet context

Modified: cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsElementParser.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsElementParser.java?view=diff&rev=491022&r1=491021&r2=491022
==============================================================================
--- cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsElementParser.java
(original)
+++ cocoon/trunk/core/cocoon-configuration/cocoon-spring-configurator/src/main/java/org/apache/cocoon/spring/impl/SettingsElementParser.java
Fri Dec 29 06:59:05 2006
@@ -54,7 +54,7 @@
      */
     public BeanDefinition parse(Element element, ParserContext parserContext) {
         final String springConfigLocation = this.getAttributeValue(element, "location",
-                Constants.DEFAULT_CLASSPATH_SPRING_CONFIGURATION_LOCATION);
+                Constants.CLASSPATH_SPRING_CONFIGURATION_LOCATION);
 
         // create bean definition for settings object
         final String componentClassName = this.getAttributeValue(element, PROCESSOR_CLASS_NAME_ATTR,
@@ -83,10 +83,10 @@
 
         // handle includes
         try {
-            this.handleBeanInclude(parserContext, null, Constants.DEFAULT_CLASSPATH_SPRING_CONFIGURATION_LOCATION,
"*.xml", true);
-            this.handleBeanInclude(parserContext, null, Constants.DEFAULT_CLASSPATH_SPRING_CONFIGURATION_LOCATION
+ "/" + runningMode, "*.xml", true);
+            this.handleBeanInclude(parserContext, null, Constants.CLASSPATH_SPRING_CONFIGURATION_LOCATION,
"*.xml", true);
+            this.handleBeanInclude(parserContext, null, Constants.CLASSPATH_SPRING_CONFIGURATION_LOCATION
+ "/" + runningMode, "*.xml", true);
         } catch (Exception e) {
-            throw new BeanDefinitionStoreException("Unable to read spring configurations
from " + Constants.DEFAULT_CLASSPATH_SPRING_CONFIGURATION_LOCATION, e);
+            throw new BeanDefinitionStoreException("Unable to read spring configurations
from " + Constants.CLASSPATH_SPRING_CONFIGURATION_LOCATION, e);
         }
 
         return null;



Mime
View raw message