Author: julien(a)jboss.com
Date: 2008-06-29 10:34:53 -0400 (Sun, 29 Jun 2008)
New Revision: 11195
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Constants.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DefaultLayout.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DesktopLayout.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Layout.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/LayoutFactory.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Orientation.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/RegionLayout.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/SimpleLayout.java
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java
Log:
moved layout code to another package
Modified:
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
---
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-06-29
14:33:41 UTC (rev 11194)
+++
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -41,10 +41,10 @@
import org.jboss.portal.presentation.model.ViewPort;
import org.jboss.portal.presentation.model.ViewPortScope;
import org.jboss.portal.presentation.model.UINode;
-import org.jboss.portal.presentation.model.layout.LayoutFactory;
-import org.jboss.portal.presentation.model.layout.Layout;
-import org.jboss.portal.presentation.model.layout.SimpleLayout;
-import org.jboss.portal.presentation.model.layout.Orientation;
+import org.jboss.portal.presentation.layout.LayoutFactory;
+import org.jboss.portal.presentation.layout.Layout;
+import org.jboss.portal.presentation.layout.SimpleLayout;
+import org.jboss.portal.presentation.layout.Orientation;
import org.jboss.portal.presentation.model.content.ContentFragment;
import org.jboss.portal.presentation.model.ui.UIContext;
import org.jboss.portal.presentation.model.ui.UIPage;
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java 2008-06-29
14:33:41 UTC (rev 11194)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -35,7 +35,7 @@
import org.jboss.portal.presentation.portal.model.node.PortalNode;
import org.jboss.portal.presentation.portal.model.node.PageNode;
import org.jboss.portal.presentation.portal.model.node.WindowNode;
-import org.jboss.portal.presentation.model.layout.Constants;
+import org.jboss.portal.presentation.layout.Constants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Constants.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/Constants.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Constants.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Constants.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class Constants
+{
+
+ /** . */
+ public static final String LAYOUT_ID =
"org.jboss.portal.presentation.layout_id";
+
+ /** . */
+ public static final String SIMPLE_LAYOUT = "simple";
+
+ /** . */
+ public static final String REGION_LAYOUT = "region";
+
+ /** . */
+ public static final String DESKTOP_LAYOUT = "desktop";
+
+ /** . */
+ public static final String SIMPLE_LAYOUT_ORIENTATION =
"org.jboss.portal.presentation.layout.simple.orientation";
+
+ /** . */
+ public static final String SIMPLE_LAYOUT_INDEX =
"org.jboss.portal.presentation.layout.simple.index";
+
+ /** . */
+ public static final String VERTICAL_ORIENTATION = "vertical";
+
+ /** . */
+ public static final String HORIZONTAL_ORIENTATION = "horizontal";
+
+ /** . */
+ public static final String REGION_LAYOUT_TEMPLATE =
"org.jboss.portal.presentation.layout.region.template";
+
+ /** . */
+ public static final String REGION_LAYOUT_NAME =
"org.jboss.portal.presentation.layout.region.name";
+
+ /** . */
+ public static final String REGION_LAYOUT_INDEX =
"org.jboss.portal.presentation.layout.region.index";
+
+ /** . */
+ public static final String DESKTOP_LAYOUT_X =
"org.jboss.portal.presentation.layout.desktop.x";
+
+ /** . */
+ public static final String DESKTOP_LAYOUT_Y =
"org.jboss.portal.presentation.layout.desktop.y";
+
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DefaultLayout.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/DefaultLayout.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DefaultLayout.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DefaultLayout.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class DefaultLayout implements Layout
+{
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DesktopLayout.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/DesktopLayout.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DesktopLayout.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/DesktopLayout.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+/**
+ * Desktop layout.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class DesktopLayout implements Layout
+{
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Layout.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/Layout.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Layout.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Layout.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface Layout
+{
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/LayoutFactory.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/LayoutFactory.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/LayoutFactory.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/LayoutFactory.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,135 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+import org.jboss.portal.presentation.model.ui.UIPane;
+import org.jboss.portal.presentation.model.ui.UIObject;
+import org.jboss.portal.presentation.model.UINode;
+import org.jboss.portal.presentation.state.StateType;
+
+import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.util.SetMap;
+
+import java.util.Collection;
+import java.util.TreeMap;
+import java.util.Comparator;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class LayoutFactory
+{
+
+ public Layout getLayout(UINode node)
+ {
+ UIPane pane = (UIPane)node.getObject();
+
+ //
+ String layoutId = pane.getProperty(StateType.STRUCTURAL, Constants.LAYOUT_ID,
String.class);
+
+ //
+ if (Constants.SIMPLE_LAYOUT.equals(layoutId))
+ {
+ String orientationValue = pane.getProperty(StateType.STRUCTURAL,
Constants.SIMPLE_LAYOUT_ORIENTATION, String.class);
+
+ //
+ Orientation orientation = Orientation.HORIZONTAL;
+
+ //
+ if (Constants.VERTICAL_ORIENTATION.equals(orientationValue))
+ {
+ orientation = Orientation.VERTICAL;
+ }
+
+ //
+ Collection<? extends UINode> chidrenNodes = node.getChildren();
+
+ //
+ if (chidrenNodes == null)
+ {
+ throw new IllegalStateException("No children found for the simple layout
" + pane.getId());
+ }
+
+ //
+ TreeMap<Integer, UINode> layoutNodes = new TreeMap<Integer,
UINode>();
+ for (UINode childNode : chidrenNodes)
+ {
+ UIObject child = childNode.getObject();
+
+ //
+ Integer index = child.getProperty(StateType.STRUCTURAL,
Constants.SIMPLE_LAYOUT_INDEX, Integer.class);
+
+ //
+ if (index != null)
+ {
+ layoutNodes.put(index, childNode);
+ }
+ }
+
+ //
+ return new SimpleLayout(orientation, layoutNodes.values());
+ }
+ else if (Constants.REGION_LAYOUT.equals(layoutId))
+ {
+ Collection<? extends UINode> chidrenNodes = node.getChildren();
+
+ //
+ SetMap<String, UINode> map = new SetMap<String,
UINode>(comparator);
+ for (UINode childNode : chidrenNodes)
+ {
+ UIObject child = childNode.getObject();
+
+ //
+ String regionName = child.getProperty(StateType.STRUCTURAL,
Constants.REGION_LAYOUT_NAME, String.class);
+ Integer regionIndex = child.getProperty(StateType.STRUCTURAL,
Constants.REGION_LAYOUT_INDEX, Integer.class);
+
+ //
+ if (regionName != null && regionIndex != null)
+ {
+ map.put(regionName, childNode);
+ }
+ }
+
+ //
+ return new RegionLayout(map);
+ }
+ else
+ {
+ throw new NotYetImplemented();
+ }
+ }
+
+ /** . */
+ private static final Comparator<UINode> comparator = new
Comparator<UINode>()
+ {
+ public int compare(UINode node1, UINode node2)
+ {
+ UIObject object1 = node1.getObject();
+ UIObject object2 = node2.getObject();
+ Integer index1 = object1.getProperty(StateType.STRUCTURAL,
Constants.REGION_LAYOUT_INDEX, Integer.class);
+ Integer index2 = object2.getProperty(StateType.STRUCTURAL,
Constants.REGION_LAYOUT_INDEX, Integer.class);
+ return index1.compareTo(index2);
+ }
+ };
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Orientation.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/Orientation.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Orientation.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/Orientation.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+/**
+ * An orientation.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public enum Orientation
+{
+ VERTICAL, HORIZONTAL
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/RegionLayout.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/RegionLayout.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/RegionLayout.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/RegionLayout.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+import org.jboss.portal.presentation.model.UINode;
+
+import org.jboss.portal.common.util.CollectionMap;
+
+import java.util.Set;
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class RegionLayout implements Layout
+{
+
+ /** . */
+ private final CollectionMap<String, UINode> map;
+
+ RegionLayout(CollectionMap<String, UINode> map)
+ {
+ this.map = map;
+ }
+
+ public Set<String> getRegionNames()
+ {
+ return map.keySet();
+ }
+
+ public Collection<? extends UINode> getNodes(String regionName)
+ {
+ return map.get(regionName);
+ }
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/SimpleLayout.java
(from rev 11193,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model/layout/SimpleLayout.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/SimpleLayout.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/layout/SimpleLayout.java 2008-06-29
14:34:53 UTC (rev 11195)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, 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.presentation.layout;
+
+import org.jboss.portal.presentation.model.UINode;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class SimpleLayout implements Layout
+{
+
+ /** . */
+ private final Orientation orientation;
+
+ /** . */
+ private final Collection<? extends UINode> nodes;
+
+ SimpleLayout(Orientation orientation, Collection<? extends UINode> nodes)
+ {
+ this.orientation = orientation;
+ this.nodes = nodes;
+ }
+
+ public Orientation getOrientation()
+ {
+ return orientation;
+ }
+
+ public Collection<? extends UINode> getNodes()
+ {
+ return nodes;
+ }
+}