cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r377015 - in /cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal: coplet/ persistence/castor/ pluto/ pluto/om/ profile/
Date Sat, 11 Feb 2006 19:12:39 GMT
Author: cziegeler
Date: Sat Feb 11 11:12:36 2006
New Revision: 377015

URL: http://svn.apache.org/viewcvs?rev=377015&view=rev
Log:
Move pluto related stuff out off the core and add new preferences provider for advanced preference
handling

Added:
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/pluto.xml
  (with props)
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProvider.java
  (with props)
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProviderImpl.java
  (with props)
Removed:
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/Deploy.java
Modified:
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/CopletInstanceData.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/copletinstancedata.xml
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
    cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/CopletInstanceData.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/CopletInstanceData.java?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/CopletInstanceData.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/CopletInstanceData.java
Sat Feb 11 11:12:36 2006
@@ -18,10 +18,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl;
-import org.apache.pluto.om.common.PreferenceSet;
-
-
 /**
  * A coplet instance data describes an instance of a coplet.
  *
@@ -35,8 +31,6 @@
  *   SIZE_MAXIMIZED - the coplet gets the most available space, but still shares
  *                  its space with other coplets, e.g. a navigation etc.
  *
- * TODO - Remove dependency to pluto
- *
  * @version $Id$
  */
 public final class CopletInstanceData {
@@ -56,9 +50,6 @@
     /** Temporary attributes are not persisted. */
     transient protected Map temporaryAttributes = new HashMap();
 
-    /** Portlet preferences. */
-    protected PreferenceSetImpl preferences = new PreferenceSetImpl();
-
     /** The title of the coplet. */
     protected String title;
 
@@ -146,22 +137,6 @@
         this.title = title;
     }
 
-    public void setPreferences(PreferenceSetImpl preferences) {
-        this.preferences = preferences;
-    }
-
-    public PreferenceSet getPreferences() {
-        return this.preferences;
-    }
-
-    public PreferenceSet getCastorPreferences() {
-        return getPreferences();
-    }
-
-    public void setCastorPreferences(PreferenceSet castorPreferences) {
-        setPreferences((PreferenceSetImpl)castorPreferences);
-    }
-
     /**
      * @see java.lang.Object#clone()
      */
@@ -171,8 +146,6 @@
         clone.copletData = this.copletData;
         clone.attributes = new HashMap(this.attributes);
         clone.temporaryAttributes = new HashMap(this.temporaryAttributes);
-        clone.preferences = new PreferenceSetImpl();
-        clone.preferences.addAll(this.preferences.getPreferences());
 
         return clone;
     }

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/CastorSourceConverter.java
Sat Feb 11 11:12:36 2006
@@ -141,6 +141,7 @@
         this.mappingSources.put("copletbasedata", prefix + "copletbasedata.xml");
         this.mappingSources.put("copletdata", prefix + "copletdata.xml");
         this.mappingSources.put("copletinstancedata", prefix + "copletinstancedata.xml");
+        this.mappingSources.put("portletpreferences", prefix + "pluto.xml");
 
         // the custom configuration might overwrite the default config
         Configuration[] children = config.getChildren("mapping-source");

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/copletinstancedata.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/copletinstancedata.xml?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/copletinstancedata.xml
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/copletinstancedata.xml
Sat Feb 11 11:12:36 2006
@@ -24,24 +24,6 @@
     </field>
   </class>
 
-  <class name="org.apache.cocoon.portal.pluto.om.common.PreferenceImpl">
-    <field name="name" type="java.lang.String" required="true">
-      <bind-xml name="name" node="element"/>
-    </field>
-    <field name="castorValues" type="java.lang.String"
-           collection="collection" required="true">
-      <bind-xml name="value" node="element"/>
-    </field>
-  </class>
-
-  <class name="org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl">
-    <field name="preferences"
-           type="org.apache.cocoon.portal.pluto.om.common.PreferenceImpl"
-           collection="set">
-      <bind-xml name="preference" node="element"/>
-    </field>
-  </class>
-
   <class name="org.apache.cocoon.portal.persistence.castor.CollectionWrapper">
     <map-to xml="coplets" />
 
@@ -70,10 +52,6 @@
       <bind-xml name="attribute"/>
     </field>
 
-    <field name="castorPreferences" type="org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl">
-      <bind-xml name="preferences" node="element"/>
-    </field>
-
     <field name="title" type="java.lang.String" get-method="getInstanceTitle" set-method="setTitle">
       <bind-xml name="title"/>
     </field>
@@ -93,4 +71,3 @@
   </class>
 
 </mapping>
