rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject svn commit: r1091893 - /incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/
Date Wed, 13 Apr 2011 19:27:44 GMT
Author: mfranklin
Date: Wed Apr 13 19:27:43 2011
New Revision: 1091893

URL: http://svn.apache.org/viewvc?rev=1091893&view=rev
Log:
Updated model to reduce complexity

Added:
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Page.java
      - copied, changed from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPage.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/PageLayout.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Person.java
      - copied, changed from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPerson.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Region.java
      - copied, changed from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegion.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/RegionWidget.java
      - copied, changed from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegionWidget.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Widget.java
      - copied, changed from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IWidget.java
Removed:
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IColumn.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPage.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPerson.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPersonWidget.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegion.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegionWidget.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/ITab.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IWidget.java

Copied: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Page.java
(from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPage.java)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Page.java?p2=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Page.java&p1=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPage.java&r1=1091220&r2=1091893&rev=1091893&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPage.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Page.java
Wed Apr 13 19:27:43 2011
@@ -18,21 +18,64 @@
  */
 package org.apache.rave.portal.web.model;
 
-import java.util.Collection;
+import java.util.List;
 
 /**
- * A page, which consists of regions, and which may be owned by a user
+ * A page, which consists of regions, and which may be owned by a user (or other principal)
  */
-public interface IPage {
-	
-	public Collection <IRegion> getRegions();
-	
-	public void addRegion(IRegion region);
-	
-	public void removeRegion(IRegion region);
-	
-	public IPerson getOwner();
-	
-	public void setOwner(IPerson owner);
+public interface Page {
 
+    /**
+     * Gets the persistence unique identifier
+     *
+     * @return id of the persisted object; null if not persisted
+     */
+    Long getId();
+
+    void setId(Long id);
+
+    /**
+     * Get the name of the page that is displayed to the user
+     *
+     * @return  valid name
+     */
+    String getName();
+
+    void setName(String name);
+
+    /**
+     * Get the principal that owns the page and the widgets on it
+     *
+     * @return valid principal
+     */
+    Person getOwner();
+
+    void setOwner(Person owner);
+
+    /**
+     * Gets the order of the page instance in all pages for the owner
+     *
+     * @return valid, unique render sequence
+     */
+    long getRenderSeq();
+
+    void setRenderSeq(long renderSeq);
+
+    /**
+     * Get the {@link PageLayout}
+     *
+     * @return valid layout
+     */
+    PageLayout getPageLayout();
+
+    void setPageLayout(PageLayout layout);
+
+    /**
+     * Get the widget containing regions of the page
+     *
+     * @return valid list
+     */
+    List<Region> getRegions();
+
+    void setRegions(List<Region> regions);
 }

Added: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/PageLayout.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/PageLayout.java?rev=1091893&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/PageLayout.java
(added)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/PageLayout.java
Wed Apr 13 19:27:43 2011
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.rave.portal.web.model;
+
+/**
+ * Represents an organization of regions within a page that is supported by the
+ * rendering engine
+ */
+public interface PageLayout {
+
+    /**
+     * Gets the persistence unique identifier
+     *
+     * @return id of the persisted object; null if not persisted
+     */
+    Long getId();
+
+    void setId(Long id);
+
+    /**
+     * Gets the code used by the rendering engine to identify the page layout
+     *
+     * @return valid code known by rendering engine
+     */
+    String getCode();
+
+    void setCode(String code);
+
+    /**
+     * Gets the display name shown to users
+     *
+     * @return valid name
+     */
+    String getName();
+
+    void setName(String name);
+
+    /**
+     * Gets the number of regions supported by this page layout
+     *
+     * @return valid number of regions > 0
+     */
+    long getNumRegions();
+
+    void setNumRegions(long numRegions);
+}

Copied: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Person.java
(from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPerson.java)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Person.java?p2=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Person.java&p1=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPerson.java&r1=1091220&r2=1091893&rev=1091893&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IPerson.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Person.java
Wed Apr 13 19:27:43 2011
@@ -21,6 +21,6 @@ package org.apache.rave.portal.web.model
 /**
  * A person
  */
-public interface IPerson {
+public interface Person {
 
 }

Copied: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Region.java
(from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegion.java)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Region.java?p2=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Region.java&p1=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegion.java&r1=1091220&r2=1091893&rev=1091893&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegion.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Region.java
Wed Apr 13 19:27:43 2011
@@ -18,25 +18,27 @@
  */
 package org.apache.rave.portal.web.model;
 
-import java.util.Collection;
+import java.util.List;
 
 /**
- * A region of a page, which can contain widgets, or nested regions
+ * A region of a page, which can contain widget instances {@link RegionWidget}
  */
-public interface IRegion {
-	
-	public IPage getPage();
-	
-	public Collection<IRegionWidget> getRegionWidgets();
-	
-	public void addRegionWidget(IRegionWidget widget);
-	
-	public void removeRegionWidget(IRegionWidget widget);
-	
-	public Collection<IRegion> getRegions();
-	
-	public void addRegion(IRegion region);
-	
-	public void removeRegion(IRegion region);
+public interface Region {
+    /**
+     * Gets the persistence unique identifier
+     *
+     * @return id of the persisted object; null if not persisted
+     */
+    Long getId();
 
+    void setId(Long id);
+
+    /**
+     * Gets the ordered list of widget instances for the region
+     *
+     * @return valid list
+     */
+    List<RegionWidget> getRegionWidgets();
+
+    void setRegionWidgets(List<RegionWidget> regionWidgets);
 }

Copied: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/RegionWidget.java
(from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegionWidget.java)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/RegionWidget.java?p2=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/RegionWidget.java&p1=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegionWidget.java&r1=1091220&r2=1091893&rev=1091893&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IRegionWidget.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/RegionWidget.java
Wed Apr 13 19:27:43 2011
@@ -21,14 +21,41 @@ package org.apache.rave.portal.web.model
 /**
  * A widget within a region
  */
-public interface IRegionWidget {
-	
-	public IWidget getWidget();
-	
-	public void setWidget(IWidget widget);
-	
-	public IRegion getRegion();
-	
-	public void setRegion(IRegion region);
+public interface RegionWidget {
 
+    /**
+     * Gets the persistence unique identifier
+     *
+     * @return id of the persisted object; null if not persisted
+     */
+    Long getId();
+
+    void setId(Long id);
+
+    /**
+     * Gets the object that represents the metadata about the widget
+     *
+     * @return valid widget
+     */
+    Widget getWidget();
+
+    void setWidget(Widget widget);
+
+    /**
+     * Gets the render sequence of this gadget relative to other gadgets in the same region
+     *
+     * @return value >= 0
+     */
+    long getRenderSeq();
+
+    void setRenderSeq(long renderSeq);
+
+    /**
+     * Gets whether or not to render the gadget in collapsed mode
+     *
+     * @return true if render collapsed; false otherwise
+     */
+    boolean isCollapsed();
+
+    void setCollapsed(boolean collapsed);
 }

Copied: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Widget.java
(from r1091220, incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IWidget.java)
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Widget.java?p2=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Widget.java&p1=incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IWidget.java&r1=1091220&r2=1091893&rev=1091893&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/IWidget.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/model/Widget.java
Wed Apr 13 19:27:43 2011
@@ -21,10 +21,10 @@ package org.apache.rave.portal.web.model
 /**
  * A widget
  */
-public interface IWidget {
+public interface Widget {
 
-	public String getTitle(String locale);
+	String getTitle(String locale);
 	
-	public void setTitle(String title, String locale); 
+	void setTitle(String title, String locale); 
 	
 }



Mime
View raw message