portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r911881 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/window/impl/ jetspeed-api/src/main/java/org/apa...
Date Fri, 19 Feb 2010 17:58:50 GMT
Author: rwatler
Date: Fri Feb 19 17:58:50 2010
New Revision: 911881

URL: http://svn.apache.org/viewvc?rev=911881&view=rev
Log:
ensure PortletWindow.getPortletEntityId() returns fragment id to define portlet preferences
scope

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/window/impl/PortletWindowImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java?rev=911881&r1=911880&r2=911881&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
Fri Feb 19 17:58:50 2010
@@ -232,6 +232,14 @@
     }
 
     /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#getFragmentId()
+     */
+    public String getFragmentId()
+    {
+        return ((fragment != null) ? fragment.getId() : null);
+    }
+    
+    /* (non-Javadoc)
      * @see org.apache.jetspeed.om.page.ContentFragment#getFragments()
      */
     public List getFragments()

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/window/impl/PortletWindowImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/window/impl/PortletWindowImpl.java?rev=911881&r1=911880&r2=911881&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/window/impl/PortletWindowImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/window/impl/PortletWindowImpl.java
Fri Feb 19 17:58:50 2010
@@ -57,6 +57,7 @@
     private static final long serialVersionUID = 6578938580906866201L;
     
     private String id;
+    private String portletEntityId;
     private ContentFragment fragment;
     private Map<String, Object> attributes;
     
@@ -90,6 +91,7 @@
     {
         this.requestContext = requestContext;
         this.id = fragment.getId();
+        this.portletEntityId = fragment.getFragmentId();
         this.fragment = fragment;
         this.pd = pd;
         this.valid = pd != null;
@@ -102,6 +104,8 @@
 
     public String getWindowId()
     {
+        // return unique content fragment id that will
+        // identify a unique portlet window per page
         return id;
     }
 
@@ -117,7 +121,11 @@
     
     public String getPortletEntityId()
     {
-        return id;
+        // return unique fragment id that will identify
+        // a unique fragment per portal that may appear
+        // in multiple pages or potentially multiple times
+        // in a single page
+        return portletEntityId;
     }
 
     public String toString()
@@ -127,6 +135,8 @@
     
     public String getStringId()
     {
+        // return unique content fragment id that will
+        // identify a unique portlet window per page
         return id;
     }
     

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java?rev=911881&r1=911880&r2=911881&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java
Fri Feb 19 17:58:50 2010
@@ -71,10 +71,10 @@
     /************** BaseElement **************/
 
     /**
-     * Returns the unique Id of this element. This id is guaranteed to be unique
-     * from the complete portal and is suitable to be used as a unique key.
+     * Returns the unique fully qualified id of this element. This id is guaranteed
+     * to be unique within the portal and is suitable to be used as a key.
      *
-     * @return the unique id of this element.
+     * @return the unique fully qualified id of this element.
      */
     String getId();
 
@@ -410,6 +410,16 @@
     /************** ContentFragment **************/
 
     /**
+     * Returns the unique fragment id of this element. This id is guaranteed to be
+     * unique per fragment within the portal and is suitable to be used as a key.
+     * Note that multiple content fragments can have the same fragment id since
+     * a single fragment may be rendered multiple times within a page.
+     *
+     * @return the unique fragment id of this element.
+     */
+    String getFragmentId();
+
+    /**
      * 
      * <p>
      * getRenderedContent



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message