roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r418337 - in /incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering: model/PageRenderModel.java util/WeblogEntriesPager.java
Date Fri, 30 Jun 2006 17:27:15 GMT
Author: agilliland
Date: Fri Jun 30 10:27:15 2006
New Revision: 418337

URL: http://svn.apache.org/viewvc?rev=418337&view=rev
Log:
removing static getWeblogEntriesPager() method and pushing that logic into page render model.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/util/WeblogEntriesPager.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageRenderModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageRenderModel.java?rev=418337&r1=418336&r2=418337&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageRenderModel.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PageRenderModel.java
Fri Jun 30 10:27:15 2006
@@ -19,7 +19,6 @@
 package org.apache.roller.ui.rendering.model;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
@@ -41,8 +40,9 @@
 import org.apache.roller.pojos.wrapper.WeblogEntryDataWrapper;
 import org.apache.roller.pojos.wrapper.WebsiteDataWrapper;
 import org.apache.roller.ui.authoring.struts.formbeans.CommentFormEx;
-import org.apache.roller.ui.core.RollerSession;
+import org.apache.roller.ui.rendering.util.WeblogEntriesCollectionPager;
 import org.apache.roller.ui.rendering.util.WeblogEntriesPager;
+import org.apache.roller.ui.rendering.util.WeblogEntriesPermalinkPager;
 import org.apache.roller.ui.rendering.util.WeblogPageRequest;
 
 
@@ -108,8 +108,11 @@
         weblog = umgr.getWebsiteByHandle(parsed.getWeblogHandle(), Boolean.TRUE);
         
         // get the entry pager which represents this page
-        this.pager = WeblogEntriesPager.getWeblogEntriesPager(
-                weblog, entryAnchor, dateString, categoryPath, page);
+        if (entryAnchor != null) {
+            this.pager = new WeblogEntriesPermalinkPager(weblog, entryAnchor);
+        } else {
+            this.pager = new WeblogEntriesCollectionPager(weblog, dateString, categoryPath,
page);
+        }
     }
     
     

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/util/WeblogEntriesPager.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/util/WeblogEntriesPager.java?rev=418337&r1=418336&r2=418337&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/util/WeblogEntriesPager.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/util/WeblogEntriesPager.java
Fri Jun 30 10:27:15 2006
@@ -26,22 +26,6 @@
 public abstract class WeblogEntriesPager {
     
     
-    public static WeblogEntriesPager getWeblogEntriesPager(
-            WebsiteData weblog,
-            String entryAnchor,
-            String dateString,
-            String catPath,
-            int page) {
-        
-        // determine which implementation to return
-        if (entryAnchor != null) {
-            return new WeblogEntriesPermalinkPager(weblog, entryAnchor);
-        } else {
-            return new WeblogEntriesCollectionPager(weblog, dateString, catPath, page);
-        }
-    }
-    
-    
     /**
      * A map of entries representing this collection.
      *



Mime
View raw message