cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r171357 - in /cocoon: blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/ trunk/src/java/org/apache/cocoon/core/ trunk/src/java/org/apache/cocoon/generation/ trunk/src/java/org/apache/cocoon/servlet/
Date Sun, 22 May 2005 18:54:29 GMT
Author: cziegeler
Date: Sun May 22 11:54:28 2005
New Revision: 171357

URL: http://svn.apache.org/viewcvs?rev=171357&view=rev
Log:
Rename some settings; add some javadocs

Modified:
    cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java
    cocoon/trunk/src/java/org/apache/cocoon/core/BaseSettings.java
    cocoon/trunk/src/java/org/apache/cocoon/core/BootstrapEnvironment.java
    cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java
    cocoon/trunk/src/java/org/apache/cocoon/core/DynamicSettings.java
    cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java
    cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java
    cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java
    cocoon/trunk/src/java/org/apache/cocoon/servlet/SettingsHelper.java

Modified: cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java
(original)
+++ cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/SettingsHelper.java
Sun May 22 11:54:28 2005
@@ -57,7 +57,7 @@
 
         value = getInitParameter(config, "servlet-logger");
         if ( value != null ) {
-            s.setAccessLogger(value);
+            s.setEnvironmentLogger(value);
         }
 
         value = getInitParameter(config, "cocoon-logger");
@@ -72,7 +72,7 @@
 
         value = getInitParameter(config, "logger-class");
         if ( value != null ) {
-            s.setLoggerClassName(value);
+            s.setLoggerManagerClassName(value);
         }
 
         value = getInitParameter(config, "log4j-config");

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/BaseSettings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/BaseSettings.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/BaseSettings.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/BaseSettings.java Sun May 22 11:54:28 2005
@@ -103,46 +103,55 @@
 
     /**
      * @return Returns the configuration.
+     * @see #KEY_CONFIGURATION
      */
     String getConfiguration();
 
     /**
      * @return Returns the extraClasspaths.
+     * @see #KEY_EXTRA_CLASSPATHS
      */
     List getExtraClasspaths();
 
     /**
      * @return Returns the forceProperties.
+     * @see #KEY_FORCE_PROPERTIES
      */
     Map getForceProperties();
 
     /**
      * @return Returns the loadClasses.
+     * @see #KEY_LOAD_CLASSES
      */
     Iterator getLoadClasses();
 
     /**
-     * @return Returns the loggerClassName.
+     * @return Returns the loggerManagerClassName.
+     * @see #KEY_LOGGING_MANAGER_CLASS
      */
-    String getLoggerClassName();
+    String getLoggerManagerClassName();
 
     /**
      * @return Returns the loggingConfiguration.
+     * @see #KEY_LOGGING_CONFIGURATION
      */
     String getLoggingConfiguration();
 
     /**
      * @return Returns the logLevel.
+     * @see #KEY_LOGGING_BOOTSTRAP_LOGLEVEL
      */
     String getBootstrapLogLevel();
 
     /**
      * @return Returns the parentServiceManagerClassName.
+     * @see #KEY_PARENT_SERVICE_MANAGER
      */
     String getParentServiceManagerClassName();
 
     /**
      * @return Returns the log4jConfiguration.
+     * @see #KEY_LOGGING_LOG4J_CONFIGURATION
      */
     String getLog4jConfiguration();
 

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/BootstrapEnvironment.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/BootstrapEnvironment.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/BootstrapEnvironment.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/BootstrapEnvironment.java Sun May 22 11:54:28
2005
@@ -59,9 +59,26 @@
 
     InputStream getInputStream(String path);
     
+    /**
+     * This callback can be used by the environment to add environment specific
+     * settings. For example the servlet environment parsed the web.xml and adjusts
+     * the settings based on the parameters.
+     * @param settings The settings for Cocoon.
+     */
     void configure(MutableSettings settings);
+
+    /**
+     * This callback can be used by the environment to add environment specific
+     * information for the logging system.
+     * @param context The context passed to the logging system.
+     */
     void configureLoggingContext(DefaultContext context);
 
+    /**
+     * This callback can be used by the environment to add environment specific
+     * information.
+     * @param context The context passed to all Avalon based components that are context
aware.
+     */
     void configure(DefaultContext context);
 
     ClassLoader getInitClassLoader();

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java Sun May 22 11:54:28 2005
@@ -376,7 +376,7 @@
             logLevel = "INFO";
         }
 
