roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1611674 - in /roller/trunk/app/src: main/java/org/apache/roller/weblogger/business/ main/java/org/apache/roller/weblogger/business/jpa/ main/java/org/apache/roller/weblogger/business/themes/ main/java/org/apache/roller/weblogger/pojos/ mai...
Date Fri, 18 Jul 2014 15:36:28 GMT
Author: gmazza
Date: Fri Jul 18 15:36:27 2014
New Revision: 1611674

URL: http://svn.apache.org/r1611674
Log:
ROL-2039 rename roller_templatecode to custom_template_rendition.

Added:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateRendition.java
      - copied, changed from r1611588, roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/CustomTemplateRendition.java
      - copied, changed from r1611588, roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateRendition.java
      - copied, changed from r1611588, roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateCode.java
    roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/CustomTemplateRendition.orm.xml
      - copied, changed from r1611588, roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.orm.xml
    roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/CustomTemplateRenditionTest.java
      - copied, changed from r1611588, roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/WeblogTemplateCodeTest.java
Removed:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateCode.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java
    roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.orm.xml
    roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/WeblogTemplateCodeTest.java
Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogManager.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticTemplate.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticThemeTemplate.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Template.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerResourceLoader.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateEditBean.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Templates.java
    roller/trunk/app/src/main/resources/META-INF/persistence.xml
    roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm
    roller/trunk/app/src/main/resources/sql/createdb.vm
    roller/trunk/app/src/main/resources/sql/droptables.sql

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogManager.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogManager.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/WeblogManager.java Fri Jul 18 15:36:27 2014
@@ -22,11 +22,11 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import org.apache.roller.weblogger.WebloggerException;
+import org.apache.roller.weblogger.pojos.CustomTemplateRendition;
 import org.apache.roller.weblogger.pojos.StatCount;
 import org.apache.roller.weblogger.pojos.User;
 import org.apache.roller.weblogger.pojos.Weblog;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
-import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
 
 
 /**
@@ -180,13 +180,13 @@ public interface WeblogManager {
     /**
      * Get template code by Type.
      */
-    WeblogThemeTemplateCode getTemplateCodeByType(String templateName, String type)
+    CustomTemplateRendition getTemplateRenditionByType(String templateName, String type)
             throws WebloggerException ;
 
     /**
      * Save template code
      */
