roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r421003 - in /incubator/roller/branches/roller_3.0: src/org/apache/roller/ui/rendering/model/ src/org/apache/roller/ui/rendering/servlets/ tests/org/apache/roller/util/ web/WEB-INF/classes/
Date Tue, 11 Jul 2006 21:54:14 GMT
Author: agilliland
Date: Tue Jul 11 14:54:12 2006
New Revision: 421003

URL: http://svn.apache.org/viewvc?rev=421003&view=rev
Log:
a little bit of tidy up with models.

- renamed RenderModel interface to just Model.
- renamed other model implemtation classes from XXXRenderModel to XXXModel.
- made rendering helper classes into actual Models.
- renamed the calendar and menu tag model names.


Added:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarHelper.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/MenuModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/EditorMenuHelper.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/Model.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ModelLoader.java
      - copied, changed from r420988, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModelLoader.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java
      - copied, changed from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesHelper.java
Removed:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarHelper.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/EditorMenuHelper.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModelLoader.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteRenderModel.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesHelper.java
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/servlets/CommentServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java
    incubator/roller/branches/roller_3.0/tests/org/apache/roller/util/UtilitiesTest.java
    incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarHelper.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarHelper.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarHelper.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/CalendarModel.java Tue Jul 11 14:54:12 2006
@@ -15,51 +15,66 @@
  * copyright in this work, please see the NOTICE file in the top level
  * directory of this distribution.
  */
+
 package org.apache.roller.ui.rendering.model;
 
-import java.util.Date;
+import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.PageContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.RollerException;
-import org.apache.roller.model.RollerFactory;
-import org.apache.roller.model.UserManager;
-import org.apache.roller.pojos.WebsiteData;
 import org.apache.roller.pojos.wrapper.WebsiteDataWrapper;
-
 import org.apache.roller.ui.core.tags.calendar.BigWeblogCalendarModel;
-import org.apache.roller.ui.core.tags.calendar.WeblogCalendarModel;
 import org.apache.roller.ui.core.LanguageUtil;
-import org.apache.roller.ui.core.tags.calendar.CalendarModel;
 import org.apache.roller.ui.core.tags.calendar.CalendarTag;
-import org.apache.roller.ui.rendering.util.WeblogPageRequest;
-import org.apache.roller.util.DateUtil;
+import org.apache.roller.ui.core.tags.calendar.WeblogCalendarModel;
+
 
 /**
- * Displays weblog calendar by calling hybrid JSP tag.
+ * Model which provides functionality for displaying weblog calendar.
+ * 
+ * Implemented by calling hybrid JSP tag.
  */
-public class CalendarHelper  {
-    private PageContext pageContext;
+public class CalendarModel implements Model {
+    
+    private static Log log = LogFactory.getLog(CalendarModel.class);
     
-    protected static Log log = 
-        LogFactory.getFactory().getInstance(CalendarHelper.class);
+    private PageContext pageContext = null;
     
-    /**
-     * Creates a new instance of CalendarHelper
-     */
-    public CalendarHelper(PageContext pageContext) {
-        this.pageContext = pageContext;
-    }  
     
-    public String emitWeblogCalendar(WebsiteDataWrapper websiteWrapper, String catArgument, boolean big) {        
+    /** Template context name to be used for model */
+    public String getModelName() {
+        return "calendarModel";
+    }
+    
+    
+    /** Init page model based on request */
+    public void init(Map initData) throws RollerException {
+        
+        // extract page context
+        this.pageContext = (PageContext) initData.get("pageContext");
+    }
+    
+    
+    public String showWeblogCalendar(WebsiteDataWrapper websiteWrapper, String catArgument) {        
+        return showWeblogCalendar(websiteWrapper, catArgument, false);
+    }
+    
+    
+    public String showWeblogCalendarBig(WebsiteDataWrapper websiteWrapper, String catArgument) { 
+        return showWeblogCalendar(websiteWrapper, catArgument, true);
+    }
+    
+    
+    private String showWeblogCalendar(WebsiteDataWrapper websiteWrapper, String catArgument, boolean big) {        
         HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
         HttpServletResponse response = (HttpServletResponse)pageContext.getResponse();                        
         if ("nil".equals(catArgument)) catArgument = null;        
         String ret = null;
         try {
-            CalendarModel model = null;
+            org.apache.roller.ui.core.tags.calendar.CalendarModel model = null;
             if (big) {
                 model = new BigWeblogCalendarModel(request, response, catArgument);
             } else {
@@ -67,7 +82,7 @@
             }
             
             // save model in JSP page context so CalendarTag can find it
-            pageContext.setAttribute("calendarModel",model);
+            pageContext.setAttribute("calendarModel", model);
             
             CalendarTag calTag = new CalendarTag();
             calTag.setPageContext(pageContext);
@@ -83,6 +98,5 @@
         }
         return ret;
     }
+    
 }
-
-

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigRenderModel.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigRenderModel.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigRenderModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ConfigModel.java Tue Jul 11 14:54:12 2006
@@ -28,9 +28,10 @@
 
 
 /**
- * New Atlas config page model provides access to site URLs and runtime configs.
+ * Model which provides access to application config data like site URLs and 
+ * config properties.
  */
-public class ConfigRenderModel implements RenderModel {
+public class ConfigModel implements Model {
     
     /** Hand-picked list of runtime properties to be made available */
     private static List allowedProperties = 
@@ -49,13 +50,7 @@
             "site.linkbacks.enabled",
             "site.newsfeeds.defaultEntries",
             "site.newsfeeds.maxEntries"
-    }); 
-    
-    
-    /**
-     * Creates a new instance of ConfigRenderModel
-     */
-    public ConfigRenderModel() {}
+    });
     
     
     /** Template context name to be used for model */

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedRenderModel.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedRenderModel.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedRenderModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/FeedModel.java Tue Jul 11 14:54:12 2006
@@ -43,15 +43,12 @@
 /**
  * Model provides information needed to render a feed.
  */
