cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r431862 - in /cocoon/trunk/blocks/cocoon-portal: cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/acting/helpers/ cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/ cocoon-portal-impl/src/main/java/...
Date Wed, 16 Aug 2006 08:21:35 GMT
Author: cziegeler
Date: Wed Aug 16 01:21:34 2006
New Revision: 431862

URL: http://svn.apache.org/viewvc?rev=431862&view=rev
Log:
Clean up layout handling

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/acting/helpers/LayoutMapping.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/AbstractContentEventAspect.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/FrameEventAspect.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/InternalEventReceiver.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutInstanceChangeAttributeEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/impl/DefaultLinkRenderer.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/LayoutFeatures.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/source/LayoutSourceFactory.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/TestProfileManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/java/org/apache/cocoon/portal/coplets/basket/BasketGenerator.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-tools-impl/src/main/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/adapter/WSRPAdapter.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/acting/helpers/LayoutMapping.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/acting/helpers/LayoutMapping.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/acting/helpers/LayoutMapping.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/acting/helpers/LayoutMapping.java
Wed Aug 16 01:21:34 2006
@@ -34,7 +34,7 @@
      * @see org.apache.cocoon.portal.acting.helpers.Mapping#getEvent(org.apache.cocoon.portal.PortalService,
java.lang.Object)
      */
     public Event getEvent(PortalService service, Object data) {
-        Layout layout = service.getProfileManager().getPortalLayout(null, this.layoutId);
+        Layout layout = service.getProfileManager().getLayout(this.layoutId);
         Event e = new LayoutJXPathEvent(layout, this.path, data);
         return e;
     }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/LayoutModule.java
Wed Aug 16 01:21:34 2006
@@ -24,7 +24,7 @@
 /**
  * This input module gives access to information stored in a layout object
  * by using JXPathExpressions.
- * The syntax to use is LAYOUT_ID/PATH or LAYOUT_KEY:LAYOUT_ID/PATH
+ * The syntax to use is LAYOUT_ID/PATH.
  *
  * @version $Id$
  */
@@ -47,15 +47,13 @@
         }
         // is the layout key specified?
         pos = key.indexOf(':');
-        String layoutKey = null;
         String layoutId = key;
         if ( pos != -1 ) {
-            layoutKey = key.substring(0, pos);
             layoutId = key.substring(pos + 1);
         }
 
         // get the layout
