cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: rev 53794 - in cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal: layout/renderer/aspect/impl pluto transformation
Date Tue, 05 Oct 2004 13:56:00 GMT
Author: cziegeler
Date: Tue Oct  5 06:56:00 2004
New Revision: 53794

Modified:
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicInformationProviderImpl.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicTitleServiceImpl.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletActionProviderImpl.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
Log:
Use temporary attributes for portlets

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/PortletWindowAspect.java
Tue Oct  5 06:56:00 2004
@@ -76,7 +76,7 @@
  * 
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: PortletWindowAspect.java,v 1.8 2004/04/25 20:09:34 haul Exp $
+ * @version CVS $Id$
  */
 public final class PortletWindowAspect 
 extends AbstractAspect 
@@ -118,7 +118,7 @@
         if ( config.rootTag ) {
             XMLUtils.startElement(contenthandler, config.tagName);
         }
-        final PortletWindow window = (PortletWindow)copletInstanceData.getAttribute("window");
+        final PortletWindow window = (PortletWindow)copletInstanceData.getTemporaryAttribute("window");
         if ( window == null ) {
             // no portlet window, so use a default behaviour
             XMLUtils.createElement(contenthandler, "title", copletInstanceData.getCopletData().getTitle());
@@ -127,7 +127,7 @@
                 ((PortletWindowImpl)window).setLayout((CopletLayout)layout);
             }
             
