[jboss-svn-commits] JBoss Portal SVN: r5262 - in trunk: core/src/main/org/jboss/portal/core/controller/command core/src/main/org/jboss/portal/core/model/portal theme/src/main/org/jboss/portal/theme/page theme/src/main/org/jboss/portal/theme/render

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Sep 26 09:13:56 EDT 2006


Author: julien at jboss.com
Date: 2006-09-26 09:13:46 -0400 (Tue, 26 Sep 2006)
New Revision: 5262

Removed:
   trunk/theme/src/main/org/jboss/portal/theme/page/MarkupContainer.java
Modified:
   trunk/core/src/main/org/jboss/portal/core/controller/command/MarkupCommand.java
   trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java
   trunk/theme/src/main/org/jboss/portal/theme/page/Region.java
   trunk/theme/src/main/org/jboss/portal/theme/page/WindowContext.java
   trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java
Log:
removed unnecessary interface

Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/MarkupCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/MarkupCommand.java	2006-09-26 12:55:29 UTC (rev 5261)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/MarkupCommand.java	2006-09-26 13:13:46 UTC (rev 5262)
@@ -68,7 +68,6 @@
 import org.jboss.portal.theme.PageRendition;
 import org.jboss.portal.theme.navigation.PageNavigationalState;
 import org.jboss.portal.theme.navigation.WindowNavigationalState;
-import org.jboss.portal.theme.page.MarkupContainer;
 import org.jboss.portal.theme.page.ModifiableWindowResult;
 import org.jboss.portal.theme.page.PageService;
 import org.jboss.portal.theme.page.WindowResult;
@@ -122,7 +121,7 @@
    private final String pageRef;
 
    /** . */
-   private final MarkupContainer markupContainer;
+   private final Object markupContainer;
 
    /** . */
    private Portal portal;
@@ -156,7 +155,7 @@
     * @param markupContainer the fragment to render (the region or the window); if the argument is null, the entire page
     *                        will be rendered
     */
-   public MarkupCommand(String pageRef, MarkupContainer markupContainer)
+   public MarkupCommand(String pageRef, Object markupContainer)
    {
       if (pageRef == null)
       {
@@ -231,7 +230,7 @@
     *
     * @return the region or window to render as part of this request
     */
-   public MarkupContainer getMarkupContainer()
+   public Object getMarkupContainer()
    {
       return markupContainer;
    }

Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java	2006-09-26 12:55:29 UTC (rev 5261)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java	2006-09-26 13:13:46 UTC (rev 5262)
@@ -21,13 +21,11 @@
 */
 package org.jboss.portal.core.model.portal;
 
-import org.jboss.portal.theme.page.MarkupContainer;
-
 /**
  * @author <a href="mailto:mholzner at novell.com">Martin Holzner</a>
  * @version $Revision$
  */
-public interface Page extends PageContainer, MarkupContainer
+public interface Page extends PageContainer
 {
    /**
     * Return the portal containing this page.

Deleted: trunk/theme/src/main/org/jboss/portal/theme/page/MarkupContainer.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/page/MarkupContainer.java	2006-09-26 12:55:29 UTC (rev 5261)
+++ trunk/theme/src/main/org/jboss/portal/theme/page/MarkupContainer.java	2006-09-26 13:13:46 UTC (rev 5262)
@@ -1,33 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.portal.theme.page;
-
-/**
- * A region, window, portlet content to be rendered.
- *
- * @author <a href="mailto:mholzner at novell.com">Martin Holzner</a>
- * @version $Revision$
- */
-public interface MarkupContainer
-{
-   String getId();
-}

Modified: trunk/theme/src/main/org/jboss/portal/theme/page/Region.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/page/Region.java	2006-09-26 12:55:29 UTC (rev 5261)
+++ trunk/theme/src/main/org/jboss/portal/theme/page/Region.java	2006-09-26 13:13:46 UTC (rev 5262)
@@ -32,7 +32,7 @@
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision$
  */
-public final class Region implements MarkupContainer
+public final class Region
 {
    private final String name;
    private boolean sorted;

Modified: trunk/theme/src/main/org/jboss/portal/theme/page/WindowContext.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/page/WindowContext.java	2006-09-26 12:55:29 UTC (rev 5261)
+++ trunk/theme/src/main/org/jboss/portal/theme/page/WindowContext.java	2006-09-26 13:13:46 UTC (rev 5262)
@@ -33,7 +33,7 @@
  * @author <a href="mailto:mholzner at novell.com">Martin Holzner</a>
  * @version $Revision$
  */
-public final class WindowContext implements MarkupContainer, Comparable, Serializable
+public final class WindowContext implements Comparable, Serializable
 {
    /** The serialVersionUID */
    private static final long serialVersionUID = -225656969004976637L;

Modified: trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java
===================================================================
--- trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java	2006-09-26 12:55:29 UTC (rev 5261)
+++ trunk/theme/src/main/org/jboss/portal/theme/render/RenderContext.java	2006-09-26 13:13:46 UTC (rev 5262)
@@ -29,7 +29,6 @@
 import org.jboss.portal.theme.LayoutInfo;
 import org.jboss.portal.theme.PortalLayout;
 import org.jboss.portal.theme.ThemeConstants;
-import org.jboss.portal.theme.page.MarkupContainer;
 import org.jboss.portal.theme.page.Region;
 import org.jboss.portal.theme.page.RegionOrientation;
 import org.jboss.portal.theme.page.RegionResult;
@@ -60,11 +59,11 @@
    private RegionOrientation orientation;
 
    private StringBuffer markup;
-   private MarkupContainer fragment;
+   private Object fragment;
    private HTTPStreamInfo streamInfo;
 
    // initialize
-   private void init(PortalLayout layout, MarkupContainer fragment, HTTPStreamInfo streamInfo, MarkupResult result, ServerRequest request)
+   private void init(PortalLayout layout, Object fragment, HTTPStreamInfo streamInfo, MarkupResult result, ServerRequest request)
    {
       this.renderSet = layout.getServiceInfo().getRenderSet(layout.getLayoutInfo(), streamInfo, result);
       if (renderSet == null)
@@ -92,7 +91,7 @@
       }
    }
 
-   private RenderContext(PortalLayout layout, MarkupContainer markupContainer, HTTPStreamInfo streamInfo, MarkupResult result, ServerRequest request)
+   private RenderContext(PortalLayout layout, Object markupContainer, HTTPStreamInfo streamInfo, MarkupResult result, ServerRequest request)
    {
       init(layout, markupContainer, streamInfo, result, request);
    }
@@ -481,7 +480,8 @@
          if (fragment instanceof WindowContext)
          {
             // render the window
-            WindowResult windowResult = result.getWindowResult(fragment.getId());
+            WindowContext wc = (WindowContext)fragment;
+            WindowResult windowResult = result.getWindowResult(wc.getId());
             getWindowRenderer(windowResult).render(this, (WindowContext)fragment, windowResult);
          }
          else if (fragment instanceof Region)




More information about the jboss-svn-commits mailing list