-public class FeedRenderModel implements RenderModel {
+public class FeedModel implements Model {
     
-    private WebsiteData        weblog = null;
-    private String             categoryPath = null;
+    private static Log log = LogFactory.getLog(FeedModel.class); 
     
-    protected static Log log = LogFactory.getLog(FeedRenderModel.class); 
-    
-    
-    public FeedRenderModel() {}
+    private WebsiteData weblog = null;
+    private String categoryPath = null;
     
     
     public void init(Map initData) throws RollerException {
@@ -63,6 +60,7 @@
         }
         
         categoryPath = parsed.getWeblogCategory();
+        
         Roller roller = RollerFactory.getRoller();
         UserManager umgr = roller.getUserManager();
         weblog = umgr.getWebsiteByHandle(parsed.getWeblogHandle(), Boolean.TRUE);

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/MenuModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/EditorMenuHelper.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/MenuModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/MenuModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/EditorMenuHelper.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/EditorMenuHelper.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/MenuModel.java Tue Jul 11 14:54:12 2006
@@ -15,32 +15,43 @@
  * copyright in this work, please see the NOTICE file in the top level
  * directory of this distribution.
  */
+
 package org.apache.roller.ui.rendering.model;
 
 import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.PageContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.roller.RollerException;
 import org.apache.roller.ui.core.tags.menu.EditorNavigationBarTag;
 
+
 /**
- * Displays editor menu/navigation-bar by calling hybrid JSP tag.
+ * Model which provides methods for displaying editor menu/navigation-bar.
+ * 
+ * Implemented by calling hybrid JSP tag.
  */
-public class EditorMenuHelper  {
-    private PageContext pageContext;
+public class MenuModel implements Model {
     
-    protected static Log logger =
-            LogFactory.getFactory().getInstance(EditorMenuHelper.class);
+    private static Log logger = LogFactory.getLog(MenuModel.class);
     
-    /**
-     * Creates a new instance of EditorMenuHelper
-     */       
-    public EditorMenuHelper(PageContext pageContext) {
-        this.pageContext = pageContext;
+    private PageContext pageContext = null;
+    
+    
+    /** Template context name to be used for model */
+    public String getModelName() {
+        return "menuModel";
     }
     
+    
+    /** Init page model based on request */
+    public void init(Map initData) throws RollerException {
+        
+        // extract page context
+        this.pageContext = (PageContext) initData.get("pageContext");
+    }
+    
+    
     /**
      * Call hybrid EditorNavBarTag to render editor navbar.
      * @param vertical True for vertical navbar.
@@ -57,4 +68,5 @@
         editorTag.setModel("editor-menu.xml");
         return editorTag.emit();
     }
+    
 }

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/Model.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModel.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/Model.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/Model.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModel.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/Model.java Tue Jul 11 14:54:12 2006
@@ -23,18 +23,18 @@
 
 
 /**
- * Represents a render model to be used in the blog/feed templates.
+ * Represents a set of functionality to be used at rendering.
  */
-public interface RenderModel {
+public interface Model {
     
     /**
-     * Name to be used for the model in template context.
+     * Name to be used when referring to this model.
      */
     public String getModelName();
     
     
     /**
-     * Initialize via request.
+     * Initialize.
      */
     public void init(Map params) throws RollerException;
     

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ModelLoader.java (from r420988, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModelLoader.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ModelLoader.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ModelLoader.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModelLoader.java&r1=420988&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/RenderModelLoader.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/ModelLoader.java Tue Jul 11 14:54:12 2006
@@ -33,35 +33,42 @@
 
 
 /**
- * Loads page models (read-only data access objects which implement RenderModel) 
+ * Loads page models (read-only data access objects which implement Model) 
  * and helpers (which "help" with HTML gen.) needed by page rendering process.
  */
-public class RenderModelLoader {
+public class ModelLoader {
     
-    private static Log log = LogFactory.getLog(RenderModelLoader.class);
+    private static Log log = LogFactory.getLog(ModelLoader.class);
     
     
     /** 
      * Load helpers needed in weblog pages (e.g. calendar, menu).
      */
-    public static void loadWeblogHelpers(PageContext pageContext, Map model) {
-        
-        CalendarHelper calendarTag = new CalendarHelper(pageContext);
-        model.put("calendarTag", calendarTag);
+    public static void loadWeblogHelpers(Map model, Map initData) 
+            throws RollerException {
         
-        EditorMenuHelper menuTag = new EditorMenuHelper(pageContext);
-        model.put("menuTag", menuTag);
+        CalendarModel calendarTag = new CalendarModel();
+        calendarTag.init(initData);
+        model.put(calendarTag.getModelName(), calendarTag);
+        
+        MenuModel menuTag = new MenuModel();
+        menuTag.init(initData);
+        model.put(menuTag.getModelName(), menuTag);
     }
     
     
     /**
      * Load generic utility helpers.
      */
-    public static void loadUtilityHelpers(Map model, HttpServletRequest request) {
-        UtilitiesHelper utils = new UtilitiesHelper(request);
+    public static void loadUtilityHelpers(Map model, Map initData) 
+            throws RollerException {
+        
+        UtilitiesModel utils = new UtilitiesModel();
+        utils.init(initData);
         model.put("utils", utils);
     }
-               
+    
+    
     /**
      * Load old page models, but only if velocity.pagemodel.classname defined.
      */
@@ -153,17 +160,17 @@
             for (int i=0; i<weblogModels.length; i++) {
                 try { // don't die just because of one bad custom model
                     Class modelClass = Class.forName(weblogModels[i]);
-                    RenderModel pageModel = (RenderModel)modelClass.newInstance();
+                    Model pageModel = (Model)modelClass.newInstance();
                     pageModel.init(initData);             
                     model.put(pageModel.getModelName(), pageModel);
                 } catch (RollerException re) {
                     log.warn("ERROR: initializing a plugin: " + weblogModels[i]);
                 } catch (ClassNotFoundException cnfe) {
-                    log.warn("ERROR: can't find page model: " + weblogModels[i]);
+                    log.warn("ERROR: can't find model: " + weblogModels[i]);
                 } catch (InstantiationException ie) {
-                    log.warn("ERROR: insantiating page model: " + weblogModels[i]);
+                    log.warn("ERROR: insantiating model: " + weblogModels[i]);
                 } catch (IllegalAccessException iae) {
-                    log.warn("ERROR: access exception page model: " + weblogModels[i]);
+                    log.warn("ERROR: access exception model: " + weblogModels[i]);
                 }
             }
         }     
@@ -185,16 +192,16 @@
             for (int i=0; i<models.length; i++) {
                 currentModel = models[i];
                 Class modelClass = Class.forName(currentModel);
-                RenderModel pageModel = (RenderModel) modelClass.newInstance();
+                Model pageModel = (Model) modelClass.newInstance();
                 pageModel.init(initData);            
                 model.put(pageModel.getModelName(), pageModel);
             }
         } catch (ClassNotFoundException cnfe) {
-            throw new RollerException("ERROR: can't find page model: " + currentModel);
+            throw new RollerException("ERROR: can't find model: " + currentModel);
         } catch (InstantiationException ie) {
-            throw new RollerException("ERROR: insantiating page model: " + currentModel);
+            throw new RollerException("ERROR: insantiating model: " + currentModel);
         } catch (IllegalAccessException iae) {
-            throw new RollerException("ERROR: access exception page model: " + currentModel);
+            throw new RollerException("ERROR: access exception model: " + currentModel);
         }
     }
     

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=421003&r1=421002&r2=421003&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 Tue Jul 11 14:54:12 2006
@@ -49,7 +49,7 @@
 /**
  * Model provides information needed to render a weblog page.
  */
-public class PageRenderModel implements RenderModel {
+public class PageRenderModel implements Model {
     
     protected static Log log = LogFactory.getLog(PageRenderModel.class);
     

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetRenderModel.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetRenderModel.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetRenderModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/PlanetModel.java Tue Jul 11 14:54:12 2006
@@ -15,6 +15,7 @@
  * copyright in this work, please see the NOTICE file in the top level
  * directory of this distribution.
  */
+
 package org.apache.roller.ui.rendering.model;
 
 import java.util.ArrayList;
@@ -35,13 +36,14 @@
 import org.apache.roller.pojos.wrapper.PlanetEntryDataWrapper;
 import org.apache.roller.pojos.wrapper.PlanetSubscriptionDataWrapper;
 
+
 /**
- * Page model that provides access to planet aggregations, feeds and 
- * subscriptions for display on a frontpage weblog.
+ * Model that provides access to planet aggregations, feeds and subscriptions.
  */
-public class PlanetRenderModel implements RenderModel {
-    protected static Log log = 
-            LogFactory.getFactory().getInstance(PlanetRenderModel.class);
+public class PlanetModel implements Model {
+    
+    private static Log log = LogFactory.getLog(PlanetModel.class);
+    
     
     public String getModelName() {
         return "planetPageModel";
@@ -51,6 +53,7 @@
         // no-op for now
     } 
     
+    
     /**
      * Get move recent PlanetEntry objects from 'all' and
      * 'exernal' Planet groups. in reverse chrono order.
@@ -78,6 +81,7 @@
         return results;
     }
     
+    
     /**
      * Get move recent WeblogEntry objects from specified
      * Planet groups in reverse chrono order.
@@ -103,6 +107,7 @@
         return list;
     }
     
+    
     /**
      * Get move recent WeblogEntry objects from specified
      * Planet subscription in reverse chrono order.
@@ -124,6 +129,7 @@
         return list;
     }
     
+    
     /**
      * Get PlanetSubscription objects in descending order by Planet ranking.
      * @param sinceDays Only consider weblogs updated in the last sinceDays
@@ -134,6 +140,7 @@
         return getRankedSubscriptions(null, sinceDays, offset, length);
     }
     
+    
     /**
      * Get PlanetSubscription objects in descending order by Planet ranking.
      * @param groupHandle Only consider weblogs updated in the last sinceDays
@@ -155,5 +162,6 @@
             log.error("ERROR: get ranked blogs", e);
         }
         return list;
-    }   
+    }
+    
 }

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsRenderModel.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsRenderModel.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsRenderModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SearchResultsModel.java Tue Jul 11 14:54:12 2006
@@ -50,7 +50,7 @@
  *
  * Also adds some new methods which are specific only to search results.
  */
-public class SearchResultsRenderModel extends PageRenderModel {
+public class SearchResultsModel extends PageRenderModel {
     
     private static final ResourceBundle bundle = 
             ResourceBundle.getBundle("ApplicationResources");
@@ -72,9 +72,6 @@
     private String errorMessage = null;
     
     
-    public SearchResultsRenderModel() {}
-    
-    
     public void init(Map initData) throws RollerException {
         
         // we expect the init data to contain a searchRequest object
@@ -124,7 +121,7 @@
         }
     }
     
-    // TODO 3.0: need to override page render model methods here
+    // TODO 3.0: need to override page model methods here
     
     private void convertHitsToEntries(Hits hits) throws RollerException {
         

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteRenderModel.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteRenderModel.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteRenderModel.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/SiteModel.java Tue Jul 11 14:54:12 2006
@@ -15,6 +15,7 @@
  * copyright in this work, please see the NOTICE file in the top level
  * directory of this distribution.
  */
+
 package org.apache.roller.ui.rendering.model;
 
 import java.util.ArrayList;
@@ -42,22 +43,24 @@
 import org.apache.roller.pojos.wrapper.WeblogEntryDataWrapper;
 import org.apache.roller.pojos.wrapper.WebsiteDataWrapper;
 
+
 /**
- * Page model that provides access to site-wide users, weblogs and entries for
- * display on a frontpage weblog.
+ * Page model that provides access to site-wide users, weblogs and entries.
  */
-public class SiteRenderModel implements RenderModel {
-    protected static Log log = 
-            LogFactory.getFactory().getInstance(SiteRenderModel.class);
+public class SiteModel implements Model {
+    
+    private static Log log = LogFactory.getLog(SiteModel.class);
+    
     
     public String getModelName() {
         return "sitePageModel";
     }
-        
+    
     public void init(Map map) throws RollerException {
         // no-op for now
     }
     
+    
     /**
      * Get most collection of Website objects,
      * in reverse chrono order by creationDate.
@@ -85,6 +88,7 @@
         return results;
     }
     
+    
     /** 
      * Return list of weblogs that user belongs to.
      */
@@ -105,6 +109,7 @@
         return results;
     }
     
+    
     /** 
      * Return list of users that belong to website.
      */
@@ -125,6 +130,7 @@
         return results;
     }
     
+    
     /**
      * Get most collection of most commented websites, as StatCount objects,
      * in descending order by number of comments.
@@ -149,6 +155,7 @@
         return results;
     }
     
+    
     /**
      * Get most commented weblog entries across all weblogs, as StatCount 
      * objects, in descending order by number of comments.
@@ -175,6 +182,7 @@
         return results;
     }
     
+    
     /**
      * Get most recent WeblogEntry objects across all weblogs,
      * in reverse chrono order by pubTime.
@@ -217,7 +225,8 @@
         }
         return results;
     }
-        
+    
+    
     /**
      * Get most recent Comment objects across all weblogs,
      * in reverse chrono order by postTime.
@@ -246,6 +255,7 @@
         return results;
     }
     
+    
     /**
      * Get most recent User objects, in reverse chrono order by creationDate.
      * @param offset   Offset into results (for paging)
@@ -267,6 +277,7 @@
         return results;
     }
     
+    
     /**
      * Get list of WebsiteDisplay objects, ordered by number of hits.
      * @param sinceDays Only consider weblogs updated in the last sinceDays
@@ -285,6 +296,7 @@
         return results;
     }
     
+    
     /** Get User object by username */
     public UserDataWrapper getUser(String username) {
         UserDataWrapper wrappedUser = null;
@@ -299,6 +311,7 @@
         return wrappedUser;
     }
     
+    
     /** Get Website object by handle */
     public WebsiteDataWrapper getWeblog(String handle) {
         WebsiteDataWrapper wrappedWebsite = null;
@@ -313,6 +326,7 @@
         return wrappedWebsite;
     }
     
+    
     /**
      * Get map with 26 entries, one for each letter A-Z and
      * containing integers reflecting the number of users whose
@@ -330,6 +344,7 @@
         return results;
     }
     
+    
     /** Get collection of users whose names begin with specified letter */
     public List getUsersByLetter(String letter, int offset, int length) {
         List results = new ArrayList();
@@ -348,6 +363,7 @@
         return results;
     }
     
+    
     /**
      * Get map with 26 entries, one for each letter A-Z and
      * containing integers reflecting the number of weblogs whose
@@ -365,6 +381,7 @@
         return results;
     }
     
+    
     /** Get collection of weblogs whose handles begin with specified letter */
     public List getWeblogsByLetter(String letter, int offset, int length) {
         List results = new ArrayList();
@@ -382,6 +399,5 @@
         }
         return results;
     }
+    
 }
-
-

Copied: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java (from r420916, incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesHelper.java)
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java?p2=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java&p1=incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesHelper.java&r1=420916&r2=421003&rev=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesHelper.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java Tue Jul 11 14:54:12 2006
@@ -15,6 +15,7 @@
  * copyright in this work, please see the NOTICE file in the top level
  * directory of this distribution.
  */
+
 package org.apache.roller.ui.rendering.model;
 
 import java.io.UnsupportedEncodingException;
@@ -22,29 +23,28 @@
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import javax.servlet.http.HttpServletRequest;
-
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.roller.RollerException;
 import org.apache.roller.pojos.wrapper.WebsiteDataWrapper;
 import org.apache.roller.ui.core.RollerSession;
 import org.apache.roller.util.DateUtil;
 import org.apache.roller.util.RegexUtil;
 import org.apache.roller.util.Utilities;
 
+
 /**
- * Utilities object to be placed in template context.
+ * Model which provides access to a set of general utilities.
  */
-public class UtilitiesHelper {
+public class UtilitiesModel implements Model {
     
-    private HttpServletRequest request;
-    
-    protected static Log log =
-            LogFactory.getFactory().getInstance(UtilitiesHelper.class); 
+    private static Log log = LogFactory.getLog(UtilitiesModel.class); 
     
     private static Pattern mLinkPattern =
             Pattern.compile("<a href=.*?>", Pattern.CASE_INSENSITIVE);    
@@ -89,10 +89,23 @@
     private static final Pattern QUOTE_PATTERN = 
             Pattern.compile("&quot;", Pattern.CASE_INSENSITIVE);
     
-    public UtilitiesHelper(HttpServletRequest request) {
-        this.request = request;
+    private HttpServletRequest request = null;
+    
+    
+    /** Template context name to be used for model */
+    public String getModelName() {
+        return "utilities";
     }
-            
+    
+    
+    /** Init page model based on request */
+    public void init(Map initData) throws RollerException {
+        
+        // extract request object
+        this.request = (HttpServletRequest) initData.get("request");
+    }
+    
+    
     //---------------------------------------------------- Authentication utils 
     
     public boolean getUserAuthorizedToAuthor(WebsiteDataWrapper weblog) {

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/CommentServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/CommentServlet.java?rev=421003&r1=421002&r2=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/CommentServlet.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/CommentServlet.java Tue Jul 11 14:54:12 2006
@@ -55,7 +55,7 @@
 import org.apache.roller.ui.authoring.struts.formbeans.CommentFormEx;
 import org.apache.roller.ui.core.RollerContext;
 import org.apache.roller.ui.core.RollerSession;
-import org.apache.roller.ui.rendering.model.UtilitiesHelper;
+import org.apache.roller.ui.rendering.model.UtilitiesModel;
 import org.apache.roller.ui.rendering.util.CommentAuthenticator;
 import org.apache.roller.ui.rendering.util.DefaultCommentAuthenticator;
 import org.apache.roller.ui.rendering.util.WeblogCommentRequest;
@@ -459,7 +459,7 @@
             msg.append((escapeHtml) ? "\n\n" : "<br /><br />");
                         
             msg.append((escapeHtml) ? Utilities.escapeHTML(cd.getContent()) 
-                : UtilitiesHelper.transformToHTMLSubset(Utilities.escapeHTML(cd.getContent())));
+                : UtilitiesModel.transformToHTMLSubset(Utilities.escapeHTML(cd.getContent())));
             
             msg.append((escapeHtml) ? "\n\n----\n"
                     : "<br /><br /><hr /><span style=\"font-size: 11px\">");

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java?rev=421003&r1=421002&r2=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/FeedServlet.java Tue Jul 11 14:54:12 2006
@@ -50,7 +50,7 @@
 import org.apache.roller.util.cache.CachedContent;
 import org.apache.roller.ui.rendering.Renderer;
 import org.apache.roller.ui.rendering.RendererManager;
-import org.apache.roller.ui.rendering.model.RenderModelLoader;
+import org.apache.roller.ui.rendering.model.ModelLoader;
 import org.apache.roller.util.cache.Cache;
 import org.apache.roller.util.cache.CacheHandler;
 import org.apache.roller.util.cache.CacheManager;
@@ -198,18 +198,18 @@
             initData.put("feedRequest", feedRequest);
             
             // Feeds get the weblog specific page model
-            RenderModelLoader.loadFeedModels(model, initData);
+            ModelLoader.loadFeedModels(model, initData);
             
             // special handling for site wide feed
             if (rollerContext.isSiteWideWeblog(weblog.getHandle())) {
-                RenderModelLoader.loadSiteModels(model, initData);
+                ModelLoader.loadSiteModels(model, initData);
             }
             
             // utility helpers and plugin helpers
-            RenderModelLoader.loadUtilityHelpers(model, request);
+            ModelLoader.loadUtilityHelpers(model, initData);
 
             // Feeds get weblog's custom models too
-            RenderModelLoader.loadCustomModels(weblog, model, initData);
+            ModelLoader.loadCustomModels(weblog, model, initData);
             
         } catch (RollerException ex) {
             log.error("ERROR loading model for page", ex);

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java?rev=421003&r1=421002&r2=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PageServlet.java Tue Jul 11 14:54:12 2006
@@ -51,7 +51,7 @@
 import org.apache.roller.util.cache.CachedContent;
 import org.apache.roller.ui.rendering.Renderer;
 import org.apache.roller.ui.rendering.RendererManager;
-import org.apache.roller.ui.rendering.model.RenderModelLoader;
+import org.apache.roller.ui.rendering.model.ModelLoader;
 import org.apache.roller.util.Utilities;
 import org.apache.roller.util.cache.Cache;
 import org.apache.roller.util.cache.CacheHandler;
@@ -250,32 +250,32 @@
         HashMap model = new HashMap();
         try {
             RollerContext rollerContext = RollerContext.getRollerContext();
+            PageContext pageContext = JspFactory.getDefaultFactory().getPageContext(
+                    this, request, response,"", true, 8192, true);
             
             // populate the rendering model
             Map initData = new HashMap();
             initData.put("request", request);
             initData.put("pageRequest", pageRequest);
-            
-            PageContext pageContext = JspFactory.getDefaultFactory().getPageContext(
-                    this, request, response,"", true, 8192, true);
+            initData.put("pageContext", pageContext);
             
             // Feeds get the weblog specific page model
-            RenderModelLoader.loadPageModels(model, initData);
+            ModelLoader.loadPageModels(model, initData);
             
             // special handling for site wide weblog
             if (rollerContext.isSiteWideWeblog(weblog.getHandle())) {
-                RenderModelLoader.loadSiteModels(model, initData);
+                ModelLoader.loadSiteModels(model, initData);
             }
             
             // add helpers
-            RenderModelLoader.loadUtilityHelpers(model, request);
-            RenderModelLoader.loadWeblogHelpers(pageContext, model);
+            ModelLoader.loadUtilityHelpers(model, initData);
+            ModelLoader.loadWeblogHelpers(model, initData);
 
             // Feeds get weblog's custom models too
-            RenderModelLoader.loadCustomModels(weblog, model, initData);
+            ModelLoader.loadCustomModels(weblog, model, initData);
             
             // ick, gotta load pre-3.0 model stuff as well :(
-            RenderModelLoader.loadOldModels(model, request, response, pageContext, pageRequest);
+            ModelLoader.loadOldModels(model, request, response, pageContext, pageRequest);
             
         } catch (RollerException ex) {
             log.error("Error loading model objects for page", ex);

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java?rev=421003&r1=421002&r2=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/PreviewServlet.java Tue Jul 11 14:54:12 2006
@@ -42,7 +42,7 @@
 import org.apache.roller.util.cache.CachedContent;
 import org.apache.roller.ui.rendering.Renderer;
 import org.apache.roller.ui.rendering.RendererManager;
-import org.apache.roller.ui.rendering.model.RenderModelLoader;
+import org.apache.roller.ui.rendering.model.ModelLoader;
 import org.apache.roller.ui.rendering.util.WeblogPageRequest;
 import org.apache.roller.ui.rendering.util.WeblogPreviewRequest;
 
@@ -165,27 +165,28 @@
             pageRequest.setWeblogHandle(previewRequest.getWeblogHandle());
             initData.put("pageRequest", pageRequest);
             
+            // page context for helpers which use jsp tags :/
+            PageContext pageContext = JspFactory.getDefaultFactory().getPageContext(
+                    this, request, response,"", true, 8192, true);
+            initData.put("pageContext", pageContext);
+            
             // standard weblog models
-            RenderModelLoader.loadPageModels(model, initData);
+            ModelLoader.loadPageModels(model, initData);
             
             // special handling for site wide weblog
             if (rollerContext.isSiteWideWeblog(tmpWebsite.getHandle())) {
-                RenderModelLoader.loadSiteModels(model, initData);
+                ModelLoader.loadSiteModels(model, initData);
             }
             
-            // page context for helpers which use jsp tags :/
-            PageContext pageContext = JspFactory.getDefaultFactory().getPageContext(
-                    this, request, response,"", true, 8192, true);
-            
             // add helpers
-            RenderModelLoader.loadUtilityHelpers(model, request);
-            RenderModelLoader.loadWeblogHelpers(pageContext, model);
+            ModelLoader.loadUtilityHelpers(model, initData);
+            ModelLoader.loadWeblogHelpers(model, initData);
             
             // weblog's custom models
-            RenderModelLoader.loadCustomModels(tmpWebsite, model, initData);
+            ModelLoader.loadCustomModels(tmpWebsite, model, initData);
             
             // ick, gotta load pre-3.0 model stuff as well :(
-            RenderModelLoader.loadOldModels(model, request, response, pageContext, pageRequest);
+            ModelLoader.loadOldModels(model, request, response, pageContext, pageRequest);
             
         } catch (RollerException ex) {
             log.error("ERROR loading model for page", ex);

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java?rev=421003&r1=421002&r2=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/servlets/SearchServlet.java Tue Jul 11 14:54:12 2006
@@ -38,9 +38,9 @@
 import org.apache.roller.ui.core.RollerContext;
 import org.apache.roller.ui.rendering.Renderer;
 import org.apache.roller.ui.rendering.RendererManager;
-import org.apache.roller.ui.rendering.model.RenderModel;
-import org.apache.roller.ui.rendering.model.RenderModelLoader;
-import org.apache.roller.ui.rendering.model.SearchResultsRenderModel;
+import org.apache.roller.ui.rendering.model.Model;
+import org.apache.roller.ui.rendering.model.ModelLoader;
+import org.apache.roller.ui.rendering.model.SearchResultsModel;
 import org.apache.roller.ui.rendering.util.InvalidRequestException;
 import org.apache.roller.ui.rendering.util.WeblogSearchRequest;
 import org.apache.roller.util.cache.CachedContent;
@@ -120,27 +120,28 @@
             Map initData = new HashMap();
             initData.put("request", request);
             initData.put("searchRequest", searchRequest);
+            initData.put("pageContext", pageContext);
             
             // default weblog models
-            RenderModelLoader.loadSearchModels(model, initData);
+            ModelLoader.loadSearchModels(model, initData);
             
             // special site wide models
             if (rollerContext.isSiteWideWeblog(weblog.getHandle())) {
-                RenderModelLoader.loadSiteModels(model, initData);
+                ModelLoader.loadSiteModels(model, initData);
             }
             
             // add helpers
-            RenderModelLoader.loadUtilityHelpers(model, request);
-            RenderModelLoader.loadWeblogHelpers(pageContext, model);
+            ModelLoader.loadUtilityHelpers(model, initData);
+            ModelLoader.loadWeblogHelpers(model, initData);
 
             // Feeds get weblog's custom models too
-            RenderModelLoader.loadCustomModels(weblog, model, initData);
+            ModelLoader.loadCustomModels(weblog, model, initData);
             
             // ick, gotta load pre-3.0 model stuff as well :(
-            RenderModelLoader.loadOldModels(model, request, response, pageContext, searchRequest);
+            ModelLoader.loadOldModels(model, request, response, pageContext, searchRequest);
             
             // manually add search model again to support pre-3.0 weblogs
-            RenderModel searchModel = new SearchResultsRenderModel();
+            Model searchModel = new SearchResultsModel();
             searchModel.init(initData);
             model.put("searchResults", searchModel);
             

Modified: incubator/roller/branches/roller_3.0/tests/org/apache/roller/util/UtilitiesTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/tests/org/apache/roller/util/UtilitiesTest.java?rev=421003&r1=421002&r2=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/tests/org/apache/roller/util/UtilitiesTest.java (original)
+++ incubator/roller/branches/roller_3.0/tests/org/apache/roller/util/UtilitiesTest.java Tue Jul 11 14:54:12 2006
@@ -24,7 +24,7 @@
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.apache.roller.ui.rendering.model.UtilitiesHelper;
+import org.apache.roller.ui.rendering.model.UtilitiesModel;
 
 /**
  * @author lance
@@ -96,12 +96,12 @@
     public void testAddNoFollow() {
         String test1 = "<p>this some text with a <a href=\"http://example.com\">link</a>";
         String expect1 = "<p>this some text with a <a href=\"http://example.com\" rel=\"nofollow\">link</a>";
-        String result1 = UtilitiesHelper.addNofollow(test1);
+        String result1 = UtilitiesModel.addNofollow(test1);
         assertEquals(expect1, result1);
 
         String test2 = "<p>this some text with a <A href=\"http://example.com\">link</a>";
         String expect2 = "<p>this some text with a <A href=\"http://example.com\" rel=\"nofollow\">link</a>";
-        String result2 = UtilitiesHelper.addNofollow(test2);
+        String result2 = UtilitiesModel.addNofollow(test2);
         assertEquals(expect2, result2);
 
     }

Modified: incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties?rev=421003&r1=421002&r2=421003&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties (original)
+++ incubator/roller/branches/roller_3.0/web/WEB-INF/classes/roller.properties Tue Jul 11 14:54:12 2006
@@ -89,20 +89,20 @@
 # Set of page models to be created for weblog rendering
 rendering.pageRenderModels=\
 org.apache.roller.ui.rendering.model.PageRenderModel,\
-org.apache.roller.ui.rendering.model.ConfigRenderModel
+org.apache.roller.ui.rendering.model.ConfigModel
 
 rendering.feedRenderModels=\
-org.apache.roller.ui.rendering.model.FeedRenderModel,\
-org.apache.roller.ui.rendering.model.ConfigRenderModel
+org.apache.roller.ui.rendering.model.FeedModel,\
+org.apache.roller.ui.rendering.model.ConfigModel
 
 rendering.searchRenderModels=\
-org.apache.roller.ui.rendering.model.SearchResultsRenderModel,\
-org.apache.roller.ui.rendering.model.ConfigRenderModel
+org.apache.roller.ui.rendering.model.SearchResultsModel,\
+org.apache.roller.ui.rendering.model.ConfigModel
 
 # Set of page models to be created for site-wide rendering
 rendering.siteRenderModels=\
-org.apache.roller.ui.rendering.model.SiteRenderModel,\
-org.apache.roller.ui.rendering.model.PlanetRenderModel
+org.apache.roller.ui.rendering.model.SiteModel,\
+org.apache.roller.ui.rendering.model.PlanetModel
 
 # Deprecated Roller 2.X page model configuration
 # Comment out this property to completely disable Roller 2.X page models



Mime
View raw message