-

Added: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/pluto.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/pluto.xml?rev=377015&view=auto
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/pluto.xml
(added)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/pluto.xml
Sat Feb 11 11:12:36 2006
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<mapping>
+  <description>Mapping for Pluto related information like preferences</description>
+
+  <class name="org.apache.cocoon.portal.pluto.om.common.PreferenceImpl">
+    <field name="name" type="java.lang.String" required="true">
+      <bind-xml name="name" node="element"/>
+    </field>
+    <field name="castorValues" type="java.lang.String"
+           collection="collection" required="true">
+      <bind-xml name="value" node="element"/>
+    </field>
+  </class>
+
+  <class name="org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl">
+    <field name="preferences"
+           type="org.apache.cocoon.portal.pluto.om.common.PreferenceImpl"
+           collection="set">
+      <bind-xml name="preference" node="element"/>
+    </field>
+  </class>
+
+</mapping>
+

Propchange: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/pluto.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/persistence/castor/pluto.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletContainerEnvironmentImpl.java
Sat Feb 11 11:12:36 2006
@@ -112,6 +112,8 @@
                 this.init(new DynamicTitleServiceImpl()));
         this.staticServices.put(PropertyManagerService.class.getName(),
         		this.init(new PropertyManagerServiceImpl()));
+        this.staticServices.put(PortletPreferencesProvider.class.getName(),
+                this.init(new PortletPreferencesProviderImpl()));
     }
 
     /**

Added: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProvider.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProvider.java?rev=377015&view=auto
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProvider.java
(added)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProvider.java
Sat Feb 11 11:12:36 2006
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.portal.pluto;
+
+import org.apache.cocoon.portal.coplet.CopletInstanceData;
+import org.apache.pluto.om.common.PreferenceSet;
+
+/**
+ * $Id$
+ */
+public interface PortletPreferencesProvider {
+
+    PreferenceSet getPreferenceSet(CopletInstanceData cid);
+
+    void storePreferenceSet(CopletInstanceData cid);
+}

Propchange: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProvider.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProviderImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProviderImpl.java?rev=377015&view=auto
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProviderImpl.java
(added)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProviderImpl.java
Sat Feb 11 11:12:36 2006
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.portal.pluto;
+
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.cocoon.portal.coplet.CopletInstanceData;
+import org.apache.cocoon.portal.impl.AbstractComponent;
+import org.apache.cocoon.portal.pluto.om.common.PreferenceSetImpl;
+import org.apache.cocoon.portal.profile.ProfileLS;
+import org.apache.pluto.om.common.PreferenceSet;
+
+/**
+ * FIXME - We will use the ProfileLS for this with our own type: 
+ * $Id$
+ */
+public class PortletPreferencesProviderImpl
+    extends AbstractComponent
+    implements PortletPreferencesProvider {
+
+    protected static final String PROFILETYPE_PREFERENCES = "portletpreferences";
+
+    protected ProfileLS loader;
+
+    /**
+     * @see org.apache.cocoon.portal.impl.AbstractComponent#dispose()
+     */
+    public void dispose() {
+        if ( this.manager != null ) {
+            this.manager.release(this.loader);
+            this.loader = null;
+        }
+        super.dispose();
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.impl.AbstractComponent#service(org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service(ServiceManager manager) throws ServiceException {
+        super.service(manager);
+        this.loader = (ProfileLS)this.manager.lookup(ProfileLS.ROLE);
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.pluto.PortletPreferencesProvider#getPreferenceSet(org.apache.cocoon.portal.coplet.CopletInstanceData)
+     */
+    public PreferenceSet getPreferenceSet(CopletInstanceData cid) {
+        //final Map parameters = new HashMap();
+        //parameters.put(ProfileLS.PARAMETER_PROFILETYPE, PROFILETYPE_PREFERENCES);
+        //this.loader.loadProfile(key, parameters);
+        return new PreferenceSetImpl();
+    }
+
+    /**
+     * @see org.apache.cocoon.portal.pluto.PortletPreferencesProvider#storePreferenceSet(org.apache.cocoon.portal.coplet.CopletInstanceData)
+     */
+    public void storePreferenceSet(CopletInstanceData cid) {
+        //final Map parameters = new HashMap();
+        //parameters.put(ProfileLS.PARAMETER_PROFILETYPE, PROFILETYPE_PREFERENCES);
+        //this.loader.loadProfile(key, parameters);
+    }
+}

Propchange: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProviderImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletPreferencesProviderImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
Sat Feb 11 11:12:36 2006
@@ -15,9 +15,7 @@
  */
 package org.apache.cocoon.portal.pluto;
 
-import java.util.ArrayList;
 import java.util.Collections;
-import java.util.List;
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -32,7 +30,6 @@
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
 import org.apache.cocoon.portal.event.CopletInstanceEvent;
-import org.apache.cocoon.portal.event.Event;
 import org.apache.cocoon.portal.event.ConvertableEvent;
 import org.apache.cocoon.portal.layout.impl.CopletLayout;
 import org.apache.cocoon.portal.pluto.om.PortletEntityImpl;

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
Sat Feb 11 11:12:36 2006
@@ -20,7 +20,8 @@
 
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
-import org.apache.cocoon.portal.profile.ProfileManager;
+import org.apache.cocoon.portal.pluto.PortletPreferencesProvider;
+import org.apache.pluto.PortletContainerServices;
 import org.apache.pluto.om.common.Description;
 import org.apache.pluto.om.common.ObjectID;
 import org.apache.pluto.om.common.PreferenceSet;
@@ -42,6 +43,7 @@
     protected final CopletInstanceData coplet;
     protected final PortletApplicationEntity applicationEntity;
     protected final PortalService service;
+    protected final PortletPreferencesProvider prefProvider;
 
     /**
      * Constructor.
@@ -56,6 +58,8 @@
         this.definition = pd;
         this.applicationEntity = pae;
         this.service = service;
+        this.prefProvider = (PortletPreferencesProvider)PortletContainerServices.get(PortletPreferencesProvider.class);
+;
     }
     
     /**
@@ -97,7 +101,7 @@
      * @see org.apache.pluto.om.entity.PortletEntity#getPreferenceSet()
      */
     public PreferenceSet getPreferenceSet() {
-        return this.coplet.getPreferences();
+        return this.prefProvider.getPreferenceSet(this.coplet);
     }
 
     /**
@@ -133,8 +137,7 @@
      * @see org.apache.pluto.om.entity.PortletEntityCtrl#store()
      */
     public void store() throws IOException {
-        final ProfileManager manager = this.service.getProfileManager();
-        manager.saveUserCopletInstanceDatas(null);
+        this.prefProvider.storePreferenceSet(this.coplet);
     }
 
 }

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
Sat Feb 11 11:12:36 2006
@@ -21,6 +21,7 @@
 
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
 import org.apache.cocoon.portal.pluto.om.common.ObjectIDImpl;