-        String accesslogger = settings.getAccessLogger();
+        String accesslogger = settings.getEnvironmentLogger();
         if (accesslogger == null) {
             accesslogger = "cocoon";
         }
@@ -412,7 +412,7 @@
         }
         this.env.configureLoggingContext(subcontext);
 
-        String loggerManagerClass = settings.getLoggerClassName();
+        String loggerManagerClass = settings.getLoggerManagerClassName();
         if (loggerManagerClass == null) {
             loggerManagerClass = LogKitLoggerManager.class.getName();
         }

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/DynamicSettings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/DynamicSettings.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/DynamicSettings.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/DynamicSettings.java Sun May 22 11:54:28
2005
@@ -56,7 +56,7 @@
      * This parameter indicates the category id of the logger from the LogKit
      * configuration used by the environment.
      */
-    String KEY_LOGGING_ACCESS_LOGGER = "logging.logger.access.category";
+    String KEY_LOGGING_ENVIRONMENT_LOGGER = "logging.category.environment";
 
     /**
      * This parameter indicates the category id of the logger from the LogKit
@@ -65,7 +65,7 @@
      * and sitemap.xmap file not having specified a logger with the
      * logger="..." attribute in the component configuration file.
      */
-    String KEY_LOGGING_COCOON_LOGGER = "logging.logger.cocoon.category";
+    String KEY_LOGGING_COCOON_LOGGER = "logging.category.cocoon";
 
     /**
      * Allow reinstantiating (reloading) of the cocoon instance. If this is
@@ -165,96 +165,109 @@
 
     /**
      * @return Returns the hideShowTime.
+     * @see #KEY_HIDE_SHOWTIME
      */
     boolean isHideShowTime();
 
     /**
      * @return Returns the allowReload.
+     * @see #KEY_ALLOW_RELOAD
      */
     boolean isAllowReload();
 
     /**
      * @return Returns the autosaveUploads.
+     * @see #KEY_UPLOADS_AUTOSAVE
      */
     boolean isAutosaveUploads();
 
     /**
      * @return Returns the cacheDirectory.
+     * @see #KEY_CACHE_DIRECTORY
      */
     String getCacheDirectory();
 
     /**
      * @return Returns the cocoonLogger.
+     * @see #KEY_LOGGING_COCOON_LOGGER
      */
     String getCocoonLogger();
 
     /**
      * @return Returns the enableUploads.
+     * @see #KEY_UPLOADS_ENABLE
      */
     boolean isEnableUploads();
 
     /**
      * @return Returns the formEncoding.
+     * @see #KEY_FORM_ENCODING
      */
     String getFormEncoding();
 
     /**
      * @return Returns the initClassloader.
+     * @see #KEY_INIT_CLASSLOADER
      */
     boolean isInitClassloader();
 
     /**
-     * @return Returns the logLevel.
-     */
-    String getBootstrapLogLevel();
-
-    /**
      * @return Returns the manageExceptions.
+     * @see #KEY_MANAGE_EXCEPTIONS
      */
     boolean isManageExceptions();
 
     /**
      * @return Returns the maxUploadSize.
+     * @see #KEY_UPLOADS_MAXSIZE
      */
     int getMaxUploadSize();
 
     /**
      * @return Returns the overwriteUploads.
+     * @see #KEY_UPLOADS_OVERWRITE
      */
     String getOverwriteUploads();
 
     /**
      * @return Returns the showTime.
+     * @see #KEY_SHOWTIME
      */
     boolean isShowTime();
 
     /**
      * @return Returns the uploadDirectory.
+     * @see #KEY_UPLOADS_DIRECTORY
      */
     String getUploadDirectory();
 
     /**
      * @return Returns the workDirectory.
+     * @see #KEY_WORK_DIRECTORY
      */
     String getWorkDirectory();
 
     /**
-     * @return Returns the accessLogger.
+     * @return Returns the logger for the environment.
+     * @see #KEY_LOGGING_ENVIRONMENT_LOGGER
      */
