cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r330253 - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal: pluto/om/ resources/js/
Date Wed, 02 Nov 2005 13:51:16 GMT
Author: cziegeler
Date: Wed Nov  2 05:50:53 2005
New Revision: 330253

URL: http://svn.apache.org/viewcvs?rev=330253&view=rev
Log:
Update javadocs, improve script

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionListImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityListImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletDefinitionListImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowListImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/resources/js/cocoon-portal.js

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionImpl.java
Wed Nov  2 05:50:53 2005
@@ -41,7 +41,6 @@
     protected String version;
     protected PortletDefinitionRegistryImpl registry;
 
-
     private ArrayList customPortletMode = new ArrayList();
     private ArrayList customPortletState = new ArrayList();
     private ArrayList userAttribute = new ArrayList();
@@ -55,23 +54,22 @@
 
     private String contextPath;
 
-    /*
-     * (non-Javadoc)
+    /**
      * @return The PortletDefinitionRegistryImpl.
      */
     public PortletDefinitionRegistryImpl getRegistry() {
         return this.registry;
     }
 
-    /*
-     * (non-Javadoc)
-     * @param service The PortletDefnitionRegistryImpl.
+    /**
+     *
+     * @param registry The PortletDefnitionRegistryImpl.
      */
     public void setRegistry(PortletDefinitionRegistryImpl registry) {
         this.registry = registry;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.portlet.PortletApplicationDefinition#getId()
      */
     public ObjectID getId() {
@@ -81,35 +79,35 @@
         return this.objectId;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.portlet.PortletApplicationDefinition#getVersion()
      */
     public String getVersion() {
         return this.version;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.portlet.PortletApplicationDefinition#getPortletDefinitionList()
      */
     public PortletDefinitionList getPortletDefinitionList() {
         return this.portlets;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.portlet.PortletApplicationDefinition#getWebApplicationDefinition()
      */
     public WebApplicationDefinition getWebApplicationDefinition() {
         return this.webApplication;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.pluto.om.common.Support#postLoad(java.lang.Object)
      */
     public void postLoad(Object parameter) throws Exception {
         ((Support)portlets).postLoad(parameter);
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.pluto.om.common.Support#preBuild(java.lang.Object)
      */
     public void preBuild(Object parameter) 
@@ -128,24 +126,23 @@
         structure2.add(servletMap);
 
         ((Support)portlets).preBuild(structure2);
-
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.pluto.om.common.Support#postBuild(java.lang.Object)
      */
     public void postBuild(Object parameter) throws Exception {
         // nothing to do 
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.pluto.om.common.Support#preStore(java.lang.Object)
      */
     public void preStore(Object parameter) throws Exception {
         ((Support)portlets).preStore(parameter);
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.pluto.om.common.Support#postStore(java.lang.Object)
      */
     public void postStore(Object parameter) throws Exception {
@@ -200,7 +197,6 @@
         this.version = version;
     }
 
-
     // not yet fully supported:
     public Collection getCustomPortletMode() {
         return customPortletMode;
@@ -243,5 +239,4 @@
     protected void setWebApplicationDefinition(WebApplicationDefinition webApplication) {
 
         this.webApplication = webApplication;
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionListImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionListImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionListImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationDefinitionListImpl.java
Wed Nov  2 05:50:53 2005
@@ -53,7 +53,7 @@
     public Iterator iterator() {
         return this.portletApplicationDefinitions.values().iterator();
     }
-    
+
     /**
      * Add a new portlet application definition
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityImpl.java
Wed Nov  2 05:50:53 2005
@@ -34,32 +34,31 @@
     protected PortletApplicationDefinition pd;
     
     /**
-     * Constructor
+     * Constructor.
      */
     public PortletApplicationEntityImpl(String id, PortletApplicationDefinition pd) {
         this.objectId = org.apache.cocoon.portal.pluto.om.common.ObjectIDImpl.createFromString(id);
         this.pd = pd;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.entity.PortletApplicationEntity#getId()
      */
     public ObjectID getId() {
         return this.objectId;
     }    
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.entity.PortletApplicationEntity#getPortletEntityList()
      */
     public PortletEntityList getPortletEntityList() {
         return this.portlets;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.entity.PortletApplicationEntity#getPortletApplicationDefinition()
      */
     public PortletApplicationDefinition getPortletApplicationDefinition() {
         return this.pd;
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityListImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityListImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityListImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletApplicationEntityListImpl.java
Wed Nov  2 05:50:53 2005
@@ -33,7 +33,7 @@
 public class PortletApplicationEntityListImpl
 implements PortletApplicationEntityList, PortletApplicationEntityListCtrl {
 
-    /** the portlet application entities */
+    /** the portlet application entities. */
     protected Map portletApplicationEntities = new HashMap();
 
     /** The registry */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletDefinitionListImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletDefinitionListImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletDefinitionListImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletDefinitionListImpl.java
Wed Nov  2 05:50:53 2005
@@ -48,7 +48,7 @@
     }
 
     // Support implementation.
-    
+
     public void preBuild(Object parameter) throws Exception {
         Vector structure = (Vector)parameter;
         PortletApplicationDefinition portletApplication = (PortletApplicationDefinition)structure.get(0);
@@ -66,10 +66,8 @@
             }
 
             ((Support)portlet).postBuild(servlet);
-
         }
     }
-    
 
     public void postBuild(Object parameter) throws Exception {
         // nothing to do 
@@ -102,5 +100,4 @@
         }
         return null;
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityImpl.java
Wed Nov  2 05:50:53 2005
@@ -44,7 +44,7 @@
     protected final PortalService service;
 
     /**
-     * Constructor
+     * Constructor.
      */
     PortletEntityImpl(PortletApplicationEntity pae,
                       CopletInstanceData cid, 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletEntityListImpl.java
Wed Nov  2 05:50:53 2005
@@ -37,23 +37,25 @@
 
     /** all portlet entities. */
     protected Map portlets = new HashMap();
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.pluto.om.entity.PortletEntityList#get(org.apache.pluto.om.common.ObjectID)
      */
     public PortletEntity get(ObjectID objectId) {
+        if ( objectId == null ) {
+            return null;
+        }
         return (PortletEntity)this.portlets.get(objectId);
     }
 
-
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.entity.PortletEntityList#iterator()
      */
     public Iterator iterator() {
         return this.portlets.values().iterator();
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.entity.PortletEntityListCtrl#add(org.apache.pluto.om.entity.PortletApplicationEntity,
java.lang.String)
      */
     public PortletEntity add(PortletApplicationEntity appEntity, String definitionId) {
@@ -64,11 +66,11 @@
         CopletInstanceData coplet = null;
         PortletEntity portletEntity = new PortletEntityImpl(pae, coplet, pd, registry.getPortalService());
         this.portlets.put(portletEntity.getId(), portletEntity);
-        
+
         return portletEntity;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.pluto.om.entity.PortletEntityListCtrl#add(org.apache.pluto.om.entity.PortletApplicationEntity,
java.lang.String)
      */
     public PortletEntity add(PortletApplicationEntity appEntity,
@@ -78,10 +80,10 @@
         PortletDefinition pd = registry.getPortletDefinition(ObjectIDImpl.createFromString(definitionId));
         PortletEntity portletEntity = new PortletEntityImpl(appEntity, coplet, pd, registry.getPortalService());
         this.portlets.put(portletEntity.getId(), portletEntity);
-        
+
         return portletEntity;
     }
-    
+
     /**
      * Remove an entity
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowImpl.java
Wed Nov  2 05:50:53 2005
@@ -26,20 +26,19 @@
  * @version $Id$
  */
 public class PortletWindowImpl implements PortletWindow, PortletWindowCtrl {
-        
-    
+
     private ObjectID objectId;
     private String id;
     private PortletEntity portletEntity;
     private CopletLayout layout;
-    
+
     public PortletWindowImpl(String id) {
         this.id = id;
     }
 
     // PortletWindow implementation.
 
-     /**
+    /**
      * Returns the identifier of this portlet instance window as object id
      *
      * @return the object identifier
@@ -50,7 +49,7 @@
         }
         return objectId;
     }
-    
+
     /**
      * Returns the portlet entity
      *
@@ -68,9 +67,9 @@
      */
     public void setId(String id) {
         this.id = id;
-        objectId = null;
+        this.objectId = null;
     }
-    
+
     /**
      * binds a portlet instance to this portlet window
      * 
@@ -83,7 +82,7 @@
     public CopletLayout getLayout() {
         return this.layout;
     }
-    
+
     public void setLayout(CopletLayout layout) {
         this.layout = layout;
     }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowListImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowListImpl.java?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowListImpl.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/pluto/om/PortletWindowListImpl.java
Wed Nov  2 05:50:53 2005
@@ -28,25 +28,24 @@
  */
 public class PortletWindowListImpl implements PortletWindowList, PortletWindowListCtrl {
 
-    private final HashMap windows;
+    protected final HashMap windows;
 
+    /**
+     * Constructor.
+     */
     public PortletWindowListImpl() {
         windows = new HashMap();
     }
 
-    // PortletWindowList implementation.
-
     /**
      * Returns the elements of this set
      * 
      * @return An iterator containg all elements
      */
     public java.util.Iterator iterator() {
-
         return windows.values().iterator();
     }
 
-
     /**
      * Returns the portlet window object of the given id
      *
@@ -56,6 +55,9 @@
      *         contain a portlet window with the given id
      **/
     public PortletWindow get(ObjectID id) {
+        if ( id == null ) {
+            return null;
+        }
         return (PortletWindow)windows.get(id.toString());
     }
 
@@ -67,7 +69,7 @@
      * @param window the porlet window to add
      **/
     public void add(PortletWindow window) {
-        if(window != null) {
+        if (window != null) {
             windows.put(window.getId().toString(), window);
         }
     }
@@ -78,7 +80,7 @@
      * @param id the Id of the portlet window which should be removed
      **/
     public void remove(ObjectID id) {
-        if(id != null) {
+        if (id != null) {
             windows.remove(id.toString());
         }
     }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/resources/js/cocoon-portal.js
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/resources/js/cocoon-portal.js?rev=330253&r1=330252&r2=330253&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/resources/js/cocoon-portal.js
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/resources/js/cocoon-portal.js
Wed Nov  2 05:50:53 2005
@@ -43,18 +43,17 @@
          return;
        }    
        var oldElement = document.getElementById(id);
+       // in some cases, the server sends a coplet that
+       // is currently not displayed. So it's not an
+       // error if the element can't be found.
+       if (oldElement) {
+         var newElement = cocoon.ajax.DOMUtils.importNode(content, document);
         
-       if (!oldElement) {
-         alert("no element '" + id + "' in source document");
-         return;
-       }
-    
-       var newElement = cocoon.ajax.DOMUtils.importNode(content, document);
-        
-       // Warn: it's replace(new, old)!!
-       oldElement.parentNode.replaceChild(newElement, oldElement);
-       // Ensure the new node has the correct id
-       newElement.setAttribute("id", id);
+         // Warn: it's replace(new, old)!!
+         oldElement.parentNode.replaceChild(newElement, oldElement);
+         // Ensure the new node has the correct id
+         newElement.setAttribute("id", id);
+       }    
      }
      updater.processResponse(doc, req);
   } else {



Mime
View raw message