roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r219813 - in /incubator/roller/trunk/src/org/roller: model/ pojos/ presentation/ presentation/velocity/ presentation/velocity/wrappers/ presentation/weblog/tags/ presentation/website/actions/
Date Tue, 19 Jul 2005 23:42:45 GMT
Author: agilliland
Date: Tue Jul 19 16:42:43 2005
New Revision: 219813

URL: http://svn.apache.org/viewcvs?rev=219813&view=rev
Log:
refactoring org.roller.model.Template to org.roller.pojos.Template

this is a little more consistent since Template is really a pojo related interface, plus this
required so that the Template interface can have a pojo wrapper.

Added:
    incubator/roller/trunk/src/org/roller/pojos/Template.java
Removed:
    incubator/roller/trunk/src/org/roller/model/Template.java
Modified:
    incubator/roller/trunk/src/org/roller/pojos/ThemeTemplate.java
    incubator/roller/trunk/src/org/roller/pojos/WeblogTemplate.java
    incubator/roller/trunk/src/org/roller/pojos/WebsiteData.java
    incubator/roller/trunk/src/org/roller/presentation/RollerRequest.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/BasePageServlet.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/CommentServlet.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/ContextLoader.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/FoafServlet.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/Macros.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/PreviewServlet.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/wrappers/TemplateWrapper.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/tags/ViewWeblogEntriesTag.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java

Added: incubator/roller/trunk/src/org/roller/pojos/Template.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/pojos/Template.java?rev=219813&view=auto
==============================================================================
--- incubator/roller/trunk/src/org/roller/pojos/Template.java (added)
+++ incubator/roller/trunk/src/org/roller/pojos/Template.java Tue Jul 19 16:42:43 2005
@@ -0,0 +1,37 @@
+/*
+ * Template.java
+ *
+ * Created on June 27, 2005, 11:59 AM
+ */
+
+package org.roller.pojos;
+
+import java.util.Date;
+
+
+/**
+ * The Template interface represents the abstract concept of a single unit
+ * of templated or non-rendered content.  For Roller we mainly think of
+ * templates as Velocity templates which are meant to be fed into the 
+ * Velocity rendering engine.
+ *
+ * @author Allen Gilliland
+ */
+public interface Template {
+    
+    public String getId();
+    public String getName();
+    public String getDescription();
+    public String getContents();
+    public String getLink();
+    public Date getLastModified();
+    
+    /*
+    public void setId(String id);
+    public void setName(String name);
+    public void setDescription(String desc);
+    public void setContents(String contents);
+    public void setLink(String link);
+    public void setLastModified(Date date);
+    */
+}

Modified: incubator/roller/trunk/src/org/roller/pojos/ThemeTemplate.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/pojos/ThemeTemplate.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/pojos/ThemeTemplate.java (original)
+++ incubator/roller/trunk/src/org/roller/pojos/ThemeTemplate.java Tue Jul 19 16:42:43 2005
@@ -8,7 +8,7 @@
 
 import java.io.Serializable;
 import java.util.Date;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 
 
 /**

Modified: incubator/roller/trunk/src/org/roller/pojos/WeblogTemplate.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/pojos/WeblogTemplate.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/pojos/WeblogTemplate.java (original)
+++ incubator/roller/trunk/src/org/roller/pojos/WeblogTemplate.java Tue Jul 19 16:42:43 2005
@@ -5,7 +5,7 @@
 import org.roller.RollerException;
 import org.roller.model.Roller;
 import org.roller.model.RollerFactory;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 
 
 /**

Modified: incubator/roller/trunk/src/org/roller/pojos/WebsiteData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/pojos/WebsiteData.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/pojos/WebsiteData.java (original)
+++ incubator/roller/trunk/src/org/roller/pojos/WebsiteData.java Tue Jul 19 16:42:43 2005
@@ -15,7 +15,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.roller.ThemeNotFoundException;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 import org.roller.model.ThemeManager;
 import org.roller.model.UserManager;
 

Modified: incubator/roller/trunk/src/org/roller/presentation/RollerRequest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/RollerRequest.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/RollerRequest.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/RollerRequest.java Tue Jul 19 16:42:43
2005
@@ -19,7 +19,7 @@
 import org.roller.model.ParsedRequest;
 import org.roller.model.Roller;
 import org.roller.model.RollerFactory;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 import org.roller.model.UserManager;
 import org.roller.model.WeblogManager;
 import org.roller.pojos.BookmarkData;
@@ -764,7 +764,7 @@
     /**
      * Allow comment servlet to inject page that it has chosen.
      */