-    String getAccessLogger();
+    String getEnvironmentLogger();
 
     /**
      * @return Returns the overrideLogLevel.
+     * @see #KEY_LOGGING_OVERRIDE_LOGLEVEL
      */
     String getOverrideLogLevel();
 
     /**
      * @return Returns the configurationReloadDelay.
+     * @see #KEY_CONFIGURATION_RELOAD_DELAY
      */
     long getConfigurationReloadDelay();
 
     /**
      * @return Returns the lazyMode.
+     * @see #KEY_LAZY_MODE
      */
     boolean isLazyMode();
 

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/MutableSettings.java Sun May 22 11:54:28
2005
@@ -29,6 +29,7 @@
  */
 public class MutableSettings extends Settings {
 
+    /** Are we still mutable? */
     protected boolean readOnly = false;
 
     /**
@@ -60,14 +61,14 @@
                         this.configurationReloadDelay = NumberUtils.toLong(value);
                     } else if ( key.equals(KEY_LOGGING_CONFIGURATION) ) {
                         this.loggingConfiguration = value;
-                    } else if ( key.equals(KEY_LOGGING_ACCESS_LOGGER) ) {
-                        this.accessLogger = value;
+                    } else if ( key.equals(KEY_LOGGING_ENVIRONMENT_LOGGER) ) {
+                        this.environmentLogger = value;
                     } else if ( key.equals(KEY_LOGGING_COCOON_LOGGER) ) {
                         this.cocoonLogger = value;
                     } else if ( key.equals(KEY_LOGGING_BOOTSTRAP_LOGLEVEL) ) {
                         this.bootstrapLogLevel = value;
                     } else if ( key.equals(KEY_LOGGING_MANAGER_CLASS) ) {
-                        this.loggerClassName = value;
+                        this.loggerManagerClassName = value;
                     } else if ( key.equals(KEY_LOGGING_LOG4J_CONFIGURATION) ) {
                         this.log4jConfiguration = value;
                     } else if ( key.equals(KEY_ALLOW_RELOAD) ) {
@@ -207,9 +208,9 @@
     /**
      * @param loggerClassName The loggerClassName to set.
      */
-    public void setLoggerClassName(String loggerClassName) {
+    public void setLoggerManagerClassName(String loggerClassName) {
         this.checkWriteable();
-        this.loggerClassName = loggerClassName;
+        this.loggerManagerClassName = loggerClassName;
     }
 
     /**
@@ -294,11 +295,11 @@
     }
 
     /**
-     * @param servletLogger The servletLogger to set.
+     * @param logger The logger for the environment.
      */
-    public void setAccessLogger(String servletLogger) {
+    public void setEnvironmentLogger(String logger) {
         this.checkWriteable();
-        this.accessLogger = servletLogger;
+        this.environmentLogger = logger;
     }
 
     /**
@@ -341,7 +342,7 @@
     throws IllegalStateException {
         if( this.readOnly ) {
             throw new IllegalStateException
-                ( "Settings is read only and can not be modified" );
+                ( "Settings is read only and can not be modified anymore." );
         }
     }
 

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/Settings.java Sun May 22 11:54:28 2005
@@ -65,7 +65,7 @@
      * This parameter indicates the category id of the logger from the LogKit
      * configuration used by the environment.
      */
-    protected String accessLogger;
+    protected String environmentLogger;
 
     /**
      * This parameter indicates the category id of the logger from the LogKit
@@ -88,7 +88,7 @@
      * This parameter switches the logging system from LogKit to Log4J for Cocoon.
      * Log4J has to be configured already.
      */
-    protected String loggerClassName;
+    protected String loggerManagerClassName;
 
     /**
      * If you want to configure log4j using Cocoon, then you can define
@@ -317,8 +317,8 @@
     /**
      * @return Returns the loggerClassName.
      */
-    public String getLoggerClassName() {
-        return this.loggerClassName;
+    public String getLoggerManagerClassName() {
+        return this.loggerManagerClassName;
     }
 
     /**
@@ -394,8 +394,8 @@
     /**
      * @return Returns the accessLogger.
      */
-    public String getAccessLogger() {
-        return this.accessLogger;
+    public String getEnvironmentLogger() {
+        return this.environmentLogger;
     }
 
     /**
@@ -454,11 +454,11 @@
           KEY_LOAD_CLASSES + " : " + this.loadClasses + '\n' +
           KEY_FORCE_PROPERTIES + " : " + this.forceProperties + '\n' +
           KEY_LOGGING_CONFIGURATION + " : " + this.loggingConfiguration + '\n' +
-          KEY_LOGGING_ACCESS_LOGGER + " : " + this.accessLogger + '\n' +
+          KEY_LOGGING_ENVIRONMENT_LOGGER + " : " + this.environmentLogger + '\n' +
           KEY_LOGGING_BOOTSTRAP_LOGLEVEL + " : " + this.bootstrapLogLevel + '\n' +
           KEY_LOGGING_COCOON_LOGGER + " : " + this.cocoonLogger + '\n' +
           KEY_LOGGING_LOG4J_CONFIGURATION + " : " + this.log4jConfiguration + '\n' +
-          KEY_LOGGING_MANAGER_CLASS + " : " + this.loggerClassName + '\n' +
+          KEY_LOGGING_MANAGER_CLASS + " : " + this.loggerManagerClassName + '\n' +
           KEY_LOGGING_OVERRIDE_LOGLEVEL + " : " + this.overrideLogLevel + '\n' +
           KEY_MANAGE_EXCEPTIONS + " : " + this.manageExceptions + '\n' +
           KEY_PARENT_SERVICE_MANAGER + " : " + this.parentServiceManagerClassName + '\n'
+
@@ -494,14 +494,14 @@
                 value = String.valueOf(this.configurationReloadDelay);
             } else if ( sKey.equals(KEY_LOGGING_CONFIGURATION) ) {
                 value = this.loggingConfiguration;
-            } else if ( sKey.equals(KEY_LOGGING_ACCESS_LOGGER) ) {
-                value = this.accessLogger;
+            } else if ( sKey.equals(KEY_LOGGING_ENVIRONMENT_LOGGER) ) {
+                value = this.environmentLogger;
             } else if ( sKey.equals(KEY_LOGGING_COCOON_LOGGER) ) {
                 value = this.cocoonLogger;
             } else if ( sKey.equals(KEY_LOGGING_BOOTSTRAP_LOGLEVEL) ) {
                 value = this.bootstrapLogLevel;
             } else if ( sKey.equals(KEY_LOGGING_MANAGER_CLASS) ) {
-                value = this.loggerClassName;
+                value = this.loggerManagerClassName;
             } else if ( sKey.equals(KEY_LOGGING_LOG4J_CONFIGURATION) ) {
                 value = this.log4jConfiguration;
             } else if ( sKey.equals(KEY_ALLOW_RELOAD) ) {

Modified: cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java Sun May 22 11:54:28
2005
@@ -397,11 +397,11 @@
         this.addValue(Settings.KEY_LOAD_CLASSES, s.getLoadClasses());
         this.addValue(Settings.KEY_FORCE_PROPERTIES, s.getForceProperties());
         this.addValue(Settings.KEY_LOGGING_CONFIGURATION, s.getLoggingConfiguration());
-        this.addValue(Settings.KEY_LOGGING_ACCESS_LOGGER, s.getAccessLogger());
+        this.addValue(Settings.KEY_LOGGING_ENVIRONMENT_LOGGER, s.getEnvironmentLogger());
         this.addValue(Settings.KEY_LOGGING_BOOTSTRAP_LOGLEVEL, s.getBootstrapLogLevel());
         this.addValue(Settings.KEY_LOGGING_COCOON_LOGGER, s.getCocoonLogger());
         this.addValue(Settings.KEY_LOGGING_LOG4J_CONFIGURATION, s.getLog4jConfiguration());
-        this.addValue(Settings.KEY_LOGGING_MANAGER_CLASS, s.getLoggerClassName());
+        this.addValue(Settings.KEY_LOGGING_MANAGER_CLASS, s.getLoggerManagerClassName());
         this.addValue(Settings.KEY_LOGGING_OVERRIDE_LOGLEVEL, s.getOverrideLogLevel());
         this.addValue(Settings.KEY_MANAGE_EXCEPTIONS, s.isManageExceptions());
         this.addValue(Settings.KEY_PARENT_SERVICE_MANAGER, s.getParentServiceManagerClassName());

Modified: cocoon/trunk/src/java/org/apache/cocoon/servlet/SettingsHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/servlet/SettingsHelper.java?rev=171357&r1=171356&r2=171357&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/servlet/SettingsHelper.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/servlet/SettingsHelper.java Sun May 22 11:54:28
2005
@@ -57,7 +57,7 @@
 
         value = getInitParameter(config, "servlet-logger");
         if ( value != null ) {
-            s.setAccessLogger(value);
+            s.setEnvironmentLogger(value);
         }
 
         value = getInitParameter(config, "cocoon-logger");
@@ -72,7 +72,7 @@
 
         value = getInitParameter(config, "logger-class");
         if ( value != null ) {
-            s.setLoggerClassName(value);
+            s.setLoggerManagerClassName(value);
         }
 
         value = getInitParameter(config, "log4j-config");



Mime
View raw message