cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r377172 - in /cocoon/trunk: cocoon-core/src/main/java/org/apache/cocoon/core/ cocoon-core/src/main/java/org/apache/cocoon/generation/ cocoon-core/src/main/java/org/apache/cocoon/servlet/ cocoon-portal/cocoon-portal-impl/src/main/java/org/ap...
Date Sun, 12 Feb 2006 13:18:22 GMT
Author: cziegeler
Date: Sun Feb 12 05:18:21 2006
New Revision: 377172

URL: http://svn.apache.org/viewcvs?rev=377172&view=rev
Log:
Remove parent service manager support

Modified:
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/BaseSettings.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/CoreUtil.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/MutableSettings.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/servlet/SettingsHelper.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/PageLabelProfileManagerAspect.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portlet/SettingsHelper.java

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/BaseSettings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/BaseSettings.java?rev=377172&r1=377171&r2=377172&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/BaseSettings.java (original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/BaseSettings.java Sun Feb
12 05:18:21 2006
@@ -96,16 +96,6 @@
     String KEY_EXTRA_CLASSPATHS = "extra.classpaths";
 
     /**
-     * This parameter allows you to select the parent service manager.
-     * The class will be instantiated via the constructor that takes a single
-     * String as a parameter. That String will be equal to the text after the '/'.
-     *
-     * Cocoon honors the LogEnabled, Initializable and Disposable interfaces for
-     * this class, if it implements them.
-     */
-    String KEY_PARENT_SERVICE_MANAGER = "parentservicemanager";
-
-    /**
      * This parameter indicates the category id of the logger from the LogKit
      * configuration used by the environment.
      */
@@ -215,12 +205,6 @@
      * @see #KEY_LOGGING_BOOTSTRAP_LOGLEVEL
      */
     String getBootstrapLogLevel();
-
-    /**
-     * @return Returns the parentServiceManagerClassName.
-     * @see #KEY_PARENT_SERVICE_MANAGER
-     */
-    String getParentServiceManagerClassName();
 
     /**
      * @return Returns the uploadDirectory.

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/CoreUtil.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/CoreUtil.java?rev=377172&r1=377171&r2=377172&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/CoreUtil.java (original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/CoreUtil.java Sun Feb 12
05:18:21 2006
@@ -20,7 +20,6 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.lang.reflect.Constructor;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -257,7 +256,7 @@
         final Core core = this.createCore();
 
         // create parent service manager
-        this.parentManager = this.getParentServiceManager(core);
+        this.parentManager = new SingleComponentServiceManager(null, core, Core.ROLE);
 
         // settings can't be changed anymore
         settings.makeReadOnly();
@@ -294,44 +293,6 @@
     }
 
     /**
-     * Instatiates the parent service manager, as specified in the
-     * parent-service-manager init parameter.
-     *
-     * If none is specified, the method returns <code>null</code>.
-     *
-     * @return the parent service manager, or <code>null</code>.
-     */
-    protected ServiceManager getParentServiceManager(Core core) {
-        String parentServiceManagerClass = this.settings.getParentServiceManagerClassName();
-        String parentServiceManagerInitParam = null;
-        if (parentServiceManagerClass != null) {
-            int dividerPos = parentServiceManagerClass.indexOf('/');
-            if (dividerPos != -1) {
-                parentServiceManagerInitParam = parentServiceManagerInitParam.substring(dividerPos
+ 1);
-                parentServiceManagerClass = parentServiceManagerClass.substring(0, dividerPos);
-            }
-        }
-
-        ServiceManager parentServiceManager = null;
-        if (parentServiceManagerClass != null) {
-            try {
-                Class pcm = ClassUtils.loadClass(parentServiceManagerClass);
-                Constructor pcmc = pcm.getConstructor(new Class[]{String.class});
-                parentServiceManager = (ServiceManager) pcmc.newInstance(new Object[]{parentServiceManagerInitParam});
-
-                ContainerUtil.enableLogging(parentServiceManager, this.log);
-                ContainerUtil.contextualize(parentServiceManager, this.appContext);
-                ContainerUtil.initialize(parentServiceManager);
-            } catch (Exception e) {
-                if (this.log.isErrorEnabled()) {
-                    this.log.error("Could not initialize parent component manager.", e);
-                }
-            }
-        }
-        return new SingleComponentServiceManager(parentServiceManager, core, Core.ROLE);
-    }
-
-    /**
      * Get the settings for Cocoon.
      * This method reads several property files and merges the result. If there
      * is more than one definition for a property, the last one wins.
@@ -752,7 +713,7 @@
 
             // create the Core object
             final Core core = this.createCore();
-            this.parentManager = this.getParentServiceManager(core);
+            this.parentManager = new SingleComponentServiceManager(null, core, Core.ROLE);
             ContainerUtil.service(p, this.parentManager);
 
             ContainerUtil.initialize(p);

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/MutableSettings.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/MutableSettings.java?rev=377172&r1=377171&r2=377172&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/MutableSettings.java (original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/core/MutableSettings.java Sun
Feb 12 05:18:21 2006
@@ -168,16 +168,6 @@
     protected List extraClasspaths = new ArrayList();
 
     /**
-     * This parameter allows you to select the parent service manager.
-     * The class will be instantiated via the constructor that takes a single
-     * String as a parameter. That String will be equal to the text after the '/'.
-     *
-     * Cocoon honors the LogEnabled, Initializable and Disposable interfaces for
-     * this class, if it implements them.
-     */
-    protected String parentServiceManagerClassName;
-
-    /**
      * Allow adding processing time to the response
      */
     protected boolean showTime = SHOW_TIME;
@@ -280,8 +270,6 @@
                         this.cacheDirectory = value;
                     } else if ( key.equals(KEY_WORK_DIRECTORY) ) {
                         this.workDirectory = value;
-                    } else if ( key.equals(KEY_PARENT_SERVICE_MANAGER) ) {
-                        this.parentServiceManagerClassName = value;
                     } else if ( key.equals(KEY_SHOWTIME) ) {
                         this.showTime = BooleanUtils.toBoolean(value);
                     } else if ( key.equals(KEY_HIDE_SHOWTIME) ) {
@@ -446,13 +434,6 @@
     }
 
     /**
-     * @return Returns the parentServiceManagerClassName.
-     */
-    public String getParentServiceManagerClassName() {
-        return this.parentServiceManagerClassName;
-    }
-
-    /**
      * @return Returns the showTime.
      */
     public boolean isShowTime() {
@@ -580,8 +561,6 @@
                 value = this.cacheDirectory;
             } else if ( sKey.equals(KEY_WORK_DIRECTORY) ) {
                 value = this.workDirectory;
-            } else if ( sKey.equals(KEY_PARENT_SERVICE_MANAGER) ) {
-                value = this.parentServiceManagerClassName;
             } else if ( sKey.equals(KEY_SHOWTIME) ) {
                 value = String.valueOf(this.showTime);
             } else if ( sKey.equals(KEY_HIDE_SHOWTIME) ) {
@@ -637,7 +616,6 @@
           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'
+
           KEY_UPLOADS_DIRECTORY + " : " + this.uploadDirectory + '\n' +
           KEY_UPLOADS_AUTOSAVE + " : " + this.autosaveUploads + '\n' +
           KEY_UPLOADS_ENABLE + " : " + this.enableUploads + '\n' +
@@ -837,15 +815,6 @@
         this.overwriteUploads = overwriteUploads;
     }
     