-    public void setPage(org.roller.model.Template page) 
+    public void setPage(org.roller.pojos.Template page) 
     {
         mPage = page;
     }

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/BasePageServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/BasePageServlet.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/BasePageServlet.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/BasePageServlet.java Tue Jul
19 16:42:43 2005
@@ -74,7 +74,7 @@
                 website = rreq.getWebsite();
             }
             
-            org.roller.model.Template page = null;
+            org.roller.pojos.Template page = null;
             
             // If request specified the page, then go with that
             if (rreq.getPage() != null &&
@@ -127,7 +127,7 @@
     protected Template prepareForPageExecution(Context ctx,
             RollerRequest rreq,
             HttpServletResponse response,
-            org.roller.model.Template page) throws Exception {
+            org.roller.pojos.Template page) throws Exception {
         
         Template outty = null;
         
@@ -154,7 +154,7 @@
         throws Exception {
         
         Template decorator = null;
-        org.roller.model.Template decorator_template = null;
+        org.roller.pojos.Template decorator_template = null;
         
         // check for user-specified decorator
         if (decorator_name != null) {

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/CommentServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/CommentServlet.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/CommentServlet.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/CommentServlet.java Tue Jul
19 16:42:43 2005
@@ -110,7 +110,7 @@
             WebsiteData website = rreq.getWebsite();
                 
             // Request specifies popup
-            org.roller.model.Template page = null;
+            org.roller.pojos.Template page = null;
             Exception pageException = null;
             try 
             {
@@ -354,6 +354,8 @@
         boolean notify = RollerRuntimeConfig.getBooleanProperty("users.comments.emailnotify");
         if (notify && site.getEmailComments().booleanValue())
         {
+            mLogger.debug("Comment notification enabled ... preparing email");
+            
             // Determine message and addressing options from init parameters
             boolean separateMessages = 
                     RollerConfig.getBooleanProperty("comment.notification.separateOwnerMessage");
@@ -444,7 +446,7 @@
             commentURL.append("/comments/");
             commentURL.append(rreq.getUser().getUserName());
             
-            org.roller.model.Template page = rreq.getPage();
+            org.roller.pojos.Template page = rreq.getPage();
             if (page == null)
             {
                 commentURL.append("?entry=");
@@ -545,6 +547,8 @@
                 }
             }
 
+            mLogger.debug("Done sending email message");
+            
         } // if email enabled
     }
 

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/ContextLoader.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/ContextLoader.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/ContextLoader.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/ContextLoader.java Tue Jul
19 16:42:43 2005
@@ -27,7 +27,7 @@
 import org.roller.config.RollerRuntimeConfig;
 import org.roller.model.Roller;
 import org.roller.model.RollerFactory;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 import org.roller.pojos.CommentData;
 import org.roller.pojos.RollerPropertyData;
 import org.roller.pojos.UserData;

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/FoafServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/FoafServlet.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/FoafServlet.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/FoafServlet.java Tue Jul 19
16:42:43 2005
@@ -124,7 +124,7 @@
         // see if foaf:weblog is different Page
         WebsiteData website = rreq.getWebsite();
         UserManager usrMgr = RollerContext.getRoller(request).getUserManager();
-        org.roller.model.Template weblog = website.getPageByName("Weblog");
+        org.roller.pojos.Template weblog = website.getPageByName("Weblog");
         
         // if weblog != homepage, add to context
         if (weblog != null && !website.getDefaultPageId().equals(weblog.getId()))

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/Macros.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/Macros.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/Macros.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/Macros.java Tue Jul 19 16:42:43
2005
@@ -605,7 +605,7 @@
             WebsiteData website = rreq.getWebsite();
             //UserManager userMgr = rreq.getRoller().getUserManager();
             
-            org.roller.model.Template pd = website.getPageByName(pageName);
+            org.roller.pojos.Template pd = website.getPageByName(pageName);
             
             Template vtemplate = null;
             if (pd != null)
@@ -933,7 +933,7 @@
      */
     public String showPageName()
     {
-        org.roller.model.Template pd = null;
+        org.roller.pojos.Template pd = null;
         RollerRequest rreq = getRollerRequest();
         try
         {
@@ -952,7 +952,7 @@
      */
     public String showPageDescription()
     {
-        org.roller.model.Template pd = null;
+        org.roller.pojos.Template pd = null;
         RollerRequest rreq = getRollerRequest();
         try
         {
@@ -972,7 +972,7 @@
      */
     public String showPageUpdateTime()
     {
-        org.roller.model.Template pd = null;
+        org.roller.pojos.Template pd = null;
         RollerRequest rreq = getRollerRequest();
         try
         {

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java Tue Jul 19
16:42:43 2005
@@ -15,7 +15,7 @@
 import org.roller.config.RollerRuntimeConfig;
 import org.roller.model.BookmarkManager;
 import org.roller.model.RefererManager;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 import org.roller.model.UserManager;
 import org.roller.model.WeblogManager;
 import org.roller.pojos.BookmarkComparator;

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/PreviewServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/PreviewServlet.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/PreviewServlet.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/PreviewServlet.java Tue Jul
19 16:42:43 2005
@@ -97,7 +97,7 @@
             else
                 tmpWebsite.setEditorTheme(Theme.CUSTOM);
             
-            org.roller.model.Template page = null;
+            org.roller.pojos.Template page = null;
             
             page = tmpWebsite.getDefaultPage();
             

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/wrappers/TemplateWrapper.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/wrappers/TemplateWrapper.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/wrappers/TemplateWrapper.java
(original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/wrappers/TemplateWrapper.java
Tue Jul 19 16:42:43 2005
@@ -7,7 +7,7 @@
 package org.roller.presentation.velocity.wrappers;
 
 import java.util.Date;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 
 
 /**

Modified: incubator/roller/trunk/src/org/roller/presentation/weblog/tags/ViewWeblogEntriesTag.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/weblog/tags/ViewWeblogEntriesTag.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/weblog/tags/ViewWeblogEntriesTag.java
(original)
+++ incubator/roller/trunk/src/org/roller/presentation/weblog/tags/ViewWeblogEntriesTag.java
Tue Jul 19 16:42:43 2005
@@ -111,7 +111,7 @@
             String pid = null; 
             if ( mDayTemplate != null )
             {
-                org.roller.model.Template page = website.getPageByLink(mDayTemplate);
+                org.roller.pojos.Template page = website.getPageByLink(mDayTemplate);
                 if (page != null)
                 {
                     pid = page.getId();

Modified: incubator/roller/trunk/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java?rev=219813&r1=219812&r2=219813&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
(original)
+++ incubator/roller/trunk/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
Tue Jul 19 16:42:43 2005
@@ -21,7 +21,7 @@
 import org.roller.RollerException;
 import org.roller.RollerPermissionsException;
 import org.roller.model.UserManager;
-import org.roller.model.Template;
+import org.roller.pojos.Template;
 import org.roller.pojos.WeblogTemplate;
 import org.roller.pojos.UserData;
 import org.roller.pojos.WebsiteData;



Mime
View raw message