-        final Object layout = portalService.getProfileManager().getPortalLayout(layoutKey,
layoutId);
+        final Object layout = portalService.getProfileManager().getLayout(layoutId);
         Object value = layout;
         if ( layout != null && path != null ) {
             final JXPathContext jxpathContext = JXPathContext.newContext(layout);

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java
Wed Aug 16 01:21:34 2006
@@ -77,7 +77,7 @@
             // the skin is stored as a parameter on the root layout
             // if not, the global module is used
             // fallback is: common
-            final Layout rootLayout = this.portalService.getProfileManager().getPortalLayout(null,
null);
+            final Layout rootLayout = this.portalService.getProfileManager().getLayout(null);
             if ( rootLayout != null ) {
                 skinName = rootLayout.getParameter("skin");
             }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/AbstractContentEventAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/AbstractContentEventAspect.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/AbstractContentEventAspect.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/AbstractContentEventAspect.java
Wed Aug 16 01:21:34 2006
@@ -55,7 +55,7 @@
     /**
      * Custom publishing of an event.
      * The real values for the event are contained in the array
-     * starting with index 2!
+     * starting with index 1!
      * @param layout  The corresponding layout
      * @param values  The values contained in the request
      */
@@ -63,12 +63,12 @@
 
     /**
      * Publish the event.
-     * This method gets the layout object from the first two
-     * values and invokes {@link #publish(EventManager, Layout, String[])}.
+     * This method gets the layout object from the first
+     * value and invokes {@link #publish(EventManager, Layout, String[])}.
      * @param values The values contained in the request
      */
     protected void publish( PortalService service, String[] values) {
-        Layout layout = service.getProfileManager().getPortalLayout(values[0], values[1]
);
+        Layout layout = service.getProfileManager().getLayout(values[0] );
         if ( layout != null ) {
             this.publish( service, layout, values);
         }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/FrameEventAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/FrameEventAspect.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/FrameEventAspect.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/FrameEventAspect.java
Wed Aug 16 01:21:34 2006
@@ -35,7 +35,7 @@
     }
 
     protected int getRequiredValueCount() {
-        return 3;
+        return 2;
     }
 
     /**

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/aspect/impl/LinkEventAspect.java
Wed Aug 16 01:21:34 2006
@@ -35,7 +35,7 @@
     }
 
     protected int getRequiredValueCount() {
-        return 4;
+        return 3;
     }
 
     /**

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/InternalEventReceiver.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/InternalEventReceiver.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/InternalEventReceiver.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/InternalEventReceiver.java
Wed Aug 16 01:21:34 2006
@@ -86,7 +86,7 @@
      */
     public void inform(CopletInstanceSizingEvent event, PortalService service) {
         final CopletInstance cid = event.getTarget();
-        Layout rootLayout = service.getProfileManager().getPortalLayout(null, null);
+        Layout rootLayout = service.getProfileManager().getLayout(null);
         if ( cid != null ) {
             final int oldSize = cid.getSize();
             cid.setSize(event.getSize());
@@ -130,10 +130,10 @@
         CopletInstance cid = e.getTarget();
         // full screen?
         if ( cid.getSize() == CopletInstance.SIZE_FULLSCREEN ) {
-            Layout rootLayout = service.getProfileManager().getPortalLayout(null, null);
+            Layout rootLayout = service.getProfileManager().getLayout(null);
             LayoutFeatures.setFullScreenInfo(service, rootLayout, null);
         } else if ( cid.getSize() == CopletInstance.SIZE_MAXIMIZED ) {
-            Layout rootLayout = service.getProfileManager().getPortalLayout(null, null);
+            Layout rootLayout = service.getProfileManager().getLayout(null);
             CopletLayout layout = LayoutFeatures.searchLayout(service, cid.getId(), rootLayout);
             Item container = LayoutFeatures.searchItemForMaximizedCoplet(layout);
             if ( container != null ) {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutChangeParameterEvent.java
Wed Aug 16 01:21:34 2006
@@ -45,7 +45,7 @@
         final String layoutId = eventData.substring(0, pos);
         this.parameterName = eventData.substring(pos+1, pos2);
         this.value= eventData.substring(pos2+1);
-        this.target = service.getProfileManager().getPortalLayout(null, layoutId);
+        this.target = service.getProfileManager().getLayout(layoutId);
     }
 
     /**

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutInstanceChangeAttributeEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutInstanceChangeAttributeEvent.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutInstanceChangeAttributeEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/LayoutInstanceChangeAttributeEvent.java
Wed Aug 16 01:21:34 2006
@@ -50,7 +50,7 @@
         final String layoutId = eventData.substring(0, pos);
         this.attributeName = eventData.substring(pos+2, pos2);
         this.value= eventData.substring(pos2+1);
-        this.target = service.getProfileManager().getLayoutInstance(service.getProfileManager().getPortalLayout(null,
layoutId));
+        this.target = service.getProfileManager().getLayoutInstance(service.getProfileManager().getLayout(layoutId));
     }
 
     /**

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/layout/RemoveLayoutEvent.java
Wed Aug 16 01:21:34 2006
@@ -41,9 +41,9 @@
     public RemoveLayoutEvent(PortalService service, String eventData) {
         super(null);
         if ( eventData.charAt(0) == 'L' ) {
-            this.target = service.getProfileManager().getPortalLayout(null, eventData.substring(1));
+            this.target = service.getProfileManager().getLayout(eventData.substring(1));
         } else if ( eventData.charAt(0) == 'C' ) {
-            final Layout rootLayout = service.getProfileManager().getPortalLayout(null, null);
+            final Layout rootLayout = service.getProfileManager().getLayout(null);
             this.target = LayoutFeatures.searchLayout(service, eventData.substring(1), rootLayout);
           
         }
     }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PageLabelManager.java
Wed Aug 16 01:21:34 2006
@@ -228,7 +228,7 @@
     private Map initializeLabels(PortalService service) {
         Map map = new HashMap();
 
-        Layout rootLayout = service.getProfileManager().getPortalLayout(null, null);
+        Layout rootLayout = service.getProfileManager().getLayout(null);
         Layout portalLayout = LayoutFeatures.getFullScreenInfo(service, rootLayout);
         if (portalLayout == null) {
             portalLayout = rootLayout;

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
Wed Aug 16 01:21:34 2006
@@ -121,7 +121,7 @@
         // test for ajax request
         final Request req = ObjectModelHelper.getRequest(service.getProcessInfoProvider().getObjectModel());
         if ( AjaxHelper.isAjaxRequest(req) ) {
-            Layout rootLayout = profileManager.getPortalLayout(null, null);
+            Layout rootLayout = profileManager.getLayout(null);
             ch.startDocument();
             XMLUtils.startElement(ch, "coplets");
             final List changed = CopletInstanceFeatures.getChangedCopletInstanceDataObjects(service);
@@ -154,13 +154,13 @@
             if ( StringUtils.isNotEmpty(copletId) ) {
                 final CopletInstance cid = profileManager.getCopletInstance(copletId);
                 if ( cid != null ) {
-                    portalLayout = LayoutFeatures.searchLayout(service, cid.getId(), profileManager.getPortalLayout(null,
null));
+                    portalLayout = LayoutFeatures.searchLayout(service, cid.getId(), profileManager.getLayout(null));
                 }
             } else if ( StringUtils.isNotEmpty(layoutId) ) {
-                portalLayout = profileManager.getPortalLayout(null, layoutId);
+                portalLayout = profileManager.getLayout(layoutId);
             } else {
                 // first check for a full screen layout
-                Layout rootLayout = profileManager.getPortalLayout(null, layoutId);
+                Layout rootLayout = profileManager.getLayout(layoutId);
                 portalLayout = LayoutFeatures.getFullScreenInfo(service, rootLayout);
                 if ( portalLayout == null ) {
                     portalLayout = rootLayout;

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
Wed Aug 16 01:21:34 2006
@@ -236,7 +236,7 @@
                 if ( this.enableFullScreen ) {
                     boolean supportsFullScreen = CopletDefinitionFeatures.supportsFullScreenMode(cid.getCopletDefinition());
                     if ( supportsFullScreen ) {
-                        final Layout rootLayout = this.portalService.getProfileManager().getPortalLayout(null,
null);
+                        final Layout rootLayout = this.portalService.getProfileManager().getLayout(null);
                         final Layout fullScreenLayout = LayoutFeatures.getFullScreenInfo(this.portalService,
rootLayout);
                         if ( fullScreenLayout != null && fullScreenLayout.equals(
layout )) {
                             event = new CopletInstanceSizingEvent( cid, CopletInstance.SIZE_NORMAL
);

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/impl/DefaultLinkRenderer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/impl/DefaultLinkRenderer.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/impl/DefaultLinkRenderer.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/impl/DefaultLinkRenderer.java
Wed Aug 16 01:21:34 2006
@@ -43,19 +43,16 @@
     throws SAXException {
         try {
             LayoutFeatures.checkLayoutClass(layout, LinkLayout.class, true);
-            String layoutKey = null;
             String layoutId = null;
             final LayoutInstance instance = LayoutFeatures.getLayoutInstance(service, layout,
false);
             if ( instance != null ) {
-                layoutKey = (String)instance.getTemporaryAttribute("link-layout-key");
                 layoutId = (String)instance.getTemporaryAttribute("link-layout-id");    
           
             }
-            if ( layoutKey == null && layoutId == null){
+            if ( layoutId == null){
 				// get default values
-				layoutKey = ((LinkLayout)layout).getLayoutKey();
 				layoutId = ((LinkLayout)layout).getLayoutId();
 			}
-            this.processLayout(service.getProfileManager().getPortalLayout(layoutKey, layoutId),
service, handler);
+            this.processLayout(service.getProfileManager().getLayout(layoutId), service,
handler);
         } catch (LayoutException le) {
             throw new SAXException(le);
         }        

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/LayoutFeatures.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/LayoutFeatures.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/LayoutFeatures.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/LayoutFeatures.java
Wed Aug 16 01:21:34 2006
@@ -162,7 +162,7 @@
                 }
             } else if ( rootLayout instanceof LinkLayout && followLinks) {
                 final LinkLayout linkLayout = (LinkLayout)rootLayout;
-                return traverseLayout(service, service.getProfileManager().getPortalLayout(linkLayout.getLayoutKey(),
linkLayout.getLayoutId()), traverser);
+                return traverseLayout(service, service.getProfileManager().getLayout(linkLayout.getLayoutId()),
traverser);
             }
         }
         return null;

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/ProfileManager.java
Wed Aug 16 01:21:34 2006
@@ -36,16 +36,11 @@
     String ROLE = ProfileManager.class.getName();
 
     /**
-     * Get the portal layout defined by the layout key. This
-     * usually addresses the layout profile.
-     * With the optional subKey it's possible to retrieve
-     * a specific layout object in the profile defined by
-     * the layout key.
-     * @param profileName A key describing the layout or null for the default
+     * Get the portal layout defined by the layout id.
      * @param layoutID    The id of a layout object or null for the root object
      * @return The layout
      */
-	Layout getPortalLayout(String profileName, String layoutID);
+	Layout getLayout(String layoutID);
 
     /**
      * Get the coplet instance with the given id.

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
Wed Aug 16 01:21:34 2006
@@ -160,9 +160,9 @@
      */
     protected void login(PortalUser user) {
         super.login(user);
-        // TODO - we should move most of the stuff from getPortalLayout to here
+        // TODO - we should move most of the stuff from getLayout to here
         // for now we use a hack :)
-        this.getPortalLayout(null, null);
+        this.getLayout(null);
     }
 
     /**
@@ -281,13 +281,8 @@
         profile.remove(event.getTarget());
     }
 
-    /**
-     * @see org.apache.cocoon.portal.profile.ProfileManager#getPortalLayout(java.lang.String,
java.lang.String)
-     */
-    public Layout getPortalLayout(String layoutKey, String layoutId) {
-        if ( null == layoutKey ) {
-            layoutKey = this.portalService.getDefaultLayoutKey();
-        }
+    public Layout getLayout(String layoutId) {
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
 
         Profile profile = this.getUserProfile(layoutKey);
         if ( profile == null ) {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
Wed Aug 16 01:21:34 2006
@@ -59,14 +59,12 @@
     protected final PortalUser portalUser = new StaticPortalUser();
 
     /**
-     * @see org.apache.cocoon.portal.profile.ProfileManager#getPortalLayout(String, String)
+     * @see org.apache.cocoon.portal.profile.ProfileManager#getLayout(java.lang.String)
      */
-    public Layout getPortalLayout(String layoutKey, String layoutID) {
+    public Layout getLayout(String layoutID) {
         ProfileLS adapter = null;
         try {
-            if (layoutKey == null) {
-                layoutKey = this.portalService.getDefaultLayoutKey();
-            }
+            final String layoutKey = this.portalService.getDefaultLayoutKey();
 
             String serviceKey = LAYOUTKEY_PREFIX + layoutKey;
             Object[] objects = (Object[]) this.portalService.getAttribute(serviceKey);

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/source/LayoutSourceFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/source/LayoutSourceFactory.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/source/LayoutSourceFactory.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/source/LayoutSourceFactory.java
Wed Aug 16 01:21:34 2006
@@ -43,22 +43,15 @@
         String protocol = null;
 
         // remove the protocol
+        final String layoutKey;
         int position = location.indexOf(':') + 1;
         if (position != 0) {
             protocol = location.substring(0, position);
-            location = location.substring(position+2);
-        }
-        final int pos = location.indexOf(':');
-        final String profileKey;
-        final String layoutKey;
-        if ( pos == -1 ) {
-            profileKey = null;
-            layoutKey = location;
+            layoutKey = location.substring(position+2);
         } else {
-            profileKey = location.substring(0, pos);
-            layoutKey = location.substring(pos+1);
+            layoutKey = location;
         }
-        final Layout layout = this.portalService.getProfileManager().getPortalLayout(profileKey,
layoutKey);
+        final Layout layout = this.portalService.getProfileManager().getLayout(layoutKey);
         if ( layout == null ) {
             throw new IOException("Unable to get layout for: " + location);
         }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/CopletTransformer.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/transformation/CopletTransformer.java
Wed Aug 16 01:21:34 2006
@@ -162,10 +162,9 @@
             if ( layoutId == null ) {
                 throw new SAXException("Attribute 'id' must be specified on element " + LAYOUT_ELEM
+ ".");
             }
-            final String profile = attr.getValue("profile");
-            final Layout l = this.portalService.getProfileManager().getPortalLayout(profile,
layoutId);
+            final Layout l = this.portalService.getProfileManager().getLayout(layoutId);
             if ( l == null ) {
-                throw new SAXException("Unable to find layout with id '" + layoutId + "'
in profile '" + profile + "'.");
+                throw new SAXException("Unable to find layout with id '" + layoutId + "'.");
             }
             final JXPathContext jxpathContext = JXPathContext.newContext( l );
             final Object object = jxpathContext.getValue(expression);
@@ -203,7 +202,7 @@
                 if ( attr.getValue("layout") != null ) {
                     newAttrs.removeAttribute("layout");
                     final String layoutId = attr.getValue("layout");
-                    Layout layout = this.portalService.getProfileManager().getPortalLayout(null,
layoutId);
+                    Layout layout = this.portalService.getProfileManager().getLayout(layoutId);
                     if ( layout != null ) {
                         event = new LayoutJXPathEvent(layout, path, value);
                     }

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/TestProfileManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/TestProfileManager.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/TestProfileManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-portlet-impl/src/main/java/org/apache/cocoon/portal/pluto/TestProfileManager.java
Wed Aug 16 01:21:34 2006
@@ -132,7 +132,7 @@
                     }
                 }
                 if ( portletNames.size() > 0 ) {
-                    final CompositeLayout rootLayout = (CompositeLayout)this.getPortalLayout(null,
null);
+                    final CompositeLayout rootLayout = (CompositeLayout)this.getLayout(null);
                     // we only remove items and their layout but not the coplet instances
                     while ( rootLayout.getItems().size() > 0 ) {
                         rootLayout.removeItem(rootLayout.getItem(0));

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/java/org/apache/cocoon/portal/coplets/basket/BasketGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/java/org/apache/cocoon/portal/coplets/basket/BasketGenerator.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/java/org/apache/cocoon/portal/coplets/basket/BasketGenerator.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/java/org/apache/cocoon/portal/coplets/basket/BasketGenerator.java
Wed Aug 16 01:21:34 2006
@@ -277,7 +277,7 @@
                         XMLUtils.endElement(this.xmlConsumer, "store");
 
                         XMLUtils.createElement(this.xmlConsumer, "id", String.valueOf(ci.getId()));
-                        Event e = new ShowItemEvent(store, item, profileManager.getPortalLayout(null,
this.showLayoutId), this.showCopletId);
+                        Event e = new ShowItemEvent(store, item, profileManager.getLayout(this.showLayoutId),
this.showCopletId);
                         XMLUtils.createElement(this.xmlConsumer, "show-url", linkService.getLinkURI(e));
                         if (ci.size() != -1 ) {
                             XMLUtils.createElement(this.xmlConsumer, "size", String.valueOf(ci.size()));

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-tools-impl/src/main/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-tools-impl/src/main/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-tools-impl/src/main/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-tools-impl/src/main/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java
Wed Aug 16 01:21:34 2006
@@ -35,7 +35,7 @@
 		this.portalService = portalService;
 		this.componentManager = portalService;
 		this.profileManager = componentManager.getProfileManager();
-		this.portalLayout = profileManager.getPortalLayout(null, null);
+		this.portalLayout = profileManager.getLayout(null);
 	}
 
 	public PortalComponentManager getComponentManager() {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/adapter/WSRPAdapter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/adapter/WSRPAdapter.java?rev=431862&r1=431861&r2=431862&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/adapter/WSRPAdapter.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/adapter/WSRPAdapter.java
Wed Aug 16 01:21:34 2006
@@ -611,7 +611,7 @@
             if (windowState != null) {
                 if ( !windowState.equals(windowSession.getWindowState()) ) {
                     
-                    final Layout rootLayout = service.getProfileManager().getPortalLayout(null,
null);
+                    final Layout rootLayout = service.getProfileManager().getLayout(null);
                     final Layout layout = LayoutFeatures.searchLayout(service, coplet.getId(),
rootLayout);
                     final Layout fullScreenLayout = LayoutFeatures.getFullScreenInfo(service,
rootLayout);
                     if ( fullScreenLayout != null 



Mime
View raw message