-    void saveTemplateCode(WeblogThemeTemplateCode templateCode) throws WebloggerException;
+    void saveTemplateRendition(CustomTemplateRendition templateCode) throws WebloggerException;
 
     /**
      * Get website's pages

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java Fri Jul 18 15:36:27 2014
@@ -38,6 +38,7 @@ import org.apache.roller.weblogger.busin
 import org.apache.roller.weblogger.business.Weblogger;
 import org.apache.roller.weblogger.business.WebloggerFactory;
 import org.apache.roller.weblogger.pojos.AutoPing;
+import org.apache.roller.weblogger.pojos.CustomTemplateRendition;
 import org.apache.roller.weblogger.pojos.PingQueueEntry;
 import org.apache.roller.weblogger.pojos.PingTarget;
 import org.apache.roller.weblogger.pojos.StatCount;
@@ -53,8 +54,6 @@ import org.apache.roller.weblogger.pojos
 import org.apache.roller.weblogger.pojos.WeblogEntryTagAggregate;
 import org.apache.roller.weblogger.pojos.WeblogPermission;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
-import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
-
 
 
 /*
@@ -239,8 +238,8 @@ public class JPAWeblogManagerImpl implem
         roller.getWeblogManager().saveWeblog(page.getWebsite());
     }
 
-    public void saveTemplateCode(WeblogThemeTemplateCode templateCode) throws WebloggerException {
-        this.strategy.store(templateCode);
+    public void saveTemplateRendition(CustomTemplateRendition rendition) throws WebloggerException {
+        this.strategy.store(rendition);
         // update of the template should happen by saving template page.
     }
     
@@ -574,7 +573,7 @@ public class JPAWeblogManagerImpl implem
         }
     }
 
-    public WeblogThemeTemplateCode getTemplateCodeByType(String templateId, String type) throws WebloggerException{
+    public CustomTemplateRendition getTemplateRenditionByType(String templateId, String type) throws WebloggerException{
         if(templateId == null) {
             throw new WebloggerException("Template Name is null");
         }
@@ -583,8 +582,8 @@ public class JPAWeblogManagerImpl implem
             throw new WebloggerException("Type is null");
         }
 
-        TypedQuery<WeblogThemeTemplateCode> query = strategy.getNamedQuery("WeblogThemeTemplateCode.getTemplateCodeByType",
-                WeblogThemeTemplateCode.class);
+        TypedQuery<CustomTemplateRendition> query = strategy.getNamedQuery("CustomTemplateRendition.getRenditionByType",
+                CustomTemplateRendition.class);
         query.setParameter(1, templateId);
         query.setParameter(2, type);
         try {
@@ -699,12 +698,12 @@ public class JPAWeblogManagerImpl implem
     }
 
     private void removeTemplateCodeObjs(WeblogTemplate page) throws WebloggerException {
-        TypedQuery<WeblogThemeTemplateCode> codeQuery = strategy.getNamedQuery(
-                "WeblogThemeTemplateCode.getTemplateCodesByTemplateId", WeblogThemeTemplateCode.class);
+        TypedQuery<CustomTemplateRendition> codeQuery = strategy.getNamedQuery(
+                "CustomTemplateRendition.getRenditionsByTemplateId", CustomTemplateRendition.class);
         codeQuery.setParameter(1, page.getId());
-        List<WeblogThemeTemplateCode> codeList = codeQuery.getResultList();
+        List<CustomTemplateRendition> codeList = codeQuery.getResultList();
 
-        for (WeblogThemeTemplateCode code : codeList) {
+        for (CustomTemplateRendition code : codeList) {
             this.strategy.remove(code);
         }
     }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java Fri Jul 18 15:36:27 2014
@@ -268,14 +268,14 @@ public class SharedThemeFromDir extends 
                         standardTemplateCode.getTemplateLang(), false, false);
 
                 for (String type : availableTypesList) {
-                    SharedThemeTemplateCode templateCode = createTemplateCode(
+                    SharedThemeTemplateRendition rendition = createTemplateCode(
                             theme_template.getId(),
                             stylesheetTmpl.getTemplateCode(type));
 
-                    theme_template.addTemplateCode(type, templateCode);
+                    theme_template.addTemplateRendition(type, rendition);
 
                     // Set Last Modified
-                    Date lstModified = templateCode.getLastModified();
+                    Date lstModified = rendition.getLastModified();
                     if (getLastModified() == null
                             || lstModified.after(getLastModified())) {
                         setLastModified(lstModified);
@@ -369,11 +369,11 @@ public class SharedThemeFromDir extends 
                     templateMetadata.isHidden(), templateMetadata.isNavbar());
 
             for (String type : availableTypesList) {
-                SharedThemeTemplateCode templateCode = createTemplateCode(
+                SharedThemeTemplateRendition templateCode = createTemplateCode(
                         theme_template.getId(),
                         templateMetadata.getTemplateCode(type));
 
-                theme_template.addTemplateCode(type, templateCode);
+                theme_template.addTemplateRendition(type, templateCode);
 
                 // Set Last Modified
                 Date lstModified = templateCode.getLastModified();
@@ -439,9 +439,9 @@ public class SharedThemeFromDir extends 
         this.resources.put(normalizedPath, resource);
     }
 
-    private SharedThemeTemplateCode createTemplateCode(String templateId,
+    private SharedThemeTemplateRendition createTemplateCode(String templateId,
             ThemeMetadataTemplateCode templateCodeMetadata) {
-        SharedThemeTemplateCode templateCode = new SharedThemeTemplateCode();
+        SharedThemeTemplateRendition templateCode = new SharedThemeTemplateRendition();
 
         // construct File object from path
         File templateFile = new File(this.themeDir + File.separator

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java Fri Jul 18 15:36:27 2014
@@ -18,7 +18,7 @@
 
 package org.apache.roller.weblogger.business.themes;
 
-import org.apache.roller.weblogger.pojos.TemplateCode;
+import org.apache.roller.weblogger.pojos.TemplateRendition;
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.pojos.ThemeTemplate;
 
@@ -48,7 +48,7 @@ public class SharedThemeTemplate impleme
     private String type = null;
 
     //hash map to cache template Code objects parsed
-    private Map<String, TemplateCode> templateCodeHashMap = new HashMap<String, TemplateCode>();
+    private Map<String, TemplateRendition> templateRenditionHashMap = new HashMap<String, TemplateRendition>();
     
     
     public SharedThemeTemplate() {}
@@ -181,15 +181,15 @@ public class SharedThemeTemplate impleme
         return type;
     }
 
-    public TemplateCode getTemplateCode(String type) throws WebloggerException {
-        return templateCodeHashMap.get(type);
+    public TemplateRendition getTemplateRendition(String type) throws WebloggerException {
+        return templateRenditionHashMap.get(type);
     }
 
     public void setType(String type) {
         this.type = type;
     }
 
-    public void addTemplateCode(String type , TemplateCode templateCode){
-        this.templateCodeHashMap.put(type ,templateCode);
+    public void addTemplateRendition(String type, TemplateRendition templateCode){
+        this.templateRenditionHashMap.put(type, templateCode);
     }
 }

Copied: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateRendition.java (from r1611588, roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java)
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateRendition.java?p2=roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateRendition.java&p1=roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java&r1=1611588&r2=1611674&rev=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateCode.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplateRendition.java Fri Jul 18 15:36:27 2014
@@ -18,16 +18,17 @@
 
 package org.apache.roller.weblogger.business.themes;
 
-import org.apache.roller.weblogger.pojos.TemplateCode;
+import org.apache.roller.weblogger.pojos.TemplateRendition;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
+
 import java.io.Serializable;
 import java.util.Date;
 
 /**
- * A pojo that will maintain different template codes for one template
+ * A pojo that maintains device-specific renditions of a single template
  */