-    /**
-     * @param parentServiceManagerClassName The parentServiceManagerClassName to set.
-     */
-    public void setParentServiceManagerClassName(
-            String parentServiceManagerClassName) {
-        this.checkWriteable();
-        this.parentServiceManagerClassName = parentServiceManagerClassName;
-    }
-
     /**
      * @param showTime The showTime to set.
      */

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java?rev=377172&r1=377171&r2=377172&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/generation/StatusGenerator.java
Sun Feb 12 05:18:21 2006
@@ -481,7 +481,6 @@
         this.addValue(Settings.KEY_LOGGING_CONFIGURATION, s.getLoggingConfiguration());
         this.addValue(Settings.KEY_LOGGING_BOOTSTRAP_LOGLEVEL, s.getBootstrapLogLevel());
         this.addValue(Settings.KEY_LOGGING_MANAGER_CLASS, s.getLoggerManagerClassName());
-        this.addValue(Settings.KEY_PARENT_SERVICE_MANAGER, s.getParentServiceManagerClassName());
         this.addValue(Settings.KEY_LOGGING_COCOON_LOGGER, s.getCocoonLogger());
         this.addValue(Settings.KEY_LOGGING_ENVIRONMENT_LOGGER, s.getEnvironmentLogger());
         this.addValue(Settings.KEY_LOGGING_OVERRIDE_LOGLEVEL, s.getOverrideLogLevel());

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/servlet/SettingsHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/servlet/SettingsHelper.java?rev=377172&r1=377171&r2=377172&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/servlet/SettingsHelper.java (original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/servlet/SettingsHelper.java Sun
Feb 12 05:18:21 2006
@@ -112,11 +112,6 @@
 
         handleExtraClassPath(config.getInitParameter("extra-classpath"), s);
 
-        value = getInitParameter(config, "parent-service-manager");
-        if ( value != null ) {
-            s.setParentServiceManagerClassName(value);
-        }
-
         value = getInitParameter(config, "show-time");
         if ( value != null && value.equalsIgnoreCase("hide") ) {
             s.setShowTime(true);

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/PageLabelProfileManagerAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/PageLabelProfileManagerAspect.java?rev=377172&r1=377171&r2=377172&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/PageLabelProfileManagerAspect.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/PageLabelProfileManagerAspect.java
Sun Feb 12 05:18:21 2006
@@ -50,6 +50,7 @@
             }
             label.append((tab instanceof NamedItem) ? ((NamedItem) tab).getName()
                                                     : Integer.toString(j));
+            layout.setTemporaryAttribute("pageLabel", label.toString());
             final Layout child = tab.getLayout();
             if (child != null && child instanceof CompositeLayout) {
                 this.populate((CompositeLayout) child, label.toString());

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portlet/SettingsHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portlet/SettingsHelper.java?rev=377172&r1=377171&r2=377172&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portlet/SettingsHelper.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portlet/SettingsHelper.java
Sun Feb 12 05:18:21 2006
@@ -105,11 +105,6 @@
 
         handleExtraClassPath(config.getInitParameter("extra-classpath"), s);
 
-        value = getInitParameter(config, "parent-service-manager");
-        if ( value != null ) {
-            s.setParentServiceManagerClassName(value);
-        }
-
         value = getInitParameter(config, "show-time");
         if ( value != null && value.equalsIgnoreCase("hide") ) {
             s.setShowTime(true);



Mime
View raw message