roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1546816 [1/4] - in /roller/branches/rome2: ./ app/src/main/java/org/apache/roller/planet/business/ app/src/main/java/org/apache/roller/planet/business/fetcher/ app/src/main/java/org/apache/roller/weblogger/business/ app/src/main/java/org/a...
Date Sun, 01 Dec 2013 14:39:52 GMT
Author: snoopdave
Date: Sun Dec  1 14:39:51 2013
New Revision: 1546816

URL: http://svn.apache.org/r1546816
Log:
Merging changes from trunk since start of branch.

Used this command:

    svn merge -r 1529475:HEAD https://svn.apache.org/repos/asf/roller/trunk .

Added:
    roller/branches/rome2/app/src/main/webapp/WEB-INF/velocity/templates/error-parse.vm
      - copied unchanged from r1546815, roller/trunk/app/src/main/webapp/WEB-INF/velocity/templates/error-parse.vm
    roller/branches/rome2/app/src/main/webapp/themes/basic/basic-mobile-custom.css
      - copied unchanged from r1546815, roller/trunk/app/src/main/webapp/themes/basic/basic-mobile-custom.css
Modified:
    roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/MultiPlanetURLStrategy.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/fetcher/RomeFeedFetcher.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/User.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogPermission.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerSession.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/Renderer.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SiteModel.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/FeedServlet.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PageServlet.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewResourceServlet.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewServlet.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewThemeImageServlet.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/SearchServlet.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/ModDateHeaderUtil.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/PlanetRequest.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/PlanetCache.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/SiteWideCache.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogPageCache.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/BookmarkBean.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Bookmarks.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBean.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryRemove.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateEdit.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogExport.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/util/I18nMessages.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/util/MediacastResource.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/util/Trackback.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/util/WSSEUtilities.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/Authenticator.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/Handler.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/RollerMemberHandler.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/sdk/UserEntry.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/adminprotocol/sdk/WeblogEntry.java
    roller/branches/rome2/app/src/main/resources/ApplicationResources.properties
    roller/branches/rome2/app/src/main/resources/blacklist.txt
    roller/branches/rome2/app/src/main/resources/struts.properties
    roller/branches/rome2/app/src/main/webapp/WEB-INF/velocity/templates/error-page.vm
    roller/branches/rome2/app/src/main/webapp/themes/basic/_day-mobile.vm
    roller/branches/rome2/app/src/main/webapp/themes/basic/_day.vm
    roller/branches/rome2/app/src/main/webapp/themes/basic/permalink-mobile.vm
    roller/branches/rome2/app/src/main/webapp/themes/basic/searchresults-mobile.vm
    roller/branches/rome2/app/src/main/webapp/themes/basic/theme.xml
    roller/branches/rome2/app/src/main/webapp/themes/basic/weblog-mobile.vm
    roller/branches/rome2/app/src/main/webapp/themes/frontpage/_header.vm
    roller/branches/rome2/merges.md
    roller/branches/rome2/pom.xml

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/MultiPlanetURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/MultiPlanetURLStrategy.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/MultiPlanetURLStrategy.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/MultiPlanetURLStrategy.java Sun Dec  1 14:39:51 2013
@@ -21,7 +21,6 @@ package org.apache.roller.planet.busines
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
-import java.util.Iterator;
 import java.util.Map;
 import org.apache.roller.weblogger.business.WebloggerFactory;
 import org.apache.roller.weblogger.config.WebloggerRuntimeConfig;
@@ -41,10 +40,7 @@ public class MultiPlanetURLStrategy impl
             return null;
         }
         
-        StringBuffer url = new StringBuffer();
-        
-        PlanetManager mgr = WebloggerFactory.getWeblogger().getPlanetManager();
-        
+        StringBuilder url = new StringBuilder();
         url.append(WebloggerRuntimeConfig.getProperty("site.absoluteurl"));
         url.append("/").append(planet).append("/");
         
@@ -61,7 +57,7 @@ public class MultiPlanetURLStrategy impl
             return null;
         }
         
-        StringBuffer url = new StringBuffer();
+        StringBuilder url = new StringBuilder();
         
         url.append(getPlanetURL(planet));
         url.append("group/").append(group).append("/");
@@ -84,8 +80,7 @@ public class MultiPlanetURLStrategy impl
             return null;
         }
         
-        StringBuffer url = new StringBuffer();
-        
+        StringBuilder url = new StringBuilder();
         url.append(getPlanetGroupURL(planet, group, -1));
         url.append("feed/").append(format);
         
@@ -102,8 +97,7 @@ public class MultiPlanetURLStrategy impl
             return null;
         }
         
-        StringBuffer url = new StringBuffer();
-        
+        StringBuilder url = new StringBuilder();
         url.append(getPlanetGroupURL(planet, group, -1));
         url.append("opml");
         
@@ -120,10 +114,9 @@ public class MultiPlanetURLStrategy impl
             return null;
         }
         
-        StringBuffer queryString = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
         