-public class SharedThemeTemplateCode implements Serializable, TemplateCode {
+public class SharedThemeTemplateRendition implements Serializable, TemplateRendition {
 
 	private String templateId = null;
 	private String template = null;
@@ -36,12 +37,12 @@ public class SharedThemeTemplateCode imp
 	private String templateLanguage = null;
 	private Date lastModified = null;
 
-	public SharedThemeTemplateCode(String templateId, String type) {
+	public SharedThemeTemplateRendition(String templateId, String type) {
 		this.templateId = templateId;
 		this.type = type;
 	}
 
-	public SharedThemeTemplateCode() {
+	public SharedThemeTemplateRendition() {
 	}
 
 	// @Override
@@ -109,10 +110,10 @@ public class SharedThemeTemplateCode imp
 		if (other == this) {
             return true;
         }
-		if (!(other instanceof SharedThemeTemplateCode)) {
+		if (!(other instanceof SharedThemeTemplateRendition)) {
             return false;
         }
-		SharedThemeTemplateCode o = (SharedThemeTemplateCode) other;
+		SharedThemeTemplateRendition o = (SharedThemeTemplateRendition) other;
 		return new EqualsBuilder().append(templateId, o.getTemplateId())
 				.append(template, o.getTemplate()).isEquals();
 	}

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java Fri Jul 18 15:36:27 2014
@@ -42,16 +42,16 @@ import org.apache.roller.weblogger.busin
 import org.apache.roller.weblogger.business.Weblogger;
 import org.apache.roller.weblogger.business.WebloggerFactory;
 import org.apache.roller.weblogger.config.WebloggerConfig;
+import org.apache.roller.weblogger.pojos.CustomTemplateRendition;
 import org.apache.roller.weblogger.pojos.MediaFile;
 import org.apache.roller.weblogger.pojos.MediaFileDirectory;
-import org.apache.roller.weblogger.pojos.TemplateCode;
+import org.apache.roller.weblogger.pojos.TemplateRendition;
 import org.apache.roller.weblogger.pojos.Theme;
 import org.apache.roller.weblogger.pojos.ThemeResource;
 import org.apache.roller.weblogger.pojos.ThemeTemplate;
 import org.apache.roller.weblogger.pojos.Weblog;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
 import org.apache.roller.weblogger.pojos.WeblogTheme;
-import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
 import org.apache.roller.weblogger.util.RollerMessages;
 
 /**
@@ -265,16 +265,16 @@ public class ThemeManagerImpl implements
 			for (String type : ThemeManagerImpl.getTypesList()) {
 
 				// See if we already have some code for this template already (eg previous theme)
-				WeblogThemeTemplateCode weblogTemplateCode = template.getTemplateCode(type);
+				CustomTemplateRendition weblogTemplateCode = template.getTemplateRendition(type);
 
 				// Get the template for the new theme
-				TemplateCode templateCode = themeTemplate.getTemplateCode(type);
+				TemplateRendition templateCode = themeTemplate.getTemplateRendition(type);
 				if (templateCode != null) {
 					
 					// Check for existing template
 					if (weblogTemplateCode == null) {
 						// Does not exist so create a new one
-						weblogTemplateCode = new WeblogThemeTemplateCode(
+						weblogTemplateCode = new CustomTemplateRendition(
 								template.getId(), type);
 					}
 					weblogTemplateCode.setType(type);
@@ -284,7 +284,7 @@ public class ThemeManagerImpl implements
 					weblogTemplateCode.setContentType(templateCode
 							.getContentType());
 					WebloggerFactory.getWeblogger().getWeblogManager()
-							.saveTemplateCode(weblogTemplateCode);
+							.saveTemplateRendition(weblogTemplateCode);
 				}
 
 			}

Copied: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/CustomTemplateRendition.java (from r1611588, roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java)
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/CustomTemplateRendition.java?p2=roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/CustomTemplateRendition.java&p1=roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java&r1=1611588&r2=1611674&rev=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/CustomTemplateRendition.java Fri Jul 18 15:36:27 2014
@@ -27,7 +27,7 @@ import java.io.Serializable;
 /**
  * A pojo that will maintain different template codes for one template
  */
-public class WeblogThemeTemplateCode implements Serializable, TemplateCode {
+public class CustomTemplateRendition implements Serializable, TemplateRendition {
 
 	private static final long serialVersionUID = -1497618963802805151L;
 	private String id = UUIDGenerator.generateUUID();
@@ -38,12 +38,12 @@ public class WeblogThemeTemplateCode imp
 	private String contentType = null;
 	private String templateLanguage = null;
 
-	public WeblogThemeTemplateCode(String templateId, String type) {
+	public CustomTemplateRendition(String templateId, String type) {
 		this.templateId = templateId;
 		this.type = type;
 	}
 
-	public WeblogThemeTemplateCode() {
+	public CustomTemplateRendition() {
 	}
 
 	public String getId() {
@@ -101,10 +101,10 @@ public class WeblogThemeTemplateCode imp
 		if (other == this) {
             return true;
         }
-		if (!(other instanceof WeblogThemeTemplateCode)) {
+		if (!(other instanceof CustomTemplateRendition)) {
             return false;
         }
-		WeblogThemeTemplateCode o = (WeblogThemeTemplateCode) other;
+		CustomTemplateRendition o = (CustomTemplateRendition) other;
 		return new EqualsBuilder().append(getTemplateId(), o.getTemplateId())
 				.append(getTemplate(), o.getTemplate()).isEquals();
 	}

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticTemplate.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticTemplate.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticTemplate.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticTemplate.java Fri Jul 18 15:36:27 2014
@@ -99,9 +99,9 @@ public class StaticTemplate implements T
         return type;
     }
 
-    public TemplateCode getTemplateCode(String type) throws WebloggerException {
-        return (TemplateCode)WebloggerFactory.getWeblogger()
-			.getWeblogManager().getTemplateCodeByType(this.getId(),type);
+    public TemplateRendition getTemplateRendition(String type) throws WebloggerException {
+        return WebloggerFactory.getWeblogger()
+			.getWeblogManager().getTemplateRenditionByType(this.getId(),type);
     }
 
     public void setType(String type){

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticThemeTemplate.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticThemeTemplate.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticThemeTemplate.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/StaticThemeTemplate.java Fri Jul 18 15:36:27 2014
@@ -107,8 +107,8 @@ public class StaticThemeTemplate impleme
         return type;
     }
 
-    public TemplateCode getTemplateCode(String type) throws WebloggerException {
-        return WebloggerFactory.getWeblogger().getWeblogManager().getTemplateCodeByType(this.id, type);
+    public TemplateRendition getTemplateRendition(String type) throws WebloggerException {
+        return WebloggerFactory.getWeblogger().getWeblogManager().getTemplateRenditionByType(this.id, type);
     }
 
     public void setType(String type){

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Template.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Template.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Template.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Template.java Fri Jul 18 15:36:27 2014
@@ -85,8 +85,8 @@ public interface Template {
 
     /**
      *
-     * get the Template code object for the given type.
+     * get the Template rendition object for the given type.
      */
-    TemplateCode getTemplateCode(String type) throws WebloggerException;
+    TemplateRendition getTemplateRendition(String type) throws WebloggerException;
     
 }

Copied: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateRendition.java (from r1611588, roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateCode.java)
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateRendition.java?p2=roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateRendition.java&p1=roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateCode.java&r1=1611588&r2=1611674&rev=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateCode.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TemplateRendition.java Fri Jul 18 15:36:27 2014
@@ -21,7 +21,7 @@ package org.apache.roller.weblogger.pojo
 /**
  * Template code for one type of device.
  */
-public interface TemplateCode {
+public interface TemplateRendition {
 
 	String getContentType();
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogTemplate.java Fri Jul 18 15:36:27 2014
@@ -233,11 +233,11 @@ public class WeblogTemplate implements T
         return ACTION_CUSTOM.equals(getAction()) && !isRequired();
     }
 
-    public WeblogThemeTemplateCode getTemplateCode(String type) throws WebloggerException {
-        return WebloggerFactory.getWeblogger().getWeblogManager().getTemplateCodeByType(getId(), type);
+    public CustomTemplateRendition getTemplateRendition(String type) throws WebloggerException {
+        return WebloggerFactory.getWeblogger().getWeblogManager().getTemplateRenditionByType(getId(), type);
     }
 
-      public String getType() {
+    public String getType() {
         return type;
     }
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerResourceLoader.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerResourceLoader.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerResourceLoader.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/RollerResourceLoader.java Fri Jul 18 15:36:27 2014
@@ -25,7 +25,7 @@ import org.apache.commons.collections.Ex
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.business.WebloggerFactory;
-import org.apache.roller.weblogger.pojos.TemplateCode;
+import org.apache.roller.weblogger.pojos.TemplateRendition;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
 import org.apache.velocity.exception.ResourceNotFoundException;
 import org.apache.velocity.runtime.resource.Resource;
@@ -87,7 +87,7 @@ public class RollerResourceLoader extend
 						"RollerResourceLoader: page \"" + name + "\" not found");
 			}
 			String contents;
-			TemplateCode templateCode = page.getTemplateCode(deviceType);
+			TemplateRendition templateCode = page.getTemplateRendition(deviceType);
 			if (templateCode != null) {
 				contents = templateCode.getTemplate();
 			} else {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/velocity/ThemeResourceLoader.java Fri Jul 18 15:36:27 2014
@@ -97,8 +97,8 @@ public class ThemeResourceLoader extends
             }
 
             final String contents;
-            if (template.getTemplateCode(deviceType) != null) {
-                contents = template.getTemplateCode(deviceType).getTemplate();
+            if (template.getTemplateRendition(deviceType) != null) {
+                contents = template.getTemplateRendition(deviceType).getTemplate();
             } else {
                 contents = template.getContents();
             }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.java Fri Jul 18 15:36:27 2014
@@ -28,14 +28,14 @@ import org.apache.roller.weblogger.Weblo
 import org.apache.roller.weblogger.business.WeblogManager;
 import org.apache.roller.weblogger.business.WebloggerFactory;
 import org.apache.roller.weblogger.business.themes.ThemeManager;
-import org.apache.roller.weblogger.pojos.TemplateCode;
+import org.apache.roller.weblogger.pojos.CustomTemplateRendition;
+import org.apache.roller.weblogger.pojos.TemplateRendition;
 import org.apache.roller.weblogger.pojos.Theme;
 import org.apache.roller.weblogger.pojos.ThemeTemplate;
 import org.apache.roller.weblogger.pojos.Weblog;
 import org.apache.roller.weblogger.pojos.WeblogPermission;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
 import org.apache.roller.weblogger.pojos.WeblogTheme;
-import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
 import org.apache.roller.weblogger.ui.struts2.util.UIAction;
 import org.apache.roller.weblogger.util.cache.CacheManager;
 
@@ -106,24 +106,24 @@ public class StylesheetEdit extends UIAc
                             .getTemplateLanguage());
 
                     // create template codes for available template code Types
-                    WeblogThemeTemplateCode standardTemplateCode = new WeblogThemeTemplateCode(
+                    CustomTemplateRendition standardRendition = new CustomTemplateRendition(
                             stylesheetTmpl.getId(), STANDARD_THEME_TYPE);
-                    standardTemplateCode.setTemplate(stylesheetTmpl
+                    standardRendition.setTemplate(stylesheetTmpl
                             .getContents());
-                    standardTemplateCode.setTemplateLanguage(stylesheetTmpl
+                    standardRendition.setTemplateLanguage(stylesheetTmpl
                             .getTemplateLanguage());
                     WebloggerFactory.getWeblogger().getWeblogManager()
-                            .saveTemplateCode(standardTemplateCode);
+                            .saveTemplateRendition(standardRendition);
 
-                    TemplateCode tCode = stylesheet.getTemplateCode(MOBILE_THEME_TYPE);
+                    TemplateRendition tCode = stylesheet.getTemplateRendition(MOBILE_THEME_TYPE);
                     if (tCode != null) {
-                        WeblogThemeTemplateCode mobileTemplateCode = new WeblogThemeTemplateCode(
+                        CustomTemplateRendition mobileRendition = new CustomTemplateRendition(
                                 stylesheetTmpl.getId(), MOBILE_THEME_TYPE);
-                        mobileTemplateCode.setTemplate(tCode.getTemplate());
-                        mobileTemplateCode.setTemplateLanguage(tCode
+                        mobileRendition.setTemplate(tCode.getTemplate());
+                        mobileRendition.setTemplateLanguage(tCode
                                 .getTemplateLanguage());
                         WebloggerFactory.getWeblogger().getWeblogManager()
-                                .saveTemplateCode(mobileTemplateCode);
+                                .saveTemplateRendition(mobileRendition);
                     }
 
                     WebloggerFactory.getWeblogger().getWeblogManager()
@@ -173,14 +173,14 @@ public class StylesheetEdit extends UIAc
 
         try {
 
-            if (getTemplate().getTemplateCode(STANDARD_THEME_TYPE) != null) {
-                setContentsStandard(getTemplate().getTemplateCode(
+            if (getTemplate().getTemplateRendition(STANDARD_THEME_TYPE) != null) {
+                setContentsStandard(getTemplate().getTemplateRendition(
                         STANDARD_THEME_TYPE).getTemplate());
             } else {
                 setContentsStandard(getTemplate().getContents());
             }
-            if (getTemplate().getTemplateCode(MOBILE_THEME_TYPE) != null) {
-                setContentsMobile(getTemplate().getTemplateCode(
+            if (getTemplate().getTemplateRendition(MOBILE_THEME_TYPE) != null) {
+                setContentsMobile(getTemplate().getTemplateRendition(
                         MOBILE_THEME_TYPE).getTemplate());
             }
 
@@ -213,28 +213,28 @@ public class StylesheetEdit extends UIAc
 
                 stylesheet.setLastModified(new Date());
 
-                if (stylesheet.getTemplateCode(STANDARD_THEME_TYPE) != null) {
+                if (stylesheet.getTemplateRendition(STANDARD_THEME_TYPE) != null) {
                     // if we have a template, then set it
-                    WeblogThemeTemplateCode tc = stylesheet
-                            .getTemplateCode(STANDARD_THEME_TYPE);
+                    CustomTemplateRendition tc = stylesheet
+                            .getTemplateRendition(STANDARD_THEME_TYPE);
                     tc.setTemplate(getContentsStandard());
                     WebloggerFactory.getWeblogger().getWeblogManager()
-                            .saveTemplateCode(tc);
+                            .saveTemplateRendition(tc);
                 } else {
                     // otherwise create it, then set it
-                    WeblogThemeTemplateCode tc = new WeblogThemeTemplateCode(
+                    CustomTemplateRendition tc = new CustomTemplateRendition(
                             stylesheet.getId(), STANDARD_THEME_TYPE);
                     tc.setTemplate(stylesheet.getContents());
                     WebloggerFactory.getWeblogger().getWeblogManager()
-                            .saveTemplateCode(tc);
+                            .saveTemplateRendition(tc);
                 }
 
-                if (stylesheet.getTemplateCode(MOBILE_THEME_TYPE) != null) {
-                    WeblogThemeTemplateCode tc = stylesheet
-                            .getTemplateCode(MOBILE_THEME_TYPE);
+                if (stylesheet.getTemplateRendition(MOBILE_THEME_TYPE) != null) {
+                    CustomTemplateRendition tc = stylesheet
+                            .getTemplateRendition(MOBILE_THEME_TYPE);
                     tc.setTemplate(getContentsMobile());
                     WebloggerFactory.getWeblogger().getWeblogManager()
-                            .saveTemplateCode(tc);
+                            .saveTemplateRendition(tc);
                 }
 
                 // TODO do we still want to set the contents here?
@@ -290,25 +290,25 @@ public class StylesheetEdit extends UIAc
 
                 stylesheet.setLastModified(new Date());
 
-                if (stylesheet.getTemplateCode(STANDARD_THEME_TYPE) != null) {
-                    TemplateCode templateCode = theme.getStylesheet()
-                            .getTemplateCode(STANDARD_THEME_TYPE);
+                if (stylesheet.getTemplateRendition(STANDARD_THEME_TYPE) != null) {
+                    TemplateRendition templateCode = theme.getStylesheet()
+                            .getTemplateRendition(STANDARD_THEME_TYPE);
                     // if we have a template, then set it
-                    WeblogThemeTemplateCode existingTemplateCode = stylesheet
-                            .getTemplateCode(STANDARD_THEME_TYPE);
+                    CustomTemplateRendition existingTemplateCode = stylesheet
+                            .getTemplateRendition(STANDARD_THEME_TYPE);
                     existingTemplateCode
                             .setTemplate(templateCode.getTemplate());
                     WebloggerFactory.getWeblogger().getWeblogManager()
-                            .saveTemplateCode(existingTemplateCode);
+                            .saveTemplateRendition(existingTemplateCode);
 
                     // TODO do we still want to set the contents here?
                     stylesheet.setContents(templateCode.getTemplate());
                 }
-                if (stylesheet.getTemplateCode(MOBILE_THEME_TYPE) != null) {
-                    TemplateCode templateCode = theme.getStylesheet()
-                            .getTemplateCode(MOBILE_THEME_TYPE);
-                    WeblogThemeTemplateCode existingTemplateCode = stylesheet
-                            .getTemplateCode(MOBILE_THEME_TYPE);
+                if (stylesheet.getTemplateRendition(MOBILE_THEME_TYPE) != null) {
+                    TemplateRendition templateCode = theme.getStylesheet()
+                            .getTemplateRendition(MOBILE_THEME_TYPE);
+                    CustomTemplateRendition existingTemplateCode = stylesheet
+                            .getTemplateRendition(MOBILE_THEME_TYPE);
                     existingTemplateCode
                             .setTemplate(templateCode.getTemplate());
                 }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateEditBean.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateEditBean.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateEditBean.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateEditBean.java Fri Jul 18 15:36:27 2014
@@ -22,8 +22,8 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.WebloggerFactory;
+import org.apache.roller.weblogger.pojos.CustomTemplateRendition;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
-import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
 
 
 /**
@@ -152,20 +152,20 @@ public class TemplateEditBean {
     
     public void copyTo(WeblogTemplate dataHolder) throws WebloggerException {
 
-        if (dataHolder.getTemplateCode("standard") != null) {
+        if (dataHolder.getTemplateRendition("standard") != null) {
             // if we have a template, then set it
-            WeblogThemeTemplateCode tc = dataHolder.getTemplateCode("standard");
+            CustomTemplateRendition tc = dataHolder.getTemplateRendition("standard");
             tc.setTemplate(contentsStandard);
-            WebloggerFactory.getWeblogger().getWeblogManager().saveTemplateCode(tc);
+            WebloggerFactory.getWeblogger().getWeblogManager().saveTemplateRendition(tc);
         } else { 
             // otherwise create it, then set it
-            WeblogThemeTemplateCode tc = new WeblogThemeTemplateCode(dataHolder.getId(), "standard");
+            CustomTemplateRendition tc = new CustomTemplateRendition(dataHolder.getId(), "standard");
 			tc.setTemplate(dataHolder.getContents());
-            WebloggerFactory.getWeblogger().getWeblogManager().saveTemplateCode(tc);
+            WebloggerFactory.getWeblogger().getWeblogManager().saveTemplateRendition(tc);
         }
 
-        if (dataHolder.getTemplateCode("mobile") != null) {
-            WeblogThemeTemplateCode tc = dataHolder.getTemplateCode("mobile");
+        if (dataHolder.getTemplateRendition("mobile") != null) {
+            CustomTemplateRendition tc = dataHolder.getTemplateRendition("mobile");
             tc.setTemplate(contentsMobile);
         }
 
@@ -190,13 +190,13 @@ public class TemplateEditBean {
         this.description = dataHolder.getDescription();
         this.link = dataHolder.getLink();
 
-        if (dataHolder.getTemplateCode("standard") != null) {
-            this.contentsStandard = dataHolder.getTemplateCode("standard").getTemplate();
+        if (dataHolder.getTemplateRendition("standard") != null) {
+            this.contentsStandard = dataHolder.getTemplateRendition("standard").getTemplate();
         } else {
             this.contentsStandard = dataHolder.getContents();
         }
-        if (dataHolder.getTemplateCode("mobile") != null) {
-            this.contentsMobile = dataHolder.getTemplateCode("mobile").getTemplate();
+        if (dataHolder.getTemplateRendition("mobile") != null) {
+            this.contentsMobile = dataHolder.getTemplateRendition("mobile").getTemplate();
         }
 		log.debug("Standard: " + this.contentsStandard + " Mobile: " + this.contentsMobile); 
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Templates.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Templates.java?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Templates.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Templates.java Fri Jul 18 15:36:27 2014
@@ -24,9 +24,9 @@ import org.apache.commons.logging.LogFac
 import org.apache.roller.util.RollerConstants;
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.WebloggerFactory;
+import org.apache.roller.weblogger.pojos.CustomTemplateRendition;
 import org.apache.roller.weblogger.pojos.WeblogPermission;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
-import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
 import org.apache.roller.weblogger.pojos.WeblogTheme;
 import org.apache.roller.weblogger.ui.struts2.util.UIAction;
 
@@ -173,20 +173,20 @@ public class Templates extends UIAction 
                         .savePage(newTemplate);
 
                 // Create weblog template codes for available types.
-                WeblogThemeTemplateCode standardTemplCode = new WeblogThemeTemplateCode(
+                CustomTemplateRendition standardRendition = new CustomTemplateRendition(
                         newTemplate.getId(), "standard");
-                standardTemplCode.setTemplate(newTemplate.getContents());
-                standardTemplCode.setTemplateLanguage("velocity");
+                standardRendition.setTemplate(newTemplate.getContents());
+                standardRendition.setTemplateLanguage("velocity");
                 WebloggerFactory.getWeblogger().getWeblogManager()
-                        .saveTemplateCode(standardTemplCode);
+                        .saveTemplateRendition(standardRendition);
 
                 /* TBI -- need a way for user to specify dual or single template
-                WeblogThemeTemplateCode mobileTemplCode = new WeblogThemeTemplateCode(
+                CustomTemplateRendition mobileRendition = new CustomTemplateRendition(
                         newTemplate.getId(), "mobile");
-                mobileTemplCode.setTemplate(newTemplate.getContents());
-                mobileTemplCode.setTemplateLanguage("velocity");
+                mobileRendition.setTemplate(newTemplate.getContents());
+                mobileRendition.setTemplateLanguage("velocity");
                 WebloggerFactory.getWeblogger().getWeblogManager()
-                        .saveTemplateCode(mobileTemplCode);
+                        .saveTemplateRendition(mobileRendition);
                 */
 
                 // if this person happened to create a Weblog template from

Modified: roller/trunk/app/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/META-INF/persistence.xml?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/META-INF/persistence.xml (original)
+++ roller/trunk/app/src/main/resources/META-INF/persistence.xml Fri Jul 18 15:36:27 2014
@@ -34,7 +34,7 @@
     <mapping-file>org/apache/roller/weblogger/pojos/MediaFileTag.orm.xml</mapping-file>
     <mapping-file>org/apache/roller/weblogger/pojos/MediaFileDirectory.orm.xml</mapping-file>
     <mapping-file>org/apache/roller/weblogger/pojos/AutoPing.orm.xml</mapping-file>
-    <mapping-file>org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.orm.xml</mapping-file>
+    <mapping-file>org/apache/roller/weblogger/pojos/CustomTemplateRendition.orm.xml</mapping-file>
 
     <mapping-file>org/apache/roller/planet/pojos/Planet.orm.xml</mapping-file>
     <mapping-file>org/apache/roller/planet/pojos/PlanetGroup.orm.xml</mapping-file>

Copied: roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/CustomTemplateRendition.orm.xml (from r1611588, roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.orm.xml)
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/CustomTemplateRendition.orm.xml?p2=roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/CustomTemplateRendition.orm.xml&p1=roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.orm.xml&r1=1611588&r2=1611674&rev=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.orm.xml (original)
+++ roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/CustomTemplateRendition.orm.xml Fri Jul 18 15:36:27 2014
@@ -4,14 +4,14 @@
                  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
 
     <package>org.apache.roller.weblogger.pojos</package>
-    <entity metadata-complete="true" name="WeblogThemeTemplateCode"
-            class="org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode" access="PROPERTY">
-        <table name="roller_templatecode"/>
-        <named-query name="WeblogThemeTemplateCode.getTemplateCodeByType">
-            <query>SELECT c FROM WeblogThemeTemplateCode c WHERE c.templateId = ?1 AND c.type =?2</query>
+    <entity metadata-complete="true" name="CustomTemplateRendition"
+            class="org.apache.roller.weblogger.pojos.CustomTemplateRendition" access="PROPERTY">
+        <table name="custom_template_rendition"/>
+        <named-query name="CustomTemplateRendition.getRenditionByType">
+            <query>SELECT c FROM CustomTemplateRendition c WHERE c.templateId = ?1 AND c.type =?2</query>
         </named-query>
-        <named-query name="WeblogThemeTemplateCode.getTemplateCodesByTemplateId">
-            <query>SELECT c FROM WeblogThemeTemplateCode c WHERE c.templateId = ?1</query>
+        <named-query name="CustomTemplateRendition.getRenditionsByTemplateId">
+            <query>SELECT c FROM CustomTemplateRendition c WHERE c.templateId = ?1</query>
         </named-query>
         <attributes>
             <id name="id">

Modified: roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm (original)
+++ roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm Fri Jul 18 15:36:27 2014
@@ -4,8 +4,8 @@
 DON'T RUN THIS, IT'S NOT A DATABASE CREATION SCRIPT!!!
 **#
 
-create table roller_templatecode (
-    id                 varchar(48)  not null primary key,
+create table custom_template_rendition (
+    id varchar(48)  not null primary key,
     templateid varchar(48) not null,
     template     $db.TEXT_SQL_TYPE not null,
     templatelang varchar(48),

Modified: roller/trunk/app/src/main/resources/sql/createdb.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/createdb.vm?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/createdb.vm (original)
+++ roller/trunk/app/src/main/resources/sql/createdb.vm Fri Jul 18 15:36:27 2014
@@ -142,8 +142,8 @@ alter table website add constraint ws_ha
 -- This index is not necessary because of handle is already a primary key.
 -- create index ws_handle_idx    on website(handle);
 
-create table roller_templatecode (
-    id                 varchar(48)  not null primary key,
+create table custom_template_rendition (
+    id           varchar(48)  not null primary key,
     templateid varchar(48) not null,
     template     $db.TEXT_SQL_TYPE not null,
     templatelang varchar(48),

Modified: roller/trunk/app/src/main/resources/sql/droptables.sql
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/droptables.sql?rev=1611674&r1=1611673&r2=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/droptables.sql (original)
+++ roller/trunk/app/src/main/resources/sql/droptables.sql Fri Jul 18 15:36:27 2014
@@ -50,7 +50,7 @@ drop table entryattribute;
 drop table weblogentry;
 drop table weblogcategory;
 drop table webpage;
-drop table roller_templatecode;
+drop table custom_template_rendition;
 
 -- core platform tables
 drop table roller_permission;

Copied: roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/CustomTemplateRenditionTest.java (from r1611588, roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/WeblogTemplateCodeTest.java)
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/CustomTemplateRenditionTest.java?p2=roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/CustomTemplateRenditionTest.java&p1=roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/WeblogTemplateCodeTest.java&r1=1611588&r2=1611674&rev=1611674&view=diff
==============================================================================
--- roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/WeblogTemplateCodeTest.java (original)
+++ roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/CustomTemplateRenditionTest.java Fri Jul 18 15:36:27 2014
@@ -24,28 +24,28 @@ import junit.framework.TestSuite;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.TestUtils;
+import org.apache.roller.weblogger.pojos.CustomTemplateRendition;
 import org.apache.roller.weblogger.pojos.User;
 import org.apache.roller.weblogger.pojos.Weblog;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
-import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
 
-public class WeblogTemplateCodeTest extends TestCase{
+public class CustomTemplateRenditionTest extends TestCase{
     public static Log log = LogFactory.getLog(WeblogPageTest.class);
 
        User testUser = null;
        Weblog testWeblog = null;
        WeblogTemplate testPage = null;
-       WeblogThemeTemplateCode standardCode = null;
-       WeblogThemeTemplateCode mobileCode = null;
+       CustomTemplateRendition standardCode = null;
+       CustomTemplateRendition mobileCode = null;
 
 
-       public WeblogTemplateCodeTest(String name) {
+       public CustomTemplateRenditionTest(String name) {
            super(name);
        }
 
 
        public static Test suite() {
-           return new TestSuite(WeblogTemplateCodeTest.class);
+           return new TestSuite(CustomTemplateRenditionTest.class);
        }
 
 
@@ -110,48 +110,48 @@ public class WeblogTemplateCodeTest exte
 
 
            //create standard template coce
-           WeblogThemeTemplateCode standardTemplateCode = new WeblogThemeTemplateCode(testPage.getId(),"standard");
+           CustomTemplateRendition standardTemplateCode = new CustomTemplateRendition(testPage.getId(), "standard");
            standardTemplateCode.setTemplate("standard.template.code");
            standardTemplateCode.setTemplateLanguage("velocity");
-           mgr.saveTemplateCode(standardTemplateCode);
+           mgr.saveTemplateRendition(standardTemplateCode);
             //TestUtils.endSession(true);
            //create mobile code
-           WeblogThemeTemplateCode mobileTemplateCode = new WeblogThemeTemplateCode(testPage.getId(),"mobile");
+           CustomTemplateRendition mobileTemplateCode = new CustomTemplateRendition(testPage.getId(), "mobile");
            mobileTemplateCode.setTemplate("mobile.template.code");
            mobileTemplateCode.setTemplateLanguage("velocity");
-           mgr.saveTemplateCode(mobileTemplateCode);
+           mgr.saveTemplateRendition(mobileTemplateCode);
              TestUtils.endSession(true);
 
 
            // check that create was successful
-            standardCode = mgr.getTemplateCodeByType(testPage.getId(), "standard");
+            standardCode = mgr.getTemplateRenditionByType(testPage.getId(), "standard");
            assertNotNull(standardCode);
            assertEquals(standardTemplateCode.getTemplate() ,standardCode.getTemplate());
 
-            mobileCode = mgr.getTemplateCodeByType(testPage.getId(), "mobile");
+            mobileCode = mgr.getTemplateRenditionByType(testPage.getId(), "mobile");
            assertNotNull(mobileCode);
            assertEquals(mobileTemplateCode.getTemplate() ,mobileCode.getTemplate());
 
            // update template Code
            standardCode = null;
-           standardCode = mgr.getTemplateCodeByType(testPage.getId(), "standard");
+           standardCode = mgr.getTemplateRenditionByType(testPage.getId(), "standard");
            standardCode.setTemplate("update.standard.template");
-           mgr.saveTemplateCode(standardCode);
+           mgr.saveTemplateRendition(standardCode);
 
            mobileCode = null;
-           mobileCode = mgr.getTemplateCodeByType(testPage.getId(), "mobile");
+           mobileCode = mgr.getTemplateRenditionByType(testPage.getId(), "mobile");
            mobileCode.setTemplate("update.mobile.template");
-           mgr.saveTemplateCode(mobileCode);
+           mgr.saveTemplateRendition(mobileCode);
 
            TestUtils.endSession(true);
 
            // check that update was successful
            standardCode =null;
-            standardCode = mgr.getTemplateCodeByType(testPage.getId(), "standard");
-            assertEquals("update.standard.template",standardCode.getTemplate());
+           standardCode = mgr.getTemplateRenditionByType(testPage.getId(), "standard");
+           assertEquals("update.standard.template",standardCode.getTemplate());
 
            mobileCode =null;
-           mobileCode = mgr.getTemplateCodeByType(testPage.getId(), "mobile");
+           mobileCode = mgr.getTemplateRenditionByType(testPage.getId(), "mobile");
            assertEquals("update.mobile.template",mobileCode.getTemplate());
 
            WeblogTemplate page = mgr.getPage(testPage.getId());
@@ -160,11 +160,11 @@ public class WeblogTemplateCodeTest exte
 
            // check that update was successful
            standardCode =null;
-            standardCode = mgr.getTemplateCodeByType(testPage.getId(), "standard");
-            assertNull(standardCode);
+           standardCode = mgr.getTemplateRenditionByType(testPage.getId(), "standard");
+           assertNull(standardCode);
 
            mobileCode =null;
-           mobileCode = mgr.getTemplateCodeByType(testPage.getId(), "mobile");
+           mobileCode = mgr.getTemplateRenditionByType(testPage.getId(), "mobile");
            assertNull(mobileCode);
 
        }



Mime
View raw message