portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r766661 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/ components/jetspeed-portal/src/main/java/org/apac...
Date Mon, 20 Apr 2009 11:34:59 GMT
Author: woonsan
Date: Mon Apr 20 11:34:59 2009
New Revision: 766661

URL: http://svn.apache.org/viewvc?rev=766661&view=rev
Log:
JS2-961: Removes header aggregation valve from the portal and configure pipeline.
Also, constant name changes because dojo library inclusion should be unique and so it should
be dependent on ID attribute.

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/DOMUtils.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java?rev=766661&r1=766660&r2=766661&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/impl/PortletRenderResponseContextImpl.java
Mon Apr 20 11:34:59 2009
@@ -155,7 +155,7 @@
             try
             {
                 // ID attribute of element is used as keyHint for the head element if available.
-                this.portletContent.addHeadElement(headElement, getIdAttribute(element));
+                this.portletContent.addHeadElement(headElement, DOMUtils.getIdAttribute(element));
             }
             catch (NotSerializableException e)
             {
@@ -167,22 +167,4 @@
         }
     }
     
-    private String getIdAttribute(Element element)
-    {
-        String value = null;
-        
-        if (element != null)
-        {
-            if (element.hasAttribute("id"))
-                value = element.getAttribute("id");
-            else if (element.hasAttribute("ID"))
-                value = element.getAttribute("ID");
-            else if (element.hasAttribute("Id"))
-                value = element.getAttribute("Id");
-            else if (element.hasAttribute("iD"))
-                value = element.getAttribute("iD");
-        }
-        
-        return value;
-    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/DOMUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/DOMUtils.java?rev=766661&r1=766660&r2=766661&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/DOMUtils.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/DOMUtils.java
Mon Apr 20 11:34:59 2009
@@ -239,4 +239,23 @@
         return html;
     }
     
+    public static String getIdAttribute(Element element)
+    {
+        String value = null;
+        
+        if (element != null)
+        {
+            if (element.hasAttribute("id"))
+                value = element.getAttribute("id");
+            else if (element.hasAttribute("ID"))
+                value = element.getAttribute("ID");
+            else if (element.hasAttribute("Id"))
+                value = element.getAttribute("Id");
+            else if (element.hasAttribute("iD"))
+                value = element.getAttribute("iD");
+        }
+        
+        return value;
+    }
+    
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java?rev=766661&r1=766660&r2=766661&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
Mon Apr 20 11:34:59 2009
@@ -862,10 +862,8 @@
         {
             for (KeyValue<String, Element> kvPair : getHeadElements(f))
             {
-                Element element = kvPair.getValue();
-                
-                if (element.hasAttribute(HeaderPhaseSupportConstants.HEAD_ELEMENT_CONTRIBUTION_MERGE_HINT_ATTRIBUTE)

-                                && HeaderPhaseSupportConstants.HEAD_ELEMENT_CONTRIBUTION_MERGE_HINT_KEY_DOJO_JS_INCLUDE.equals(element.getAttribute(HeaderPhaseSupportConstants.HEAD_ELEMENT_CONTRIBUTION_MERGE_HINT_ATTRIBUTE)))
+                if (HeaderPhaseSupportConstants.HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_DOJO_LIBRARY_INCLUDE
+                                .equals(DOMUtils.getIdAttribute(kvPair.getValue())))
                 {
                     return true;
                 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java?rev=766661&r1=766660&r2=766661&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
Mon Apr 20 11:34:59 2009
@@ -33,11 +33,11 @@
     /**
      * An attribute value for key hint which can be used in head elements merging by portal.
 
      */
-    public static final String HEAD_ELEMENT_CONTRIBUTION_MERGE_HINT_KEY_DOJO_JS_INCLUDE =
"dojo.js.include";
-    
-    /**
-     * An attribute value for key hint which can be used in head elements merging by portal.
 
-     */
     public static final String HEAD_ELEMENT_CONTRIBUTION_MERGE_HINT_KEY_DOJO_REQUIRE = "dojo.require";
 
+    /**
+     * An ID attribute value which can be used in head elements merging by portal.  
+     */
+    public static final String HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_DOJO_LIBRARY_INCLUDE
= "dojo.library.include";
+    
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml?rev=766661&r1=766660&r2=766661&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/aggregation.xml
Mon Apr 20 11:34:59 2009
@@ -155,31 +155,6 @@
     </bean>
   -->
 
-  <bean id="HeaderAggregatorPortal" class="org.apache.jetspeed.aggregator.impl.HeaderAggregatorImpl">
-    <meta key="j2:cat" value="default" />
-    <constructor-arg index="0">
-      <ref bean="portletFactory" />
-    </constructor-arg>
-    <constructor-arg index="1">
-      <ref bean="org.apache.jetspeed.headerresource.HeaderResourceFactory" />
-    </constructor-arg>
-    <constructor-arg index="2" type="boolean">
-      <value>false</value><!-- isDesktop == false -->
-    </constructor-arg>
-    <constructor-arg index="3">
-      <ref bean="HeaderResourceConfigurationPortal" />
-    </constructor-arg>
-    <constructor-arg index="4">
-      <ref bean="HeaderResourceRegistry" />
-    </constructor-arg>
-    <constructor-arg index="5">
-      <ref bean="DecorationFactory" />
-    </constructor-arg>
-
-    <!-- Uncomment this to HARD CODE your portal URL -->
-    <!-- <constructor-arg><ref bean="BasePortalURL"/></constructor-arg>
 -->
-  </bean>
-
   <bean id="HeaderAggregatorDesktop" class="org.apache.jetspeed.aggregator.impl.HeaderAggregatorImpl">
     <meta key="j2:cat" value="default" />
     <constructor-arg index="0">

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml?rev=766661&r1=766660&r2=766661&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
Mon Apr 20 11:34:59 2009
@@ -271,14 +271,6 @@
     </constructor-arg>
   </bean>
 
-  <bean id="headerAggregatorValvePortal" class="org.apache.jetspeed.aggregator.HeaderAggregatorValve"
-    init-method="initialize">
-    <meta key="j2:cat" value="default" />
-    <constructor-arg>
-      <ref bean="HeaderAggregatorPortal" />
-    </constructor-arg>
-  </bean>
-
   <bean id="headerAggregatorValveDesktop" class="org.apache.jetspeed.aggregator.HeaderAggregatorValve"
     init-method="initialize">
     <meta key="j2:cat" value="default" />
@@ -499,7 +491,6 @@
           <ref bean="cleanupPortalURLValve"/>
         -->
         <ref bean="DecorationValve" />
-        <ref bean="headerAggregatorValvePortal" />
         <ref bean="aggregatorValve" />
         <ref bean="cleanUpValve" />
       </list>
@@ -524,7 +515,6 @@
         <ref bean="actionValve" />
         <ref bean="resourceValve" />
         <ref bean="DecorationValve" />
-        <ref bean="headerAggregatorValvePortal" />
         <ref bean="aggregatorValve" />
         <ref bean="cleanUpValve" />
       </list>



---------------------------------------------------------------------
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