-            String title = (String) copletInstanceData.getAttribute("dynamic-title");
+            String title = (String) copletInstanceData.getTemporaryAttribute("dynamic-title");
             if ( title == null ) {
                 final PortletDefinition def = window.getPortletEntity().getPortletDefinition();
                 try {
@@ -144,7 +144,7 @@
                 DynamicInformationProvider dip = ips.getDynamicProvider((HttpServletRequest)
context.getObjectModel().get("portlet-request"));
                 
                 // Sizing
-                WindowState ws = (WindowState)copletInstanceData.getAttribute("window-state");

+                WindowState ws = (WindowState)copletInstanceData.getTemporaryAttribute("window-state");

                 if ( ws == null ) {
                     ws = WindowState.NORMAL;
                 }
@@ -172,7 +172,7 @@
                 }
 
                 // portlet modes
-                PortletMode pm = (PortletMode)copletInstanceData.getAttribute("portlet-mode");

+                PortletMode pm = (PortletMode)copletInstanceData.getTemporaryAttribute("portlet-mode");

                 if ( pm == null ) {
                     pm = PortletMode.VIEW;
                 }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicInformationProviderImpl.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicInformationProviderImpl.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicInformationProviderImpl.java
Tue Oct  5 06:56:00 2004
@@ -35,7 +35,7 @@
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: DynamicInformationProviderImpl.java,v 1.2 2004/03/05 13:02:14 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class DynamicInformationProviderImpl 
 implements DynamicInformationProvider {
@@ -81,7 +81,7 @@
      */
     public PortletMode getPortletMode(PortletWindow portletWindow) {
         final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
-        PortletMode pm = (PortletMode) cid.getAttribute("portlet-mode");
+        PortletMode pm = (PortletMode) cid.getTemporaryAttribute("portlet-mode");
         if ( pm == null ) {
             pm = PortletMode.VIEW;
         }
@@ -93,7 +93,7 @@
      */
     public PortletMode getPreviousPortletMode(PortletWindow portletWindow) {
         final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
-        PortletMode pm = (PortletMode) cid.getAttribute("previous-portlet-mode");
+        PortletMode pm = (PortletMode) cid.getTemporaryAttribute("previous-portlet-mode");
         return pm;
     }
 
@@ -102,7 +102,7 @@
      */
     public WindowState getWindowState(PortletWindow portletWindow) {
         final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
-        WindowState ws = (WindowState) cid.getAttribute("window-state");
+        WindowState ws = (WindowState) cid.getTemporaryAttribute("window-state");
         if ( ws == null ) {
             ws = WindowState.NORMAL;
         }
@@ -114,7 +114,7 @@
      */
     public WindowState getPreviousWindowState(PortletWindow portletWindow) {
         final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
-        WindowState ws = (WindowState) cid.getAttribute("previous-window-state");       

+        WindowState ws = (WindowState) cid.getTemporaryAttribute("previous-window-state");
       
         return ws;
     }
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicTitleServiceImpl.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicTitleServiceImpl.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/DynamicTitleServiceImpl.java
Tue Oct  5 06:56:00 2004
@@ -26,7 +26,7 @@
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: DynamicTitleServiceImpl.java,v 1.2 2004/03/05 13:02:14 bdelacretaz Exp
$
+ * @version CVS $Id$
  */
 public class DynamicTitleServiceImpl 
 implements DynamicTitleService {    
@@ -37,7 +37,7 @@
     public void setDynamicTitle(PortletWindow window,
                                 HttpServletRequest request,
                                 String dynamicTitle) {
-        ((PortletEntityImpl)window.getPortletEntity()).getCopletInstanceData().setAttribute("dynamic-title",
dynamicTitle);
+        ((PortletEntityImpl)window.getPortletEntity()).getCopletInstanceData().setTemporaryAttribute("dynamic-title",
dynamicTitle);
     }
                                 
 }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletActionProviderImpl.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletActionProviderImpl.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletActionProviderImpl.java
Tue Oct  5 06:56:00 2004
@@ -28,7 +28,7 @@
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: PortletActionProviderImpl.java,v 1.2 2004/03/05 13:02:14 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class PortletActionProviderImpl implements PortletActionProvider {
 
@@ -45,13 +45,13 @@
     public void changePortletMode(PortletMode mode) {
         if ( mode != null ) {
             final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
-            PortletMode pm = (PortletMode) cid.getAttribute("portlet-mode");
+            PortletMode pm = (PortletMode) cid.getTemporaryAttribute("portlet-mode");
             if ( (pm == null && !mode.equals(PortletMode.VIEW)) 
                 || (pm != null && !pm.equals(mode)) ) {
                 if ( pm != null ) {
-                    cid.setAttribute("previous-portlet-mode", pm);
+                    cid.setTemporaryAttribute("previous-portlet-mode", pm);
                 }
-                cid.setAttribute("portlet-mode", mode);
+                cid.setTemporaryAttribute("portlet-mode", mode);
             }
         }
     }
@@ -62,13 +62,13 @@
     public void changePortletWindowState(WindowState state) {
         if ( state != null ) {
             final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
-            WindowState ws = (WindowState) cid.getAttribute("window-state");
+            WindowState ws = (WindowState) cid.getTemporaryAttribute("window-state");
             if ( (ws == null && !state.equals(PortletMode.VIEW)) 
                 || (ws != null && !ws.equals(state)) ) {
                 if ( ws != null ) {
-                    cid.setAttribute("previous-window-state", ws);
+                    cid.setTemporaryAttribute("previous-window-state", ws);
                 }
-                cid.setAttribute("window-state", state);
+                cid.setTemporaryAttribute("window-state", state);
             }
         }
     }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/pluto/PortletURLProviderImpl.java
Tue Oct  5 06:56:00 2004
@@ -43,7 +43,7 @@
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: PortletURLProviderImpl.java,v 1.6 2004/03/19 07:24:12 cziegeler Exp
$
+ * @version CVS $Id$
  */
 public class PortletURLProviderImpl 
        implements PortletURLProvider, CopletInstanceEvent {
@@ -174,7 +174,7 @@
             Event sizingEvent = null;
             if ( cl != null ) {
                 final CopletInstanceData cid = cl.getCopletInstanceData();
-                WindowState oldState = (WindowState)cid.getAttribute("window-state"); 
+                WindowState oldState = (WindowState)cid.getTemporaryAttribute("window-state");

                 if ( oldState == null ) {
                     oldState = WindowState.NORMAL;
                 }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
Tue Oct  5 06:56:00 2004
@@ -98,7 +98,7 @@
      * Creates new CopletTransformer.
      */
     public CopletTransformer() {
-        super.defaultNamespaceURI = NAMESPACE_URI;
+        this.defaultNamespaceURI = NAMESPACE_URI;
     }
 
     /* (non-Javadoc)

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
Tue Oct  5 06:56:00 2004
@@ -57,6 +57,7 @@
  * @version CVS $Id$
  */
 public class NewEventLinkTransformer extends AbstractCopletTransformer {
+
     /**
      * The namespace URI to listen for.
      */
@@ -95,7 +96,7 @@
      * @see java.lang.Object#Object()
      */
     public NewEventLinkTransformer() {
-        super.defaultNamespaceURI = NAMESPACE_URI;
+        this.defaultNamespaceURI = NAMESPACE_URI;
     }
 
     /**
@@ -227,11 +228,10 @@
      * @param portalEvent value of the "cocoon-portal-event" parameter
      * @throws SAXException if sending the SAX events failed
      */
-    private void sendHiddenFields(
-        ContentHandler contentHandler,
-        String portalAction,
-        String portalEvent)
-        throws SAXException {
+    private void sendHiddenFields(ContentHandler contentHandler,
+                                  String portalAction,
+                                  String portalEvent)
+    throws SAXException {
         AttributesImpl attributes = new AttributesImpl();
         attributes.addAttribute("", "type", "type", "CDATA", "hidden");
         attributes.addAttribute(

Mime
View raw message