roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1505200 - in /roller/trunk/app/src/main: java/org/apache/roller/weblogger/ui/core/ java/org/apache/roller/weblogger/ui/rendering/model/ java/org/apache/roller/weblogger/ui/rendering/servlets/ java/org/apache/roller/weblogger/ui/rendering/v...
Date Sat, 20 Jul 2013 20:34:02 GMT
Author: gmazza
Date: Sat Jul 20 20:34:01 2013
New Revision: 1505200

URL: http://svn.apache.org/r1505200
Log:
Removed pre-Roller 3.0 renderers and Velocity macros.

Removed:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/deprecated/
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/StrutsRedirectServlet.java
    roller/trunk/app/src/main/webapp/WEB-INF/velocity/deprecated/
Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PageServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/SearchServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
    roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties
    roller/trunk/app/src/main/webapp/WEB-INF/web.xml

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
Sat Jul 20 20:34:01 2013
@@ -201,15 +201,6 @@ public class RollerContext extends Conte
             
             velocityProps.load(instream);
             
-            // need to dynamically add old macro libraries if they are enabled
-            if(WebloggerConfig.getBooleanProperty("rendering.legacyModels.enabled")) {
-                String macroLibraries = (String) velocityProps.get("velocimacro.library");
-                String oldLibraries = WebloggerConfig.getProperty("velocity.oldMacroLibraries");
-                
-                // set the new value
-                velocityProps.setProperty("velocimacro.library", oldLibraries+","+macroLibraries);
-            }
-            
             log.debug("Velocity props = "+velocityProps);
             
             // init velocity

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ModelLoader.java
Sat Jul 20 20:34:01 2013
@@ -29,7 +29,6 @@ import org.apache.roller.weblogger.busin
 import org.apache.roller.weblogger.config.WebloggerConfig;
 import org.apache.roller.weblogger.pojos.Weblog;
 import org.apache.roller.weblogger.ui.rendering.util.WeblogPageRequest;
-import org.apache.roller.weblogger.ui.rendering.velocity.deprecated.ContextLoader;
 import org.apache.roller.weblogger.util.Utilities;
 
 