-        for(Iterator keys = params.keySet().iterator(); keys.hasNext();) {
-            String key = (String) keys.next();
+        for(Object key : params.keySet()) {
             String value = (String) params.get(key);
             
             if (queryString.length() == 0) {

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/fetcher/RomeFeedFetcher.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/fetcher/RomeFeedFetcher.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/fetcher/RomeFeedFetcher.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/planet/business/fetcher/RomeFeedFetcher.java Sun Dec  1 14:39:51 2013
@@ -36,7 +36,6 @@ import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
-import java.util.Iterator;
 import java.util.List;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.commons.logging.Log;
@@ -227,10 +226,8 @@ public class RomeFeedFetcher implements 
         // copy categories
         if (romeEntry.getCategories().size() > 0) {
             List list = new ArrayList();
-            Iterator cats = romeEntry.getCategories().iterator();
-            while (cats.hasNext()) {
-                SyndCategory cat = (SyndCategory)cats.next();
-                list.add(cat.getName());
+            for (Object cat : romeEntry.getCategories()) {
+                list.add(((SyndCategory) cat).getName());
             }
             newEntry.setCategoriesString(list);
         }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MailProvider.java Sun Dec  1 14:39:51 2013
@@ -37,7 +37,7 @@ import org.apache.roller.weblogger.confi
  */
 public class MailProvider {
     
-    private static final Log log = LogFactory.getLog(MailProvider.class);
+    private static final Log LOG = LogFactory.getLog(MailProvider.class);
     
     private enum ConfigurationType {JNDI_NAME, MAIL_PROPERTIES; }
     
@@ -45,7 +45,6 @@ public class MailProvider {
     
     private ConfigurationType type = ConfigurationType.JNDI_NAME;
     
-    private String jndiName = null;
     private String mailHostname = null;
     private int    mailPort = -1;
     private String mailUsername = null;
@@ -58,7 +57,7 @@ public class MailProvider {
         if ("properties".equals(connectionTypeString)) {
             type = ConfigurationType.MAIL_PROPERTIES;
         }
-        jndiName =     WebloggerConfig.getProperty("mail.jndi.name");
+        String jndiName =     WebloggerConfig.getProperty("mail.jndi.name");
         mailHostname = WebloggerConfig.getProperty("mail.hostname");
         mailUsername = WebloggerConfig.getProperty("mail.username");
         mailPassword = WebloggerConfig.getProperty("mail.password");
@@ -68,7 +67,7 @@ public class MailProvider {
                 mailPort = Integer.parseInt(portString);
             }
         } catch (Exception e) {
-            log.warn("mail server port not a valid integer, ignoring");
+            LOG.warn("mail server port not a valid integer, ignoring");
         }
         
         // init and connect now so we fail early

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPingQueueManagerImpl.java Sun Dec  1 14:39:51 2013
@@ -25,7 +25,6 @@ import javax.persistence.Query;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.WebloggerException;
-import org.apache.roller.weblogger.business.Weblogger;
 import org.apache.roller.weblogger.business.pings.PingQueueManager;
 import org.apache.roller.weblogger.pojos.AutoPing;
 import org.apache.roller.weblogger.pojos.PingQueueEntry;
@@ -43,16 +42,14 @@ public class JPAPingQueueManagerImpl imp
         JPAPingQueueManagerImpl.class);
 
     /** The strategy for this manager. */
-    private final Weblogger roller;
     private final JPAPersistenceStrategy strategy;
-    
+
 
     /**
      * Creates a new instance of JPAPingQueueManagerImpl
      */
     @com.google.inject.Inject
-    protected JPAPingQueueManagerImpl(Weblogger roller, JPAPersistenceStrategy strategy) {
-        this.roller = roller;
+    protected JPAPingQueueManagerImpl(JPAPersistenceStrategy strategy) {
         this.strategy =  strategy;
     }
 

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/AcronymsPlugin.java Sun Dec  1 14:39:51 2013
@@ -43,7 +43,7 @@ import org.apache.roller.weblogger.pojos
  */
 public class AcronymsPlugin implements WeblogEntryPlugin {
     
-    private static final Log mLogger = LogFactory.getLog(AcronymsPlugin.class);
+    private static final Log LOG = LogFactory.getLog(AcronymsPlugin.class);
     
     protected String name = "Acronyms";
     protected String description = "Expands acronyms defined in _acronym page. " +
@@ -56,7 +56,7 @@ public class AcronymsPlugin implements W
     
     public AcronymsPlugin() {
         super();
-        mLogger.debug("AcronymsPlugin instantiated.");
+        LOG.debug("AcronymsPlugin instantiated.");
     }
     
     
@@ -76,15 +76,15 @@ public class AcronymsPlugin implements W
     public String render(WeblogEntry entry, String str) {
         String text = str;
         
-        if (mLogger.isDebugEnabled()) {
-            mLogger.debug("render(entry = "+entry.getId()+")");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("render(entry = "+entry.getId()+")");
         }
         
         /*
          * Get acronyms Properties.
          */
         Properties acronyms = loadAcronyms(entry.getWebsite());
-        mLogger.debug("acronyms.size()=" + acronyms.size());
+        LOG.debug("acronyms.size()=" + acronyms.size());
         if (acronyms.size() == 0) {
             return text;
         }
@@ -98,7 +98,7 @@ public class AcronymsPlugin implements W
         for (Iterator iter = acronyms.keySet().iterator(); iter.hasNext();) {
             String acronym = (String) iter.next();
             acronymPatterns[count] = Pattern.compile("\\b" + acronym + "\\b");
-            mLogger.debug("match '" + acronym + "'");
+            LOG.debug("match '" + acronym + "'");
             acronymTags[count] =
                     "<acronym title=\""
                     + acronyms.getProperty(acronym)
@@ -134,7 +134,7 @@ public class AcronymsPlugin implements W
             }
         } catch (WebloggerException e) {
             // not much we can do about it
-            mLogger.warn(e);
+            LOG.warn(e);
         }
         return acronyms;
     }
@@ -149,8 +149,8 @@ public class AcronymsPlugin implements W
      * @return entry text with acronym explanations
      */
     private String matchAcronyms(String text, Pattern[] acronymPatterns, String[] acronymTags) {
-        if (mLogger.isDebugEnabled()) {
-            mLogger.debug("matchAcronyms("+text+")");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("matchAcronyms("+text+")");
         }
         
         Matcher matcher = null;
@@ -171,8 +171,8 @@ public class AcronymsPlugin implements W
     private Properties parseAcronymPage(WeblogTemplate acronymPage, Properties acronyms) {
         String rawAcronyms = acronymPage.getContents();
         
-        if (mLogger.isDebugEnabled()) {
-            mLogger.debug("parsing _acronyms template: \n'"+rawAcronyms+"'");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("parsing _acronyms template: \n'"+rawAcronyms+"'");
         }
         
         String regex = "\n"; // end of line

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java Sun Dec  1 14:39:51 2013
@@ -88,7 +88,7 @@ public class ConvertLineBreaksPlugin imp
          *
          * NOTE: we consider a paragraph to be 2 endlines with no text between them
          */
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         try {
             BufferedReader br = new BufferedReader(new StringReader(str));
             

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/GoogleLinkPlugin.java Sun Dec  1 14:39:51 2013
@@ -37,12 +37,12 @@ import java.util.regex.Pattern;
  * @version 2.1
  */
 public class GoogleLinkPlugin extends SearchPluginBase implements WeblogEntryPlugin {
-    private static final String version = "2.1";
-    private static final Pattern pattern = Pattern.compile("google([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
-    private static final MessageFormat linkFormat = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}\">{2}</a>");
-    private static final MessageFormat luckyLinkFormat = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}&btnI=on\">{2}</a>");
+    private static final String VERSION = "2.1";
+    private static final Pattern PATTERN = Pattern.compile("google([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
+    private static final MessageFormat LINK_FORMAT = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}\">{2}</a>");
+    private static final MessageFormat LUCKY_LINK_FORMAT = new MessageFormat("<a href=\"http://www.google.com/search?ie=UTF-8&q={3}&btnI=on\">{2}</a>");
 
-    private static final Log mLogger = LogFactory.getFactory().getInstance(GoogleLinkPlugin.class);
+    private static final Log LOG = LogFactory.getFactory().getInstance(GoogleLinkPlugin.class);
 
     public GoogleLinkPlugin() {
     }
@@ -56,22 +56,22 @@ public class GoogleLinkPlugin extends Se
     }
 
     public String getVersion() {
-        return version;
+        return VERSION;
     }
 
     public Pattern getPattern() {
-        return pattern;
+        return PATTERN;
     }
 
     public MessageFormat getLinkFormat() {
-        return linkFormat;
+        return LINK_FORMAT;
     }
 
     public MessageFormat getLuckyLinkFormat() {
-        return luckyLinkFormat;
+        return LUCKY_LINK_FORMAT;
     }
 
     public Log getLogger() {
-        return mLogger;
+        return LOG;
     }
 }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java Sun Dec  1 14:39:51 2013
@@ -123,7 +123,7 @@ public class SmileysPlugin implements We
      */
     private String htmlEscape(String smiley) {
         char[] chars = smiley.toCharArray();
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i=0; i<chars.length; i++) {
             if (chars[i] == '"') {
                 buf.append("&quot;");
@@ -151,7 +151,7 @@ public class SmileysPlugin implements We
     
     private String regexEscape(String smiley) {
         char[] chars = smiley.toCharArray();
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i=0; i<chars.length; i++) {
             for (int x=0; x<escape_regex.length; x++) {
                 if (escape_regex[x] == chars[i]) {

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/WikipediaLinkPlugin.java Sun Dec  1 14:39:51 2013
@@ -37,12 +37,12 @@ import java.util.regex.Pattern;
  * @version 2.1
  */
 public class WikipediaLinkPlugin extends SearchPluginBase implements WeblogEntryPlugin {
-    private static final String version = "2.1";
-    private static final Pattern pattern = Pattern.compile("wikipedia([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
-    private static final MessageFormat linkFormat = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}\">{2}</a>");
-    private static final MessageFormat luckyLinkFormat = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}&go=Go\">{2}</a>");
+    private static final String VERSION = "2.1";
+    private static final Pattern PATTERN = Pattern.compile("wikipedia([:!])\"(.*?)\"(?:\\{(.*?)\\})?");
+    private static final MessageFormat LINK_FORMAT = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}\">{2}</a>");
+    private static final MessageFormat LUCKY_LINK_FORMAT = new MessageFormat("<a href=\"http://www.wikipedia.org/wiki/Special:Search?search={3}&go=Go\">{2}</a>");
 
-    private static final Log mLogger = LogFactory.getFactory().getInstance(WikipediaLinkPlugin.class);
+    private static final Log LOG = LogFactory.getFactory().getInstance(WikipediaLinkPlugin.class);
 
     public WikipediaLinkPlugin() {
     }
@@ -56,22 +56,22 @@ public class WikipediaLinkPlugin extends
     }
 
     public String getVersion() {
-        return version;
+        return VERSION;
     }
 
     public Pattern getPattern() {
-        return pattern;
+        return PATTERN;
     }
 
     public MessageFormat getLinkFormat() {
-        return linkFormat;
+        return LINK_FORMAT;
     }
 
     public MessageFormat getLuckyLinkFormat() {
-        return luckyLinkFormat;
+        return LUCKY_LINK_FORMAT;
     }
 
     public Log getLogger() {
-        return mLogger;
+        return LOG;
     }
 }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java Sun Dec  1 14:39:51 2013
@@ -18,7 +18,6 @@
 
 package org.apache.roller.weblogger.business.themes;
 
-import org.apache.roller.weblogger.pojos.TemplateCode;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -32,52 +31,49 @@ import org.apache.roller.weblogger.pojos
 import org.apache.roller.weblogger.pojos.ThemeTemplate;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
 
-
 /**
- * The Theme object encapsulates all elements of a single weblog theme.  It
- * is used mostly to contain all the templates for a theme, but does contain
- * other theme related attributes such as name, last modifed date, etc.
+ * The Theme object encapsulates all elements of a single weblog theme. It is
+ * used mostly to contain all the templates for a theme, but does contain other
+ * theme related attributes such as name, last modifed date, etc.
  */
 public class SharedThemeFromDir extends SharedTheme {
-    
+
     private static Log log = LogFactory.getLog(SharedThemeFromDir.class);
-    
+
     // the filesystem directory where we should read this theme from
     private String themeDir = null;
-    
+
     // the theme preview image
     private ThemeResource previewImage = null;
-    
+
     // the theme stylesheet
     private ThemeTemplate stylesheet = null;
-    
+
     // we keep templates in a Map for faster lookups by name
     // the Map contains ... (template name, ThemeTemplate)
     private Map templatesByName = new HashMap();
-    
+
     // we keep templates in a Map for faster lookups by link
     // the Map contains ... (template link, List<tThemeTemplate>)
     private Map templatesByLink = new HashMap();
-    
+
     // we keep templates in a Map for faster lookups by action
     // the Map contains ... (template action, ThemeTemplate)
     private Map templatesByAction = new HashMap();
-    
+
     // we keep resources in a Map for faster lookups by path
     // the Map contains ... (resource path, ThemeResource)
     private Map resources = new HashMap();
-    
-    
-    public SharedThemeFromDir(String themeDirPath) 
+
+    public SharedThemeFromDir(String themeDirPath)
             throws ThemeInitializationException {
-        
+
         this.themeDir = themeDirPath;
-        
+
         // load the theme elements and cache 'em
         loadThemeFromDisk();
     }
 
-    
     /**
      * Get a resource representing the preview image for this theme.
      */
@@ -85,320 +81,333 @@ public class SharedThemeFromDir extends 
         return this.previewImage;
     }
 
-
     /**
      * Get the collection of all templates associated with this Theme.
      */
     public List getTemplates() {
         return new ArrayList(this.templatesByName.values());
     }
-    
-    
+
     /**
-     * Lookup the stylesheet.
-     * Returns null if no stylesheet defined.
+     * Lookup the stylesheet. Returns null if no stylesheet defined.
      */
     public ThemeTemplate getStylesheet() {
         return this.stylesheet;
     }
-    
-    
+
     /**
-     * Looup the default template, action = weblog.
-     * Returns null if the template cannot be found.
+     * Looup the default template, action = weblog. Returns null if the template
+     * cannot be found.
      */
     public ThemeTemplate getDefaultTemplate() {
-        return (ThemeTemplate) this.templatesByAction.get(ThemeTemplate.ACTION_WEBLOG);
+        return (ThemeTemplate) this.templatesByAction
+                .get(ThemeTemplate.ACTION_WEBLOG);
     }
-    
-    
+
     /**
-     * Lookup the specified template by name.
-     * Returns null if the template cannot be found.
+     * Lookup the specified template by name. Returns null if the template
+     * cannot be found.
      */
     public ThemeTemplate getTemplateByName(String name) {
         return (ThemeTemplate) this.templatesByName.get(name);
     }
-    
-    
+
     /**
-     * Lookup the specified template by link.
-     * Returns null if the template cannot be found.
+     * Lookup the specified template by link. Returns null if the template
+     * cannot be found.
      */
-     public ThemeTemplate getTemplateByLink(String link) {
+    public ThemeTemplate getTemplateByLink(String link) {
         return (ThemeTemplate) this.templatesByLink.get(link);
     }
-    
-    
+
     /**
-     * Lookup the specified template by action.
-     * Returns null if the template cannot be found.
+     * Lookup the specified template by action. Returns null if the template
+     * cannot be found.
      */
     public ThemeTemplate getTemplateByAction(String action) {
         return (ThemeTemplate) this.templatesByAction.get(action);
     }
-    
-    
+
     /**
      * Get the collection of all resources associated with this Theme.
-     *
+     * 
      * It is assured that the resources are returned sorted by pathname.
      */
     public List getResources() {
-        
+
         // make sure resources are sorted.
         List myResources = new ArrayList(this.resources.values());
         Collections.sort(myResources);
-        
+
         return myResources;
     }
-    
-    
+
     /**
-     * Lookup the specified resource by path.
-     * Returns null if the resource cannot be found.
+     * Lookup the specified resource by path. Returns null if the resource
+     * cannot be found.
      */
     public ThemeResource getResource(String path) {
         return (ThemeResource) this.resources.get(path);
     }
-    
-    
+
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(name);
         sb.append("\n");
-        
+
         Iterator it = this.templatesByName.values().iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             sb.append(it.next());
             sb.append("\n");
         }
-        
+
         return sb.toString();
-        
+
     }
-    
-    
-	/**
-	 * Load all the elements of this theme from disk and cache them.
-	 */
-	private void loadThemeFromDisk() throws ThemeInitializationException {
-
-		log.debug("Parsing theme descriptor for " + this.themeDir);
-
-		ThemeMetadata themeMetadata = null;
-		try {
-			// lookup theme descriptor and parse it
-			ThemeMetadataParser parser = new ThemeMetadataParser();
-			InputStream is = new FileInputStream(this.themeDir + File.separator + "theme.xml");
-			themeMetadata = parser.unmarshall(is);
-		} catch (Exception ex) {
-			throw new ThemeInitializationException("Unable to parse theme descriptor for theme " + this.themeDir, ex);
-		}
-
-		log.debug("Loading Theme " + themeMetadata.getName());
-
-		// use parsed theme descriptor to load Theme data
-		setId(themeMetadata.getId());
-		setName(themeMetadata.getName());
-		setDescription(themeMetadata.getName());
-		setType(themeMetadata.getType());
-		setAuthor(themeMetadata.getAuthor());
-		setLastModified(null);
-		setEnabled(true);
-
-		// load resource representing preview image
-		File previewFile = new File(this.themeDir + File.separator + themeMetadata.getPreviewImage());
-		if (!previewFile.exists() || !previewFile.canRead()) {
-			log.warn("Couldn't read theme [" + this.getName() + "] preview image file [" + themeMetadata.getPreviewImage() + "]");
-		} else {
-			this.previewImage = new SharedThemeResourceFromDir(themeMetadata.getPreviewImage(), previewFile);
-		}
-
-		//avaialble types in the Roller
-		List<String> availableTypesList = new ArrayList<String>();
-		availableTypesList.add("standard");
-		availableTypesList.add("mobile");
-
-		// load stylesheet if possible
-		if (themeMetadata.getStylesheet() != null) {
-
-			ThemeMetadataTemplate stylesheetTmpl = themeMetadata.getStylesheet();
-			// getting the template codes for available types
-			ThemeMetadataTemplateCode standardTemplateCode = stylesheetTmpl.getTemplateCodeTable().get("standard");
-			ThemeMetadataTemplateCode mobileTemplateCode = stylesheetTmpl.getTemplateCodeTable().get("mobile");
-
-			// If no template code present for any type
-			if (standardTemplateCode == null && mobileTemplateCode == null) {
-				throw new ThemeInitializationException("Error in getting template codes for template");
-			} else if (mobileTemplateCode == null) {
-				//cloning the standard template code if no mobile is present
-				mobileTemplateCode = new ThemeMetadataTemplateCode();
-				mobileTemplateCode.setContentsFile(standardTemplateCode.getContentsFile());
-				mobileTemplateCode.setContentType(standardTemplateCode.getContentType());
-				mobileTemplateCode.setTemplateLang(standardTemplateCode.getTemplateLang());
-				mobileTemplateCode.setType("mobile");
-
-				stylesheetTmpl.addTemplateCode("mobile", mobileTemplateCode);
-			}
-
-
-			// construct File object from path
-			// we are getting the file path from standard as the default and load it to initially.
-			File templateFile = new File(this.themeDir + File.separator
-					+ standardTemplateCode.getContentsFile());
-
-			// read stylesheet contents
-			String contents = loadTemplateFile(templateFile);
-			if (contents == null) {
-				// if we don't have any contents then skip this one
-				log.error("Couldn't load stylesheet theme [" + this.getName() + "] template file [" + templateFile + "]");
-			} else {
-
-				// construct ThemeTemplate representing this file
-				// here we set content and template language from standard template code assuming it is the default
-				SharedThemeTemplate theme_template = new SharedThemeTemplate(
-						this,
-						themeMetadata.getId() + ":" + stylesheetTmpl.getName(),
-						WeblogTemplate.ACTION_CUSTOM,
-						stylesheetTmpl.getName(),
-						stylesheetTmpl.getDescription(),
-						contents,
-						stylesheetTmpl.getLink(),
-						new Date(templateFile.lastModified()),
-						standardTemplateCode.getTemplateLang(),
-						false,
-						false);
-
-
-				for (String type : availableTypesList) {
-					TemplateCode templateCode = createTemplateCode(theme_template.getId(), stylesheetTmpl.getTemplateCode(type));
-
-					theme_template.addTemplateCode(type, templateCode);
-					
-					// Set Last Modified
-					Date lstModified = theme_template.getLastModified();
-					if (getLastModified() == null
-							|| lstModified.after(getLastModified())) {
-						setLastModified(lstModified);
-					}
-				}
-				// store it
-				this.stylesheet = theme_template;
-
-				addTemplate(theme_template);
-			}
-
-		}
-
-		// go through static resources and add them to the theme
-		String resourcePath = null;
-		Iterator resourcesIter = themeMetadata.getResources().iterator();
-		while (resourcesIter.hasNext()) {
-			resourcePath = (String) resourcesIter.next();
-
-			// construct ThemeResource object from resource
-			File resourceFile = new File(this.themeDir + File.separator + resourcePath);
-
-			// Continue reading theme even if problem encountered with one file
-			if (!resourceFile.exists() || !resourceFile.canRead()) {
-				log.warn("Couldn't read  theme [" + this.getName() + "] resource file [" + resourcePath + "]");
-				continue;
-			}
-
-			// add it to the theme
-			setResource(resourcePath, new SharedThemeResourceFromDir(resourcePath, resourceFile));
-
-			// Set Last Modified
-			Date lstModified = new Date(resourceFile.lastModified());
-			if (getLastModified() == null
-					|| lstModified.after(getLastModified())) {
-				setLastModified(lstModified);
-			}
-
-		}
-
-		// go through templates and read in contents to a ThemeTemplate
-		SharedThemeTemplate theme_template = null;
-		ThemeMetadataTemplate templateMetadata = null;
-		Iterator templatesIter = themeMetadata.getTemplates().iterator();
-		while (templatesIter.hasNext()) {
-			templateMetadata = (ThemeMetadataTemplate) templatesIter.next();
-
-			//getting the template codes for available types
-			ThemeMetadataTemplateCode standardTemplateCode = templateMetadata.getTemplateCodeTable().get("standard");
-			ThemeMetadataTemplateCode mobileTemplateCode = templateMetadata.getTemplateCodeTable().get("mobile");
-
-			//If no template code present for any type
-			if (standardTemplateCode == null && mobileTemplateCode == null) {
-				throw new ThemeInitializationException("Error in getting template codes for template");
-			} else if (mobileTemplateCode == null) {
-				//cloning the standard template code if no mobile is present
-				mobileTemplateCode = new ThemeMetadataTemplateCode();
-				mobileTemplateCode.setContentsFile(standardTemplateCode.getContentsFile());
-				mobileTemplateCode.setContentType(standardTemplateCode.getContentType());
-				mobileTemplateCode.setTemplateLang(standardTemplateCode.getTemplateLang());
-				mobileTemplateCode.setType("mobile");
-
-				templateMetadata.addTemplateCode("mobile", mobileTemplateCode);
-			}
-
-			// construct File object from path
-			File templateFile = new File(this.themeDir + File.separator
-					+ standardTemplateCode.getContentsFile());
-
-			String contents = loadTemplateFile(templateFile);
-			if (contents == null) {
-				// if we don't have any contents then skip this one
-				throw new ThemeInitializationException("Couldn't load theme [" + this.getName() + "] template file [" + templateFile + "]");
-			}
-
-			// construct ThemeTemplate representing this file
-			theme_template = new SharedThemeTemplate(
-					this,
-					themeMetadata.getId() + ":" + templateMetadata.getName(),
-					templateMetadata.getAction(),
-					templateMetadata.getName(),
-					templateMetadata.getDescription(),
-					contents,
-					templateMetadata.getLink(),
-					new Date(templateFile.lastModified()),
-					standardTemplateCode.getTemplateLang(),
-					templateMetadata.isHidden(),
-					templateMetadata.isNavbar());
-
-			for (String type : availableTypesList) {
-				SharedThemeTemplateCode templateCode = createTemplateCode(theme_template.getId(),
-						templateMetadata.getTemplateCode(type));
-
-				theme_template.addTemplateCode(type, templateCode);
-				
-				// Set Last Modified
-				Date lstModified = templateCode.getLastModified();
-				if (getLastModified() == null
-						|| lstModified.after(getLastModified())) {
-					setLastModified(lstModified);
-				}
-			}
-			
-			theme_template.setLastModified(getLastModified());
-
-			// add it to the theme
-			addTemplate(theme_template);
-
-		}
-	}
-    
-    
+
+    /**
+     * Load all the elements of this theme from disk and cache them.
+     */
+    private void loadThemeFromDisk() throws ThemeInitializationException {
+
+        log.debug("Parsing theme descriptor for " + this.themeDir);
+
+        ThemeMetadata themeMetadata = null;
+        try {
+            // lookup theme descriptor and parse it
+            ThemeMetadataParser parser = new ThemeMetadataParser();
+            InputStream is = new FileInputStream(this.themeDir + File.separator
+                    + "theme.xml");
+            themeMetadata = parser.unmarshall(is);
+        } catch (Exception ex) {
+            throw new ThemeInitializationException(
+                    "Unable to parse theme descriptor for theme "
+                            + this.themeDir, ex);
+        }
+
+        log.debug("Loading Theme " + themeMetadata.getName());
+
+        // use parsed theme descriptor to load Theme data
+        setId(themeMetadata.getId());
+        setName(themeMetadata.getName());
+        setDescription(themeMetadata.getName());
+        setType(themeMetadata.getType());
+        setAuthor(themeMetadata.getAuthor());
+        setLastModified(null);
+        setEnabled(true);
+
+        // load resource representing preview image
+        File previewFile = new File(this.themeDir + File.separator
+                + themeMetadata.getPreviewImage());
+        if (!previewFile.exists() || !previewFile.canRead()) {
+            log.warn("Couldn't read theme [" + this.getName()
+                    + "] preview image file ["
+                    + themeMetadata.getPreviewImage() + "]");
+        } else {
+            this.previewImage = new SharedThemeResourceFromDir(
+                    themeMetadata.getPreviewImage(), previewFile);
+        }
+
+        // avaialble types in the Roller
+        List<String> availableTypesList = new ArrayList<String>();
+        availableTypesList.add("standard");
+        availableTypesList.add("mobile");
+
+        // load stylesheet if possible
+        if (themeMetadata.getStylesheet() != null) {
+
+            ThemeMetadataTemplate stylesheetTmpl = themeMetadata
+                    .getStylesheet();
+            // getting the template codes for available types
+            ThemeMetadataTemplateCode standardTemplateCode = stylesheetTmpl
+                    .getTemplateCodeTable().get("standard");
+            ThemeMetadataTemplateCode mobileTemplateCode = stylesheetTmpl
+                    .getTemplateCodeTable().get("mobile");
+
+            // If no template code present for any type
+            if (standardTemplateCode == null && mobileTemplateCode == null) {
+                throw new ThemeInitializationException(
+                        "Error in getting template codes for template");
+            } else if (mobileTemplateCode == null) {
+                // cloning the standard template code if no mobile is present
+                mobileTemplateCode = new ThemeMetadataTemplateCode();
+                mobileTemplateCode.setContentsFile(standardTemplateCode
+                        .getContentsFile());
+                mobileTemplateCode.setContentType(standardTemplateCode
+                        .getContentType());
+                mobileTemplateCode.setTemplateLang(standardTemplateCode
+                        .getTemplateLang());
+                mobileTemplateCode.setType("mobile");
+
+                stylesheetTmpl.addTemplateCode("mobile", mobileTemplateCode);
+            }
+
+            // construct File object from path
+            // we are getting the file path from standard as the default and
+            // load it to initially.
+            File templateFile = new File(this.themeDir + File.separator
+                    + standardTemplateCode.getContentsFile());
+
+            // read stylesheet contents
+            String contents = loadTemplateFile(templateFile);
+            if (contents == null) {
+                // if we don't have any contents then skip this one
+                log.error("Couldn't load stylesheet theme [" + this.getName()
+                        + "] template file [" + templateFile + "]");
+            } else {
+
+                // construct ThemeTemplate representing this file
+                // here we set content and template language from standard
+                // template code assuming it is the default
+                SharedThemeTemplate theme_template = new SharedThemeTemplate(
+                        this, themeMetadata.getId() + ":"
+                                + stylesheetTmpl.getName(),
+                        WeblogTemplate.ACTION_CUSTOM, stylesheetTmpl.getName(),
+                        stylesheetTmpl.getDescription(), contents,
+                        stylesheetTmpl.getLink(), new Date(
+                                templateFile.lastModified()),
+                        standardTemplateCode.getTemplateLang(), false, false);
+
+                for (String type : availableTypesList) {
+                    SharedThemeTemplateCode templateCode = createTemplateCode(
+                            theme_template.getId(),
+                            stylesheetTmpl.getTemplateCode(type));
+
+                    theme_template.addTemplateCode(type, templateCode);
+
+                    // Set Last Modified
+                    Date lstModified = templateCode.getLastModified();
+                    if (getLastModified() == null
+                            || lstModified.after(getLastModified())) {
+                        setLastModified(lstModified);
+                    }
+                }
+                // store it
+                this.stylesheet = theme_template;
+
+                // Update last modified
+                theme_template.setLastModified(getLastModified());
+
+                addTemplate(theme_template);
+            }
+
+        }
+
+        // go through static resources and add them to the theme
+        String resourcePath = null;
+        Iterator resourcesIter = themeMetadata.getResources().iterator();
+        while (resourcesIter.hasNext()) {
+            resourcePath = (String) resourcesIter.next();
+
+            // construct ThemeResource object from resource
+            File resourceFile = new File(this.themeDir + File.separator
+                    + resourcePath);
+
+            // Continue reading theme even if problem encountered with one file
+            if (!resourceFile.exists() || !resourceFile.canRead()) {
+                log.warn("Couldn't read  theme [" + this.getName()
+                        + "] resource file [" + resourcePath + "]");
+                continue;
+            }
+
+            // add it to the theme
+            setResource(resourcePath, new SharedThemeResourceFromDir(
+                    resourcePath, resourceFile));
+
+            // Set Last Modified
+            Date lstModified = new Date(resourceFile.lastModified());
+            if (getLastModified() == null
+                    || lstModified.after(getLastModified())) {
+                setLastModified(lstModified);
+            }
+
+        }
+
+        // go through templates and read in contents to a ThemeTemplate
+        SharedThemeTemplate theme_template = null;
+        ThemeMetadataTemplate templateMetadata = null;
+        Iterator templatesIter = themeMetadata.getTemplates().iterator();
+        while (templatesIter.hasNext()) {
+            templateMetadata = (ThemeMetadataTemplate) templatesIter.next();
+
+            // getting the template codes for available types
+            ThemeMetadataTemplateCode standardTemplateCode = templateMetadata
+                    .getTemplateCodeTable().get("standard");
+            ThemeMetadataTemplateCode mobileTemplateCode = templateMetadata
+                    .getTemplateCodeTable().get("mobile");
+
+            // If no template code present for any type
+            if (standardTemplateCode == null && mobileTemplateCode == null) {
+                throw new ThemeInitializationException(
+                        "Error in getting template codes for template");
+            } else if (mobileTemplateCode == null) {
+                // cloning the standard template code if no mobile is present
+                mobileTemplateCode = new ThemeMetadataTemplateCode();
+                mobileTemplateCode.setContentsFile(standardTemplateCode
+                        .getContentsFile());
+                mobileTemplateCode.setContentType(standardTemplateCode
+                        .getContentType());
+                mobileTemplateCode.setTemplateLang(standardTemplateCode
+                        .getTemplateLang());
+                mobileTemplateCode.setType("mobile");
+
+                templateMetadata.addTemplateCode("mobile", mobileTemplateCode);
+            }
+
+            // construct File object from path
+            File templateFile = new File(this.themeDir + File.separator
+                    + standardTemplateCode.getContentsFile());
+
+            String contents = loadTemplateFile(templateFile);
+            if (contents == null) {
+                // if we don't have any contents then skip this one
+                throw new ThemeInitializationException("Couldn't load theme ["
+                        + this.getName() + "] template file [" + templateFile
+                        + "]");
+            }
+
+            // construct ThemeTemplate representing this file
+            theme_template = new SharedThemeTemplate(this,
+                    themeMetadata.getId() + ":" + templateMetadata.getName(),
+                    templateMetadata.getAction(), templateMetadata.getName(),
+                    templateMetadata.getDescription(), contents,
+                    templateMetadata.getLink(), new Date(
+                            templateFile.lastModified()),
+                    standardTemplateCode.getTemplateLang(),
+                    templateMetadata.isHidden(), templateMetadata.isNavbar());
+
+            for (String type : availableTypesList) {
+                SharedThemeTemplateCode templateCode = createTemplateCode(
+                        theme_template.getId(),
+                        templateMetadata.getTemplateCode(type));
+
+                theme_template.addTemplateCode(type, templateCode);
+
+                // Set Last Modified
+                Date lstModified = templateCode.getLastModified();
+                if (getLastModified() == null
+                        || lstModified.after(getLastModified())) {
+                    setLastModified(lstModified);
+                }
+            }
+
+            theme_template.setLastModified(getLastModified());
+
+            // add it to the theme
+            addTemplate(theme_template);
+
+        }
+    }
+
     /**
      * Load a single template file as a string, returns null if can't read file.
      */
     private String loadTemplateFile(File templateFile) {
         // Continue reading theme even if problem encountered with one file
-        if(!templateFile.exists() && !templateFile.canRead()) {
+        if (!templateFile.exists() && !templateFile.canRead()) {
             return null;
         }
-        
+
         char[] chars = null;
         int length;
         try {
@@ -407,29 +416,28 @@ public class SharedThemeFromDir extends 
             InputStreamReader reader = new InputStreamReader(stream, "UTF-8");
             length = reader.read(chars);
         } catch (Exception noprob) {
-            log.error("Exception reading theme [" + this.getName() + "] template file ["+templateFile+"]");
+            log.error("Exception reading theme [" + this.getName()
+                    + "] template file [" + templateFile + "]");
             if (log.isDebugEnabled()) {
                 log.debug(noprob);
             }
             return null;
         }
-        
+
         return new String(chars, 0, length);
     }
-    
-    
-   /**
+
+    /**
      * Set the value for a given template name.
      */
     private void addTemplate(ThemeTemplate template) {
         this.templatesByName.put(template.getName(), template);
         this.templatesByLink.put(template.getLink(), template);
-        if(!ThemeTemplate.ACTION_CUSTOM.equals(template.getAction())) {
+        if (!ThemeTemplate.ACTION_CUSTOM.equals(template.getAction())) {
             this.templatesByAction.put(template.getAction(), template);
         }
     }
-    
-    
+
     /**
      * Set the value for a given resource path.
      */
@@ -439,29 +447,32 @@ public class SharedThemeFromDir extends 
         this.resources.put(normalizedPath, resource);
     }
 
-	private SharedThemeTemplateCode createTemplateCode(String templateId, ThemeMetadataTemplateCode templateCodeMetadata) {
-		SharedThemeTemplateCode templateCode = new SharedThemeTemplateCode();
+    private SharedThemeTemplateCode createTemplateCode(String templateId,
+            ThemeMetadataTemplateCode templateCodeMetadata) {
+        SharedThemeTemplateCode templateCode = new SharedThemeTemplateCode();
+
+        // construct File object from path
+        File templateFile = new File(this.themeDir + File.separator
+                + templateCodeMetadata.getContentsFile());
+
+        // read stylesheet contents
+        String contents = loadTemplateFile(templateFile);
+        if (contents == null) {
+            // if we don't have any contents then load no string
+            contents = "";
+            log.error("Couldn't load stylesheet theme [" + this.getName()
+                    + "] template file [" + templateFile + "]");
+        }
 
-		// construct File object from path
-		File templateFile = new File(this.themeDir + File.separator
-				+ templateCodeMetadata.getContentsFile());
-
-		// read stylesheet contents
-		String contents = loadTemplateFile(templateFile);
-		if (contents == null) {
-			// if we don't have any contents then load no string
-			contents = "";
-			log.error("Couldn't load stylesheet theme [" + this.getName() + "] template file [" + templateFile + "]");
-		}
-
-		templateCode.setTemplateId(templateId);
-		templateCode.setTemplate(contents);
-		templateCode.setTemplateLanguage(templateCodeMetadata.getTemplateLang());
-		templateCode.setType(templateCodeMetadata.getType());
-		templateCode.setContentType(templateCodeMetadata.getContentType());
-		templateCode.setLastModified(new Date(templateFile.lastModified()));
+        templateCode.setTemplateId(templateId);
+        templateCode.setTemplate(contents);
+        templateCode
+                .setTemplateLanguage(templateCodeMetadata.getTemplateLang());
+        templateCode.setType(templateCodeMetadata.getType());
+        templateCode.setContentType(templateCodeMetadata.getContentType());
+        templateCode.setLastModified(new Date(templateFile.lastModified()));
 
-		return templateCode;
-	}
+        return templateCode;
+    }
 
 }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java Sun Dec  1 14:39:51 2013
@@ -54,7 +54,7 @@ public class TagStat implements java.io.
     }
 
     public String toString() {
-        StringBuffer str = new StringBuffer("{");
+        StringBuilder str = new StringBuilder("{");
 
         str.append("name=" + name + " " + "count=" + count);
         str.append('}');

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java:r1529476-1546815

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/User.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/User.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/User.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/User.java Sun Dec  1 14:39:51 2013
@@ -33,9 +33,6 @@ import org.apache.roller.weblogger.util.
 
 /**
  * User bean.
- *
- * @hibernate.cache usage="read-write"
- * @hibernate.class lazy="true" table="rolleruser"
  */
 public class User implements Serializable {
     
@@ -76,8 +73,6 @@ public class User implements Serializabl
     
     /**
      * Id of the User.
-     *
-     * @hibernate.id column="id" generator-class="assigned"
      */
     public String getId() {
         return this.id;
@@ -90,7 +85,6 @@ public class User implements Serializabl
     
     /**
      * User name of the user.
-     * @hibernate.property column="username" non-null="true" unique="true"
      */
     public String getUserName() {
         return this.userName;
@@ -103,8 +97,6 @@ public class User implements Serializabl
     /**
      * Get password.
      * If password encryption is enabled, will return encrypted password.
-     *
-     * @hibernate.property column="passphrase" non-null="true"
      */
     public String getPassword() {
         return this.password;
@@ -137,8 +129,6 @@ public class User implements Serializabl
     
     /**
      * Screen name of the user.
-     *
-     * @hibernate.property column="screenname" non-null="true" unique="true"
      */
     public String getScreenName() {
         return this.screenName;
@@ -148,11 +138,8 @@ public class User implements Serializabl
         this.screenName = screenName;
     }
     
-    
     /**
      * Full name of the user.
-     *
-     * @hibernate.property column="fullname" non-null="true" unique="true"
      */
     public String getFullName() {
         return this.fullName;
@@ -161,12 +148,9 @@ public class User implements Serializabl
     public void setFullName( String fullName ) {
         this.fullName = fullName;
     }
-    
-    
+
     /**
      * E-mail address of the user.
-     *
-     * @hibernate.property column="emailaddress" non-null="true" unique="true"
      */
     public String getEmailAddress() {
         return this.emailAddress;
@@ -179,8 +163,6 @@ public class User implements Serializabl
     
     /**
      * The date the user was created.
-     *
-     * @hibernate.property column="datecreated" non-null="true" unique="false"
      */
     public Date getDateCreated() {
         if (dateCreated == null) {
@@ -197,12 +179,9 @@ public class User implements Serializabl
             dateCreated = null;
         }
     }
-    
-    
+
     /**
      * Locale of the user.
-     *
-     * @hibernate.property column="locale" non-null="true" unique="false"
      */
     public String getLocale() {
         return this.locale;
@@ -211,12 +190,9 @@ public class User implements Serializabl
     public void setLocale(String locale) {
         this.locale = locale;
     }
-    
-    
+
     /**
      * Timezone of the user.
-     *
-     * @hibernate.property column="timeZone" non-null="true" unique="false"
      */
     public String getTimeZone() {
         return this.timeZone;
@@ -229,8 +205,6 @@ public class User implements Serializabl
     
     /**
      * Is this user account enabled?  Disabled accounts cannot login.
-     *
-     * @hibernate.property column="isenabled" non-null="true" unique="false"
      */
     public Boolean getEnabled() {
         return this.enabled;
@@ -240,12 +214,6 @@ public class User implements Serializabl
         this.enabled = enabled;
     }
     
-    
-    /** 
-     * Activation code.
-     *
-     * @hibernate.property column="activationcode" non-null="false"
-     */
     public String getActivationCode() {
         return activationCode;
     }

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/User.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/User.java:r1529476-1546815

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java Sun Dec  1 14:39:51 2013
@@ -71,19 +71,10 @@ public class WeblogBookmark implements S
     
     //------------------------------------------------------------- Attributes
     
-    /**
-     * @roller.wrapPojoMethod type="simple"
-     *
-     * @ejb:persistent-field
-     *
-     * @hibernate.id column="id"
-     *     generator-class="assigned"
-     */
     public String getId() {
         return this.id;
     }
     
-    /** @ejb:persistent-field */
     public void setId(String id) {
         this.id = id;
     }
@@ -91,56 +82,35 @@ public class WeblogBookmark implements S
     /**
      * Name of bookmark.
      *
-     * @roller.wrapPojoMethod type="simple"
-     *
      * @struts.validator type="required" msgkey="errors.required"
      * @struts.validator-args arg0resource="bookmarkForm.name"
-     *
-     * @ejb:persistent-field
-     *
-     * @hibernate.property column="name" non-null="true" unique="false"
      */
     public String getName() {
         return this.name;
     }
     
-    /** @ejb:persistent-field */
     public void setName(String name) {
         this.name = name;
     }
     
     /**
      * Description of bookmark.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     *
-     * @ejb:persistent-field
-     *
-     * @hibernate.property column="description" non-null="true" unique="false"
      */
     public String getDescription() {
         return this.description;
     }
     
-    /** @ejb:persistent-field */
     public void setDescription(String description) {
         this.description = description;
     }
     
     /**
      * URL of bookmark.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     *
-     * @ejb:persistent-field
-     *
-     * @hibernate.property column="url" non-null="true" unique="false"
      */
     public String getUrl() {
         return this.url;
     }
     
-    /** @ejb:persistent-field */
     public void setUrl(String url) {
         this.url = url;
     }
@@ -148,21 +118,14 @@ public class WeblogBookmark implements S
     /**
      * Weight indicates prominence of link
      *
-     * @roller.wrapPojoMethod type="simple"
-     *
      * @struts.validator type="required" msgkey="errors.required"
      * @struts.validator type="integer" msgkey="errors.integer"
      * @struts.validator-args arg0resource="bookmarkForm.weight"
-     *
-     * @ejb:persistent-field
-     *
-     * @hibernate.property column="weight" non-null="true" unique="false"
      */
     public java.lang.Integer getWeight() {
         return this.weight;
     }
     
-    /** @ejb:persistent-field */
     public void setWeight(java.lang.Integer weight) {
         this.weight = weight;
     }
@@ -170,69 +133,40 @@ public class WeblogBookmark implements S
     /**
      * Priority determines order of display
      *
-     * @roller.wrapPojoMethod type="simple"
-     *
      * @struts.validator type="required" msgkey="errors.required"
      * @struts.validator type="integer" msgkey="errors.integer"
      * @struts.validator-args arg0resource="bookmarkForm.priority"
-     *
-     * @ejb:persistent-field
-     *
-     * @hibernate.property column="priority" non-null="true" unique="false"
      */
     public java.lang.Integer getPriority() {
         return this.priority;
     }
     
-    /** @ejb:persistent-field */
     public void setPriority(java.lang.Integer priority) {
         this.priority = priority;
     }
     
-    /**
-     * @ejb:persistent-field
-     *
-     * @roller.wrapPojoMethod type="simple"
-     *
-     * @hibernate.property column="image" non-null="true" unique="false"
-     */
     public String getImage() {
         return this.image;
     }
     
-    /** @ejb:persistent-field */
     public void setImage(String image) {
         this.image = image;
     }
     
-    /**
-     * @ejb:persistent-field
-     *
-     * @roller.wrapPojoMethod type="simple"
-     *
-     * @hibernate.property column="feedurl" non-null="true" unique="false"
-     */
     public String getFeedUrl() {
         return this.feedUrl;
     }
     
-    /** @ejb:persistent-field */
     public void setFeedUrl(String feedUrl) {
         this.feedUrl = feedUrl;
     }
     
     //---------------------------------------------------------- Relationships
-    
-    /**
-     * @roller.wrapPojoMethod type="pojo"
-     * @ejb:persistent-field
-     * @hibernate.many-to-one column="folderid" cascade="none" not-null="true"
-     */
+
     public org.apache.roller.weblogger.pojos.WeblogBookmarkFolder getFolder() {
         return this.folder;
     }
     
-    /** @ejb:persistent-field */
     public void setFolder(org.apache.roller.weblogger.pojos.WeblogBookmarkFolder folder) {
         this.folder = folder;
     }

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogBookmark.java:r1529476-1546815

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java Sun Dec  1 14:39:51 2013
@@ -35,9 +35,6 @@ import org.apache.roller.util.UUIDGenera
 
 /**
  * Weblog Category.
- * 
- * @hibernate.cache usage="read-write"
- * @hibernate.class lazy="true" table="weblogcategory"
  */
 public class WeblogCategory implements Serializable, Comparable {
     
@@ -89,7 +86,7 @@ public class WeblogCategory implements S
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getPath());
@@ -131,8 +128,6 @@ public class WeblogCategory implements S
     
     /**
      * Database surrogate key.
-     *
-     * @hibernate.id column="id" generator-class="assigned"  
      */
     public String getId() {
         return this.id;
@@ -145,8 +140,6 @@ public class WeblogCategory implements S
     
     /**
      * The display name for this category.
-     *
-     * @hibernate.property column="name" non-null="true" unique="false"
      */
     public String getName() {
         return this.name;
@@ -159,8 +152,6 @@ public class WeblogCategory implements S
     
     /**
      * A full description for this category.
-     *
-     * @hibernate.property column="description" non-null="true" unique="false"
      */
     public String getDescription() {
         return this.description;
@@ -173,8 +164,6 @@ public class WeblogCategory implements S
     
     /**
      * An image icon to represent this category.
-     *
-     * @hibernate.property column="image" non-null="true" unique="false"
      */
     public String getImage() {
         return this.image;
@@ -187,8 +176,6 @@ public class WeblogCategory implements S
     
     /**
      * The full path to this category in the hierarchy.
-     *
-     * @hibernate.property column="path" non-null="true" unique="false"
      */
     public String getPath() {
         return this.path;
@@ -201,8 +188,6 @@ public class WeblogCategory implements S
     
     /**
      * Get the weblog which owns this category.
-     *
-     * @hibernate.many-to-one column="websiteid" cascade="none" not-null="true"
      */
     public Weblog getWebsite() {
         return website;
@@ -215,8 +200,6 @@ public class WeblogCategory implements S
     
     /**
      * Get parent category, or null if category is root of hierarchy.
-     *
-     * @hibernate.many-to-one column="parentid" cascade="none" not-null="false"
      */
     public WeblogCategory getParent() {
         return this.parentCategory;
@@ -229,10 +212,6 @@ public class WeblogCategory implements S
     
     /**
      * Get child categories of this category.
-     * 
-     * @hibernate.collection-key column="parentid"
-     * @hibernate.collection-one-to-many class="org.apache.roller.weblogger.pojos.WeblogCategory"
-     * @hibernate.set lazy="true" inverse="true" cascade="delete" order-by="name"
      */
     public Set getWeblogCategories() {
         return this.childCategories;

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java:r1529476-1546815

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogPermission.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogPermission.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogPermission.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogPermission.java Sun Dec  1 14:39:51 2013
@@ -30,10 +30,7 @@ import org.apache.roller.weblogger.busin
 
 /**
  * Permission for one specific weblog
- * @ejb:bean name="WeblogPermission"
  * @struts.form include-all="true"
- * @hibernate.class lazy="true" table="roller_user_permissions"
- * @hibernate.cache usage="read-write"
  *
  * @author Dave Johnson
  */
@@ -152,7 +149,3 @@ public class WeblogPermission extends Ob
                 .toHashCode();
     }
 }
-
-
-
-

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogPermission.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogPermission.java:r1529476-1546815

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java Sun Dec  1 14:39:51 2013
@@ -96,9 +96,6 @@ public class WeblogReferrer implements S
     
     /**
      * ID of website that this referer refers to.
-     *
-     * @roller.wrapPojoMethod type="pojo"
-     * @hibernate.many-to-one column="websiteid" cascade="none" not-null="true"
      */
     public org.apache.roller.weblogger.pojos.Weblog getWebsite() {
         return this.website;
@@ -108,10 +105,6 @@ public class WeblogReferrer implements S
         this.website = website;
     }
     
-    /**
-     * @roller.wrapPojoMethod type="pojo"
-     * @hibernate.many-to-one column="entryid" cascade="none"
-     */
     public org.apache.roller.weblogger.pojos.WeblogEntry getWeblogEntry() {
         return weblogEntry;
     }
@@ -125,9 +118,6 @@ public class WeblogReferrer implements S
     
     /**
      * Date string in YYYYMMDD format.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="datestr" non-null="true" unique="false"
      */
     public String getDateString() {
         return this.dateString;
@@ -139,9 +129,6 @@ public class WeblogReferrer implements S
     
     /**
      * URL of the refering page.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="refurl" non-null="true" unique="false"
      */
     public String getRefererUrl() {
         return this.refererUrl;
@@ -156,9 +143,6 @@ public class WeblogReferrer implements S
     
     /**
      * Requested URL, the URL linked to by the refering page.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="refpermalink" non-null="true" unique="false"
      */
     public String getRefererPermalink() {
         return this.refererPermalink;
@@ -170,9 +154,6 @@ public class WeblogReferrer implements S
     
     /**
      * Requested URL, the URL linked to by the refering page.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="requrl" non-null="true" unique="false"
      */
     public String getRequestUrl() {
         return this.requestUrl;
@@ -184,9 +165,6 @@ public class WeblogReferrer implements S
     
     /**
      * The text on the refering page that surrounds the refering link.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="title" non-null="true" unique="false"
      */
     public String getTitle() {
         return this.title;
@@ -198,9 +176,6 @@ public class WeblogReferrer implements S
     
     /**
      * The text on the refering page that surrounds the refering link.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="excerpt" non-null="true" unique="false"
      */
     public String getExcerpt() {
         return this.excerpt;
@@ -212,9 +187,6 @@ public class WeblogReferrer implements S
     
     /**
      * Should this referer be displayed?
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="visible" non-null="true" unique="false"
      */
     public Boolean getVisible() {
         return this.visible;
@@ -226,9 +198,6 @@ public class WeblogReferrer implements S
     
     /**
      * Is this referer a duplicate?
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="duplicate" non-null="true" unique="false"
      */
     public Boolean getDuplicate() {
         return this.duplicate;
@@ -240,9 +209,6 @@ public class WeblogReferrer implements S
     
     /**
      * Hits received today from this referer.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="dayhits" non-null="true" unique="false"
      */
     public Integer getDayHits() {
         return this.dayHits;
@@ -254,9 +220,6 @@ public class WeblogReferrer implements S
     
     /**
      * Total hits received from this referer.
-     *
-     * @roller.wrapPojoMethod type="simple"
-     * @hibernate.property column="totalhits" non-null="true" unique="false"
      */
     public Integer getTotalHits() {
         return this.totalHits;
@@ -266,13 +229,8 @@ public class WeblogReferrer implements S
         this.totalHits = totalHits;
     }
     
-    //-------------------------------------------------------------------------
-    
-    /**
-     * @roller.wrapPojoMethod type="simple"
-     */
     public String getDisplayUrl(int maxWidth, boolean includeHits) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         
         String url = StringEscapeUtils.escapeHtml(getUrl());
         String displayUrl = url.trim();
@@ -318,11 +276,6 @@ public class WeblogReferrer implements S
         return sb.toString();
     }
     
-    //-------------------------------------------------------------------------
-    
-    /**
-     * @roller.wrapPojoMethod type="simple"
-     */
     public String getUrl() {
         if (getRefererPermalink() != null) {
             return getRefererPermalink();
@@ -331,11 +284,6 @@ public class WeblogReferrer implements S
         }
     }
     
-    //-------------------------------------------------------------------------
-    
-    /**
-     * @roller.wrapPojoMethod type="simple"
-     */
     public String getDisplayUrl() {
         return getDisplayUrl(50, false);
     }

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java:r1529476-1546815

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java Sun Dec  1 14:39:51 2013
@@ -144,7 +144,7 @@ public class RollerContext extends Conte
         // if preparation failed or is incomplete then we are done,
         // otherwise try to bootstrap the business tier
         if (!WebloggerStartup.isPrepared()) {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             buf.append("\n--------------------------------------------------------------");
             buf.append("\nRoller Weblogger startup INCOMPLETE, user interaction required");
             buf.append("\n--------------------------------------------------------------");

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerSession.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerSession.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerSession.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerSession.java Sun Dec  1 14:39:51 2013
@@ -110,7 +110,7 @@ public class RollerSession 
                         }
                     }
                     // only set authenticated user if user is enabled
-                    if (user != null && user.getEnabled().booleanValue()) {
+                    if (user != null && user.getEnabled()) {
                         rollerSession.setAuthenticatedUser(user);
                     }
                     

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/Renderer.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/Renderer.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/Renderer.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/Renderer.java Sun Dec  1 14:39:51 2013
@@ -34,6 +34,6 @@ public interface Renderer {
      *
      * Throws an exception if there is a problem during rendering.
      */
-    void render(Map model, Writer writer) throws RenderingException;
+    void render(Map<String, Object> model, Writer writer) throws RenderingException;
     
 }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/PreviewURLModel.java Sun Dec  1 14:39:51 2013
@@ -34,8 +34,7 @@ public class PreviewURLModel extends URL
     
     private WeblogPreviewRequest previewRequest = null;
     private Weblog weblog = null;
-    private String locale = null;
-    
+
     private URLStrategy urlStrategy = null;
     
     

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SiteModel.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SiteModel.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SiteModel.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SiteModel.java Sun Dec  1 14:39:51 2013
@@ -522,7 +522,7 @@ public class SiteModel implements Model 
         try {            
             Weblogger roller = WebloggerFactory.getWeblogger();
             WeblogEntryManager wmgr = roller.getWeblogEntryManager();
-            List weblogs = wmgr.getWeblogEntriesPinnedToMain(new Integer(length));
+            List weblogs = wmgr.getWeblogEntriesPinnedToMain(length);
             for (Iterator it = weblogs.iterator(); it.hasNext();) {
                 WeblogEntry entry = (WeblogEntry) it.next();
                 results.add(WeblogEntryWrapper.wrap(entry, urlStrategy));

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java?rev=1546816&r1=1546815&r2=1546816&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/URLModel.java Sun Dec  1 14:39:51 2013
@@ -111,6 +111,11 @@ public class URLModel implements Model {
         return urlStrategy.getLogoutURL(false);
     }
     
+    /** URL for registering */
+    public String getRegister() {
+        return urlStrategy.getRegisterURL(false);
+    }
+    
     
     /** URL for a specific UI action */
     public String action(String action, String namespace) {



Mime
View raw message