cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r230796 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal: PortalComponentManager.java PortalService.java impl/DefaultPortalComponentManager.java impl/PortalServiceImpl.java
Date Mon, 08 Aug 2005 12:54:59 GMT
Author: cziegeler
Date: Mon Aug  8 05:54:55 2005
New Revision: 230796

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

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalComponentManager.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalService.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalComponentManager.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalComponentManager.java?rev=230796&r1=230795&r2=230796&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalComponentManager.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalComponentManager.java
Mon Aug  8 05:54:55 2005
@@ -15,6 +15,7 @@
  */
 package org.apache.cocoon.portal;
 
+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;
@@ -72,4 +73,11 @@
      * @since 2.1.8
      */
     PortalManager getPortalManager();
+
+
+    /**
+     * Return the component context.
+     * @since 2.1.8
+     */
+    Context getComponentContext();
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalService.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalService.java?rev=230796&r1=230795&r2=230796&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalService.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/PortalService.java
Mon Aug  8 05:54:55 2005
@@ -17,7 +17,10 @@
 
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+
 import org.apache.avalon.framework.component.Component;
+import org.apache.avalon.framework.context.Context;
 import org.apache.cocoon.portal.layout.Layout;
 
 /**
@@ -115,4 +118,10 @@
      * Return all skins
      */
     List getSkinDescriptions();
+
+    /**
+     * Return the current object model.
+     * @since 2.1.8
+     */
+    Map getObjectModel();
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java?rev=230796&r1=230795&r2=230796&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
Mon Aug  8 05:54:55 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;
@@ -59,7 +60,7 @@
     protected ServiceManager manager;
 
     /** The portal service */
-    protected PortalService portalService;
+    protected final PortalService portalService;
 
     protected String profileManagerRole;
     protected ProfileManager profileManager;
@@ -84,6 +85,8 @@
     protected String portalManagerRole;
     protected PortalManager portalManager;
 
+    protected final Context context;
+
     /**
      * Create a new portal component manager. Each portal has a own
      * component manager that manages all central components for this
@@ -92,8 +95,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;
     }
 
     /* (non-Javadoc)
@@ -253,5 +257,12 @@
             }
         }
         return this.portalManager;
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.PortalComponentManager#getComponentContext()
+     */
+    public Context getComponentContext() {
+        return this.context;
     }
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java?rev=230796&r1=230795&r2=230796&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
Mon Aug  8 05:54:55 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 );
@@ -282,4 +282,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