cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r230798 - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal: PortalComponentManager.java PortalService.java impl/DefaultPortalComponentManager.java impl/PortalServiceImpl.java
Date Mon, 08 Aug 2005 13:26:30 GMT
Author: cziegeler
Date: Mon Aug  8 06:26:25 2005
New Revision: 230798

URL: http://svn.apache.org/viewcvs?rev=230798&view=rev
Log:
Make object model and context available

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java?rev=230798&r1=230797&r2=230798&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java Mon
Aug  8 06:26:25 2005
@@ -16,6 +16,7 @@
 package org.apache.cocoon.portal;
 
 import org.apache.cocoon.core.Core;
+import org.apache.avalon.framework.context.Context;
 import org.apache.cocoon.portal.coplet.CopletFactory;
 import org.apache.cocoon.portal.event.EventManager;
 import org.apache.cocoon.portal.layout.LayoutFactory;
@@ -73,6 +74,12 @@
      * @since 2.1.8
      */
     PortalManager getPortalManager();
+
+    /**
+     * Return the component context.
+     * @since 2.1.8
+     */
+    Context getComponentContext();
 
     /**
      * Get the Cocoon core object.

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java?rev=230798&r1=230797&r2=230798&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java Mon Aug  8
06:26:25 2005
@@ -17,6 +17,9 @@
 
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+
+import org.apache.avalon.framework.context.Context;
 import org.apache.cocoon.portal.layout.Layout;
 
 /**
@@ -114,4 +117,10 @@
      * Return all skins
      */
     List getSkinDescriptions();
+
+    /**
+     * Return the current object model.
+     * @since 2.1.8
+     */
+    Map getObjectModel();
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java?rev=230798&r1=230797&r2=230798&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
Mon Aug  8 06:26:25 2005
@@ -24,6 +24,7 @@
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
@@ -60,7 +61,7 @@
     protected ServiceManager manager;
 
     /** The portal service */
-    protected PortalService portalService;
+    protected final PortalService portalService;
 
     protected String profileManagerRole;
     protected ProfileManager profileManager;
@@ -85,6 +86,8 @@
     protected String portalManagerRole;
     protected PortalManager portalManager;
 
+    protected final Context context;
+
     /** The Cocoon core. */
     protected Core core;
 
@@ -96,8 +99,9 @@
      * to pass it to the other components (TODO).
      * @param service The portal service.
      */
-    public DefaultPortalComponentManager(final PortalService service) {
+    public DefaultPortalComponentManager(final PortalService service, Context context) {
         this.portalService = service;
+        this.context = context;
     }
 
     /**
@@ -259,6 +263,13 @@
             }
         }
         return this.portalManager;
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalComponentManager#getComponentContext()
+     */
+    public Context getComponentContext() {
+        return this.context;
     }
 
     /**

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java?rev=230798&r1=230797&r2=230798&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java Mon
Aug  8 06:26:25 2005
@@ -194,7 +194,7 @@
             final Configuration current = portals[i];
             final String name = current.getAttribute("name");
             try {
-                PortalComponentManager c = new DefaultPortalComponentManager(this);
+                PortalComponentManager c = new DefaultPortalComponentManager(this, this.context);
                 this.portalComponentManagers.put( name, c );
                 ContainerUtil.enableLogging( c, this.getLogger() );
                 ContainerUtil.contextualize( c, this.context );
@@ -281,5 +281,12 @@
      */
     public List getSkinDescriptions() {
         return (List)this.skins.get(this.getPortalName());
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalService#getObjectModel()
+     */
+    public Map getObjectModel() {
+        return ContextHelper.getObjectModel(this.context);
     }
 }



Mime
View raw message