+import org.apache.pluto.PortletContainerServices;
 import org.apache.pluto.om.common.ObjectID;
 import org.apache.pluto.om.entity.PortletApplicationEntity;
 import org.apache.pluto.om.entity.PortletEntity;
@@ -59,10 +60,10 @@
      * @see org.apache.pluto.om.entity.PortletEntityListCtrl#add(org.apache.pluto.om.entity.PortletApplicationEntity,
java.lang.String)
      */
     public PortletEntity add(PortletApplicationEntity appEntity, String definitionId) {
-        // FIXME
-        PortletDefinitionRegistry registry = null;
+        PortletDefinitionRegistry registry = (PortletDefinitionRegistry)PortletContainerServices.get(PortletDefinitionRegistry.class);
         PortletDefinition pd = registry.getPortletDefinition(ObjectIDImpl.createFromString(definitionId));
         PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
+        // FIXME
         CopletInstanceData coplet = null;
         PortletEntity portletEntity = new PortletEntityImpl(pae, coplet, pd, registry.getPortalService());
         this.portlets.put(portletEntity.getId(), portletEntity);

Modified: cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java?rev=377015&r1=377014&r2=377015&view=diff
==============================================================================
--- cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java
(original)
+++ cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java
Sat Feb 11 11:12:36 2006
@@ -25,9 +25,9 @@
 import org.apache.cocoon.portal.scratchpad.Profile;
 
 /**
- * The profile manager.
- * Via this component you can get the profile (or parts of it) of the
- * current 'user'.
+ * The profile manager provides access to the portal profile (or parts
+ * of it). The portal profile stores all information about the portal
+ * view of the current user, like the layout and the contained coplets.
  *
  * @version $Id$
  */
@@ -81,18 +81,6 @@
      * @param layoutKey
      */
     void saveUserProfiles(String layoutKey);
-
-    /**
-     * Save the layout
-     * @param layoutKey
-     */
-    void saveUserLayout(String layoutKey);
-
-    /**
-     * Save the coplet instance data
-     * @param layoutKey
-     */
-    void saveUserCopletInstanceDatas(String layoutKey);
 
     /**
      * Get all instances



Mime
View raw message