@@ -40,25 +39,7 @@ public class ModelLoader {
     
     private static Log log = LogFactory.getLog(ModelLoader.class);
     
-    
-    /**
-     * Load old page models, but only if they are enabled.
-     */
-    public static void loadOldModels(
-            Map model,
-            HttpServletRequest  request,
-            HttpServletResponse response,
-            PageContext pageContext,
-            WeblogPageRequest pageRequest,
-            URLStrategy urlStrategy) throws WebloggerException {
-        
-        // Only load old models if it's enabled     
-        if (WebloggerConfig.getBooleanProperty("rendering.legacyModels.enabled")) { 
-            ContextLoader.setupContext(model, request, response, pageContext, pageRequest,
urlStrategy);            
-        }
-    }
-    
-    
+
     /**
      * Load set of custom models set for the given weblog.
      *

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PageServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PageServlet.java?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PageServlet.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PageServlet.java
Sat Jul 20 20:34:01 2013
@@ -467,10 +467,6 @@ public class PageServlet extends HttpSer
 			// Load weblog custom models
 			ModelLoader.loadCustomModels(weblog, model, initData);
 
-			// ick, gotta load pre-3.0 model stuff as well :(
-			ModelLoader.loadOldModels(model, request, response, pageContext,
-					pageRequest, WebloggerFactory.getWeblogger()
-							.getUrlStrategy());
 		} catch (WebloggerException ex) {
 			log.error("Error loading model objects for page", ex);
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java
Sat Jul 20 20:34:01 2013
@@ -235,9 +235,6 @@ public class PreviewServlet extends Http
             // Load weblog custom models
             ModelLoader.loadCustomModels(weblog, model, initData);
             
-            // ick, gotta load pre-3.0 model stuff as well :(
-            ModelLoader.loadOldModels(model, request, response, pageContext, previewRequest,
WebloggerFactory.getWeblogger().getUrlStrategy().getPreviewURLStrategy(previewRequest.getThemeName()));
-            
         } catch (WebloggerException ex) {
             log.error("ERROR loading model for page", ex);
             

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/SearchServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/SearchServlet.java?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/SearchServlet.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/SearchServlet.java
Sat Jul 20 20:34:01 2013
@@ -178,9 +178,6 @@ public class SearchServlet extends HttpS
             // Load weblog custom models
             ModelLoader.loadCustomModels(weblog, model, initData);
             
-            // ick, gotta load pre-3.0 model stuff as well :(
-            ModelLoader.loadOldModels(model, request, response, pageContext, pageRequest,
WebloggerFactory.getWeblogger().getUrlStrategy());
-            
             // manually add search model again to support pre-3.0 weblogs
             Model searchModel = new SearchResultsModel();
             searchModel.init(initData);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerVelocity.java
Sat Jul 20 20:34:01 2013
@@ -57,16 +57,7 @@ public class RollerVelocity {
                     RollerContext.getServletContext().getResourceAsStream(VELOCITY_CONFIG);
             
             velocityProps.load(instream);
-            
-            // need to dynamically add old macro libraries if they are enabled
-            if(WebloggerConfig.getBooleanProperty("rendering.legacyModels.enabled")) {
-                String macroLibraries = (String) velocityProps.get("velocimacro.library");
-                String oldLibraries = WebloggerConfig.getProperty("velocity.oldMacroLibraries");
-                
-                // set the new value
-                velocityProps.setProperty("velocimacro.library", oldLibraries+","+macroLibraries);
-            }
-            
+           
             log.debug("Velocity engine props = "+velocityProps);
             
             // construct the VelocityEngine

Modified: roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties
(original)
+++ roller/trunk/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties
Sat Jul 20 20:34:01 2013
@@ -454,9 +454,6 @@ crowd.default.locale=
 # Rendering system
 #-----------------------------------------------------------------------------
 
-# Are the old pre-3.0 models and macros enabled?
-rendering.legacyModels.enabled=false
-
 # The set of default Roller renderer factories.
 rendering.rollerRendererFactories=\
 org.apache.roller.weblogger.ui.rendering.velocity.VelocityRendererFactory
@@ -528,18 +525,9 @@ rendering.siteModels=\
 org.apache.roller.weblogger.ui.rendering.model.SiteModel,\
 org.apache.roller.weblogger.ui.rendering.model.PlanetModel
 
-
 # Velocity settings
 velocity.properties=/WEB-INF/velocity.properties
 
-# Old velocity macro libraries
-velocity.oldMacroLibraries=\
-deprecated/roller.vm,deprecated/bookmark.vm,deprecated/comments.vm,\
-deprecated/navbar.vm,deprecated/newsfeed.vm,deprecated/referer.vm,\
-deprecated/atommacros.vm,deprecated/rssmacros.vm,deprecated/user.vm,\
-deprecated/weblog.vm,deprecated/website.vm
-
-
 #-----------------------------------------------------------------------------
 # Weblog ping system
 #-----------------------------------------------------------------------------

Modified: roller/trunk/app/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/web.xml?rev=1505200&r1=1505199&r2=1505200&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/web.xml (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/web.xml Sat Jul 20 20:34:01 2013
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5" 
+<web-app version="2.5"
     xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
@@ -147,7 +147,7 @@
 		<url-pattern>/roller-ui/*</url-pattern>
 	</filter-mapping>
 
-    <!-- Request mapping.  this is what allows the urls to work -->
+    <!-- Request mapping, this is what allows the urls to work -->
     <filter-mapping>
         <filter-name>RequestMappingFilter</filter-name>
         <url-pattern>/*</url-pattern>
@@ -453,30 +453,6 @@
         <url-pattern>/roller-services/opensearch/*</url-pattern>
     </servlet-mapping>
 
-    <!-- Redirect Support for pre-3.0 urls -->
-    <servlet-mapping>
-        <servlet-name>RedirectServlet</servlet-name>
-        <url-pattern>/language/*</url-pattern>
-        <url-pattern>/comments/*</url-pattern>
-        <url-pattern>/resources/*</url-pattern>
-        <url-pattern>/rsd/*</url-pattern>
-        <url-pattern>/flavor/*</url-pattern>
-        <url-pattern>/rss/*</url-pattern>
-        <url-pattern>/atom/*</url-pattern>
-        <url-pattern>/page/*</url-pattern>
-        <url-pattern>/search/*</url-pattern>
-        <url-pattern>/xmlrpc/*</url-pattern>
-        <url-pattern>/editor/*</url-pattern>
-        <url-pattern>/admin/*</url-pattern>
-    </servlet-mapping>
-
-    <!-- Redirect support for some old struts1 urls -->
-    <servlet-mapping>
-        <servlet-name>StrutsRedirectServlet</servlet-name>
-        <url-pattern>/roller-ui/yourWebsites.do</url-pattern>
-        <url-pattern>/roller-ui/authoring/commentManagement.do</url-pattern>
-    </servlet-mapping>
-
     <session-config>
         <session-timeout>30</session-timeout>
     </session-config>



Mime
View raw message