roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1601254 [1/4] - in /roller/branches/rome2: ./ app/ app/src/main/java/org/apache/roller/util/ app/src/main/java/org/apache/roller/weblogger/business/ app/src/main/java/org/apache/roller/weblogger/business/jpa/ app/src/main/java/org/apache/r...
Date Sun, 08 Jun 2014 20:23:36 GMT
Author: snoopdave
Date: Sun Jun  8 20:23:32 2014
New Revision: 1601254

URL: http://svn.apache.org/r1601254
Log:
Merged lastest from trunk with command svn merge -r 1588766:HEAD https://svn.apache.org/repos/asf/roller/trunk .

Added:
    roller/branches/rome2/app/src/main/resources/ApplicationResources_fr.properties
      - copied unchanged from r1601252, roller/trunk/app/src/main/resources/ApplicationResources_fr.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_ko.properties
      - copied unchanged from r1601252, roller/trunk/app/src/main/resources/ApplicationResources_ko.properties
Removed:
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/referrers/
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/runnable/TurnoverReferersTask.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogReferrerWrapper.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Referrers.java
    roller/branches/rome2/app/src/main/resources/ApplicationResources_da.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_is.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_sl.properties
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogReferrer.orm.xml
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/Referrers.jsp
    roller/branches/rome2/app/src/test/java/org/apache/roller/weblogger/business/RefererTest.java
Modified:
    roller/branches/rome2/   (props changed)
    roller/branches/rome2/app/pom.xml
    roller/branches/rome2/app/src/main/java/org/apache/roller/util/RegexUtil.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/GuiceWebloggerProvider.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/Weblogger.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerModule.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/TopicTagPlugin.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexUtil.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeMetadataTemplate.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectoryComparator.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java   (contents, props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogEntryWrapper.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogWrapper.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/   (props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/security/RollerUserDetailsService.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/core/util/menu/MenuHelper.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/ConfigModel.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/rendering/model/UtilitiesModel.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/TrackbackServlet.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/velocity/WebappResourceLoader.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CreateUser.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalConfig.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetAddBase.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetEditBase.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/CreateWeblog.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Profile.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Register.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/BookmarkAdd.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/BookmarkEdit.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/BookmarksImport.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryAdd.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryEdit.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/CategoryRemove.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Comments.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Entries.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryAdd.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.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/FolderAdd.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/FolderEdit.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Maintenance.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileBase.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileImageChooser.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileView.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MemberResign.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MembersInvite.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Pings.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/StylesheetEdit.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/Templates.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/ThemeEdit.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfigBean.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionInterceptor.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionPrepareInterceptor.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UISecurityInterceptor.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/cache/CacheHandler.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/util/cache/CacheManager.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/   (props changed)
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/MediaCollection.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomService.java
    roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/webservices/xmlrpc/MetaWeblogAPIHandler.java
    roller/branches/rome2/app/src/main/resources/ApplicationResources.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_de.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_es.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_ja_JP.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_nl.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_ru.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_vi.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_zh_CN.properties
    roller/branches/rome2/app/src/main/resources/ApplicationResources_zh_TW.properties
    roller/branches/rome2/app/src/main/resources/META-INF/persistence.xml
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/config/roller.properties   (contents, props changed)
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/config/runtimeConfigDefs.xml   (contents, props changed)
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/pojos/MediaFileDirectory.orm.xml   (contents, props changed)
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/pojos/Weblog.orm.xml   (contents, props changed)
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogEntry.orm.xml   (contents, props changed)
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogThemeAssoc.orm.xml
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogThemeTemplateCode.orm.xml
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfig-validation.xml
    roller/branches/rome2/app/src/main/resources/org/apache/roller/weblogger/ui/struts2/editor/editor-menu.xml
    roller/branches/rome2/app/src/main/resources/sql/310-to-400-migration.vm
    roller/branches/rome2/app/src/main/resources/sql/500-to-510-migration.vm
    roller/branches/rome2/app/src/main/resources/sql/createdb.vm
    roller/branches/rome2/app/src/main/resources/sql/droptables.sql
    roller/branches/rome2/app/src/main/resources/sql/macros.vm
    roller/branches/rome2/app/src/main/resources/struts.xml
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileAdd.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileAddSuccess.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileEdit.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileImageChooser.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileSidebar.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/jsps/editor/WeblogConfig.jsp
    roller/branches/rome2/app/src/main/webapp/WEB-INF/tiles.xml
    roller/branches/rome2/app/src/main/webapp/WEB-INF/velocity/weblog.vm
    roller/branches/rome2/app/src/main/webapp/theme/scripts/roller.js
    roller/branches/rome2/app/src/main/webapp/themes/base.css
    roller/branches/rome2/app/src/main/webapp/themes/basic/basic-custom.css
    roller/branches/rome2/app/src/main/webapp/themes/basic/sidebar.vm
    roller/branches/rome2/app/src/main/webapp/themes/basic/weblog.vm
    roller/branches/rome2/app/src/main/webapp/themes/brushedmetal/brushedmetal-custom.css
    roller/branches/rome2/app/src/main/webapp/themes/brushedmetal/weblog.vm
    roller/branches/rome2/app/src/main/webapp/themes/fauxcoly/weblog.vm
    roller/branches/rome2/app/src/main/webapp/themes/sotto/sotto-custom.css
    roller/branches/rome2/app/src/main/webapp/themes/sotto/weblog.vm
    roller/branches/rome2/app/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java
    roller/branches/rome2/app/src/test/resources/roller-custom.properties
    roller/branches/rome2/app/src/test/resources/roller-jettyrun.properties
    roller/branches/rome2/docs/roller-install-guide.odt
    roller/branches/rome2/docs/roller-template-guide.odt
    roller/branches/rome2/docs/roller-user-guide.odt
    roller/branches/rome2/pom.xml

Propchange: roller/branches/rome2/
------------------------------------------------------------------------------
  Merged /roller/trunk:r1588767-1601252

Modified: roller/branches/rome2/app/pom.xml
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/pom.xml?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/pom.xml (original)
+++ roller/branches/rome2/app/pom.xml Sun Jun  8 20:23:32 2014
@@ -22,9 +22,9 @@
         <testThemesDir>${project.build.testOutputDirectory}${file.separator}themes</testThemesDir>
         <testIndexDir>${project.build.testOutputDirectory}${file.separator}index</testIndexDir>
         <testPlanetCache>${project.build.testOutputDirectory}${file.separator}planetcache</testPlanetCache>
-        <lucene.version>4.7.0</lucene.version>
-        <spring.version>4.0.2.RELEASE</spring.version>
-        <spring.security.version>3.2.2.RELEASE</spring.security.version>
+        <lucene.version>4.8.1</lucene.version>
+        <spring.version>4.0.5.RELEASE</spring.version>
+        <spring.security.version>3.2.4.RELEASE</spring.security.version>
     </properties>
 
     <dependencies>
@@ -274,13 +274,13 @@
         <dependency>
             <groupId>org.apache.struts</groupId>
             <artifactId>struts2-spring-plugin</artifactId>
-            <version>2.3.16.1</version>
+            <version>2.3.16.3</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.struts</groupId>
             <artifactId>struts2-tiles-plugin</artifactId>
-            <version>2.3.16.1</version>
+            <version>2.3.16.3</version>
         </dependency>
 
         <dependency>
@@ -337,7 +337,7 @@
         <dependency>
             <groupId>commons-beanutils</groupId>
             <artifactId>commons-beanutils</artifactId>
-            <version>1.9.1</version>
+            <version>1.9.2</version>
         </dependency>
         <dependency>
             <groupId>commons-codec</groupId>
@@ -357,7 +357,7 @@
         <dependency>
             <groupId>org.apache.ant</groupId>
             <artifactId>ant</artifactId>
-            <version>1.9.3</version>
+            <version>1.9.4</version>
             <scope>test</scope>
         </dependency>
 
@@ -586,7 +586,7 @@
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>buildnumber-maven-plugin</artifactId>
-                <version>1.1</version>
+                <version>1.3</version>
                 <executions>
                     <execution>
                         <phase>validate</phase>

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/util/RegexUtil.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/util/RegexUtil.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/util/RegexUtil.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/util/RegexUtil.java Sun Jun  8 20:23:32 2014
@@ -20,6 +20,7 @@ package org.apache.roller.util;
 
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
+import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.apache.commons.codec.binary.Hex;
@@ -80,10 +81,10 @@ public final class RegexUtil {
      * @param pattern The Pattern to use.
      * @param match The String to match against.
      * @param group The group number to return in case of a match.
-     * @return
+     * @return List of matched groups from the pattern.
      */
-    public static ArrayList getMatches(Pattern pattern, String match, int group) {
-        ArrayList matches = new ArrayList();
+    public static List<String> getMatches(Pattern pattern, String match, int group) {
+        List<String> matches = new ArrayList<String>();
         Matcher matcher = pattern.matcher(match);
         while (matcher.find()) {
             matches.add( matcher.group(group) );

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/GuiceWebloggerProvider.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/GuiceWebloggerProvider.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/GuiceWebloggerProvider.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/GuiceWebloggerProvider.java Sun Jun  8 20:23:32 2014
@@ -55,7 +55,7 @@ public class GuiceWebloggerProvider impl
             throw t;
         } catch (Throwable e) {
             // Fatal misconfiguration, cannot recover
-            throw new RuntimeException("Error instantiating backend module " + moduleClassname, e);
+            throw new RuntimeException("Error instantiating backend module " + moduleClassname + "; exception message: " + e.getMessage(), e);
         }
     }
     
@@ -79,7 +79,7 @@ public class GuiceWebloggerProvider impl
             throw t;
         } catch (Throwable e) {
             // Fatal misconfiguration, cannot recover
-            throw new RuntimeException("Error instantiating backend module " + moduleClassname, e);
+            throw new RuntimeException("Error instantiating backend module " + moduleClassname + "; exception message: " + e.getMessage(), e);
         }
     }
     

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MediaFileManager.java Sun Jun  8 20:23:32 2014
@@ -88,16 +88,9 @@ public interface MediaFileManager {
             MediaFileFilter filter) throws WebloggerException;
 
     /**
-     * Create root directory for media files in a weblog.
+     * Create default folder for media files in a weblog.
      */
-    MediaFileDirectory createRootMediaFileDirectory(Weblog weblog)
-            throws WebloggerException;
-
-    /**
-     * Create a media file directory with the given name
-     */
-    MediaFileDirectory createMediaFileDirectory(
-            MediaFileDirectory parentDirectory, String newDirName)
+    MediaFileDirectory createDefaultMediaFileDirectory(Weblog weblog)
             throws WebloggerException;
 
     /**
@@ -107,10 +100,10 @@ public interface MediaFileManager {
             throws WebloggerException;
 
     /**
-     * Create a media file directory given its path
+     * Create a media file directory with a given name.
      */
-    MediaFileDirectory createMediaFileDirectoryByPath(Weblog weblog,
-            String path) throws WebloggerException;
+    MediaFileDirectory createMediaFileDirectory(Weblog weblog,
+            String name) throws WebloggerException;
 
     /**
      * Get media file directory by id
@@ -121,11 +114,11 @@ public interface MediaFileManager {
     /**
      * Get media file directory by its path
      */
-    MediaFileDirectory getMediaFileDirectoryByPath(Weblog weblog,
-            String path) throws WebloggerException;
+    MediaFileDirectory getMediaFileDirectoryByName(Weblog weblog,
+            String name) throws WebloggerException;
 
     /**
-     * Get media file by path.
+     * Get media file by directory path (single folder + file name).
      */
     MediaFile getMediaFileByPath(Weblog weblog, String path)
             throws WebloggerException;
@@ -144,9 +137,9 @@ public interface MediaFileManager {
             throws WebloggerException;
 
     /**
-     * Get the root directory for media files for the given weblog.
+     * Get the default folder for media files for the given weblog.
      */
-    MediaFileDirectory getMediaFileRootDirectory(Weblog weblog)
+    MediaFileDirectory getDefaultMediaFileDirectory(Weblog weblog)
             throws WebloggerException;
 
     /**
@@ -162,19 +155,6 @@ public interface MediaFileManager {
             throws WebloggerException;
 
     /**
-     * Move a set of media files to a new directory.
-     */
-    void moveMediaFileDirectories(
-            Collection<MediaFileDirectory> mediaFilesDir,
-            MediaFileDirectory directory) throws WebloggerException;
-
-    /**
-     * Move one media file to a new directory.
-     */
-    void moveMediaFileDirectory(MediaFileDirectory mediaFileDir,
-            MediaFileDirectory directory) throws WebloggerException;
-
-    /**
      * Return recently added media files that are public.
      */
     List<MediaFile> fetchRecentPublicMediaFiles(int length)

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java Sun Jun  8 20:23:32 2014
@@ -173,7 +173,7 @@ public class MultiWeblogURLStrategy exte
         
         pathinfo.append(getWeblogURL(weblog, locale, absolute));
         
-        String cat = null;
+        String cat;
         if("root".equals(category)) {
             cat = null;
         } else {

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java Sun Jun  8 20:23:32 2014
@@ -144,7 +144,7 @@ public class PreviewURLStrategy extends 
         	pathinfo.append(locale).append("/");
         }
 
-        String cat = null;
+        String cat;
         if("root".equals(category)) {
             cat = null;
         } else {

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/Weblogger.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/Weblogger.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/Weblogger.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/Weblogger.java Sun Jun  8 20:23:32 2014
@@ -25,8 +25,6 @@ import org.apache.roller.weblogger.busin
 import org.apache.roller.weblogger.business.pings.AutoPingManager;
 import org.apache.roller.weblogger.business.pings.PingQueueManager;
 import org.apache.roller.weblogger.business.pings.PingTargetManager;
-import org.apache.roller.weblogger.business.referrers.RefererManager;
-import org.apache.roller.weblogger.business.referrers.ReferrerQueueManager;
 import org.apache.roller.weblogger.business.runnable.ThreadManager;
 import org.apache.roller.weblogger.business.search.IndexManager;
 import org.apache.roller.weblogger.business.themes.ThemeManager;
@@ -73,19 +71,6 @@ public interface Weblogger {
     
     
     /**
-     * 
-     * Get RefererManager associated with this Weblogger instance.
-     */
-    RefererManager getRefererManager();
-    
-    
-    /**
-     * Get ReferrerQueueManager.
-     */
-    ReferrerQueueManager getReferrerQueueManager();
-    
-    
-    /**
      * Get the AutoPingManager associated with this Weblogger instance.
      */
     AutoPingManager getAutopingManager();

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerFactory.java Sun Jun  8 20:23:32 2014
@@ -87,7 +87,7 @@ public final class WebloggerFactory {
                 Class providerClass = Class.forName(providerClassname);
                 defaultProvider = (WebloggerProvider) providerClass.newInstance();
             } catch (Exception ex) {
-                throw new BootstrapException("Error instantiating default provider: "+providerClassname, ex);
+                throw new BootstrapException("Error instantiating default provider: " + providerClassname + "; exception message: " + ex.getMessage(), ex);
             }
         } else {
             throw new NullPointerException("No provider specified in config property 'weblogger.provider.class'");

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerImpl.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/WebloggerImpl.java Sun Jun  8 20:23:32 2014
@@ -29,8 +29,6 @@ import org.apache.roller.weblogger.Weblo
 import org.apache.roller.weblogger.business.pings.AutoPingManager;
 import org.apache.roller.weblogger.business.pings.PingQueueManager;
 import org.apache.roller.weblogger.business.pings.PingTargetManager;
-import org.apache.roller.weblogger.business.referrers.RefererManager;
-import org.apache.roller.weblogger.business.referrers.ReferrerQueueManager;
 import org.apache.roller.weblogger.business.search.IndexManager;
 import org.apache.roller.weblogger.business.runnable.ThreadManager;
 import org.apache.roller.weblogger.business.themes.ThemeManager;
@@ -58,8 +56,6 @@ public abstract class WebloggerImpl impl
     private final PingTargetManager    pingTargetManager;
     private final PluginManager        pluginManager;
     private final PropertiesManager    propertiesManager;
-    private final RefererManager       refererManager;
-    private final ReferrerQueueManager refererQueueManager;
     private final ThemeManager         themeManager;
     private final ThreadManager        threadManager;
     private final UserManager          userManager;
@@ -90,8 +86,6 @@ public abstract class WebloggerImpl impl
         PingTargetManager    pingTargetManager,
         PluginManager        pluginManager,
         PropertiesManager    propertiesManager,
-        RefererManager       refererManager,
-        ReferrerQueueManager refererQueueManager, 
         ThemeManager         themeManager,
         ThreadManager        threadManager,
         UserManager          userManager,
@@ -112,8 +106,6 @@ public abstract class WebloggerImpl impl
         this.pingTargetManager   = pingTargetManager;
         this.pluginManager       = pluginManager;
         this.propertiesManager   = propertiesManager;
-        this.refererManager      = refererManager;
-        this.refererQueueManager = refererQueueManager;
         this.themeManager        = themeManager;
         this.threadManager       = threadManager;
         this.userManager         = userManager;
@@ -152,7 +144,7 @@ public abstract class WebloggerImpl impl
     /**
      * 
      * 
-     * @see org.apache.roller.weblogger.modelWebloggerr#getIndexManager()
+     * @see org.apache.roller.weblogger.model.Weblogger#getIndexManager()
      */
     public IndexManager getIndexManager() {
         return indexManager;
@@ -170,15 +162,6 @@ public abstract class WebloggerImpl impl
     
     
     /**
-     * @see org.apache.roller.weblogger.business.referrers.ReferrerQueueManager
-     */
-    public ReferrerQueueManager getReferrerQueueManager() {
-        return refererQueueManager;
-    }
-    
-    
-    
-    /**
      * 
      * 
      * @see org.apache.roller.weblogger.modelWebloggerr#getUserManager()
@@ -236,17 +219,7 @@ public abstract class WebloggerImpl impl
         return weblogManager;
     }
     
-    
-    /**
-     * 
-     * 
-     * @see org.apache.roller.weblogger.modelWebloggerr#getRefererManager()
-     */
-    public RefererManager getRefererManager() {
-        return refererManager;
-    }
-    
-    
+
     /**
      * 
      * 
@@ -338,7 +311,6 @@ public abstract class WebloggerImpl impl
             pingTargetManager.release();
             pingQueueManager.release();
             pluginManager.release();
-            refererManager.release();
             threadManager.release();
             userManager.release();
             weblogManager.release();
@@ -400,9 +372,6 @@ public abstract class WebloggerImpl impl
     public void shutdown() {
         try {
             HitCountQueue.getInstance().shutdown();
-            if (getReferrerQueueManager() != null) {
-                getReferrerQueueManager().shutdown();
-            }
             if (indexManager != null) {
                 indexManager.shutdown();
             }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java Sun Jun  8 20:23:32 2014
@@ -105,37 +105,6 @@ public class JPAMediaFileManagerImpl imp
     /**
      * {@inheritDoc}
      */
-    public void moveMediaFileDirectories(
-            Collection<MediaFileDirectory> mediaFileDirs,
-            MediaFileDirectory targetDir) throws WebloggerException {
-
-        for (MediaFileDirectory mediaFileDir : mediaFileDirs) {
-            // Refresh associated parent for changes
-            strategy.refresh(mediaFileDir.getParent());
-            mediaFileDir.setParent(targetDir);
-            if ("/".equals(targetDir.getPath())) {
-                mediaFileDir.setPath("/" + mediaFileDir.getName());
-            } else {
-                mediaFileDir.setPath(targetDir.getPath() + "/"
-                        + mediaFileDir.getName());
-            }
-            this.strategy.store(mediaFileDir);
-        }
-
-        // Refresh associated parent for changes
-        roller.flush();
-        strategy.refresh(targetDir);
-        if (targetDir.getParent() != null) {
-            strategy.refresh(targetDir.getParent());
-        }
-
-        // update weblog last modified date. date updated by saveWebsite()
-        roller.getWeblogManager().saveWeblog(targetDir.getWeblog());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public void moveMediaFiles(Collection<MediaFile> mediaFiles,
             MediaFileDirectory targetDirectory) throws WebloggerException {
 
@@ -174,38 +143,7 @@ public class JPAMediaFileManagerImpl imp
 
     /**
      * {@inheritDoc}
-     */
-    public void moveMediaFileDirectory(MediaFileDirectory mediaFileDir,
-            MediaFileDirectory targetDirectory) throws WebloggerException {
-        moveMediaFileDirectories(Arrays.asList(mediaFileDir), targetDirectory);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public MediaFileDirectory createMediaFileDirectory(
-            MediaFileDirectory parentDirectory, String newDirName)
-            throws WebloggerException {
-
-        if (parentDirectory.hasDirectory(newDirName)) {
-            throw new WebloggerException("Directory exists");
-        }
-
-        MediaFileDirectory newDirectory = parentDirectory
-                .createNewDirectory(newDirName);
-
-        // update weblog last modified date. date updated by saveWeblog()
-        roller.getWeblogManager().saveWeblog(newDirectory.getWeblog());
-
-        // Refresh associated parent for changes
-        roller.flush();
-        strategy.refresh(parentDirectory);
-
-        return newDirectory;
-    }
-
-    /**
-     * {@inheritDoc}
+     // TODO: Remove this method?
      */
     public void createMediaFileDirectory(MediaFileDirectory directory)
             throws WebloggerException {
@@ -215,77 +153,30 @@ public class JPAMediaFileManagerImpl imp
         roller.getWeblogManager().saveWeblog(directory.getWeblog());
 
         // Refresh associated parent for changes
-        strategy.refresh(directory.getParent());
+        // strategy.refresh(directory.getParent());
     }
 
     /**
      * {@inheritDoc}
      */
-    public MediaFileDirectory createMediaFileDirectoryByPath(Weblog weblog,
-            String requestedPath) throws WebloggerException {
+    public MediaFileDirectory createMediaFileDirectory(Weblog weblog,
+            String requestedName) throws WebloggerException {
 
-        String path = requestedPath;
-        log.debug("Creating dir: " + path);
+        requestedName = requestedName.startsWith("/") ? requestedName.substring(1) : requestedName;
 
-        if (path.startsWith("/")) {
-            path = path.substring(1);
+        if (requestedName.equals("") || requestedName.equals("default")) {
+            // Default cannot be created using this method.
+            // Use createDefaultMediaFileDirectory instead
+            throw new WebloggerException("Invalid name!");
         }
 
-        if (path.endsWith("/")) {
-            path = path.substring(0, path.length() - 1);
-        }
-
-        if (path.equals("")) {
-            // Root cannot be created using this method.
-            // Use createRootMediaFileDirectory instead
-            throw new WebloggerException("Invalid path!");
-        }
-
-        int lastPathIndex = path.lastIndexOf('/');
-
-        MediaFileDirectory newDirectory = null;
-        if (lastPathIndex == -1) {
-
-            // Directory needs to be created under root
-            MediaFileDirectory root = getMediaFileRootDirectory(weblog);
-
-            if (root.hasDirectory(path)) {
-                throw new WebloggerException("Directory exists");
-            } else {
-                log.debug("    Created dir under ROOT");
-                newDirectory = root.createNewDirectory(path);
-            }
+        MediaFileDirectory newDirectory;
 
+        if (weblog.hasMediaFileDirectory(requestedName)) {
+            throw new WebloggerException("Directory exists");
         } else {
-
-            boolean created = false;
-
-            MediaFileDirectory base = getMediaFileRootDirectory(weblog);
-            String token = null;
-            String pathpart = "";
-            StringTokenizer toker = new StringTokenizer(path, "/");
-            while (toker.hasMoreTokens()) {
-                token = toker.nextToken();
-                if (!pathpart.endsWith("/")) {
-                    pathpart += "/" + token;
-                } else {
-                    pathpart += token;
-                }
-                MediaFileDirectory possibleBase = getMediaFileDirectoryByPath(
-                        weblog, pathpart);
-                if (possibleBase == null) {
-                    base = base.createNewDirectory(token);
-                    log.debug("   Created new directory: " + base.getPath());
-                    created = true;
-                    roller.flush();
-                } else {
-                    base = possibleBase;
-                }
-            }
-            if (!created || !requestedPath.equals(base.getPath())) {
-                throw new WebloggerException("ERROR directory not created");
-            }
-            newDirectory = base;
+            newDirectory = new MediaFileDirectory(weblog, requestedName, null);
+            log.debug("Created new Directory " + requestedName);
         }
 
         // update weblog last modified date. date updated by saveWeblog()
@@ -297,12 +188,12 @@ public class JPAMediaFileManagerImpl imp
     /**
      * {@inheritDoc}
      */
-    public MediaFileDirectory createRootMediaFileDirectory(Weblog weblog)
+    public MediaFileDirectory createDefaultMediaFileDirectory(Weblog weblog)
             throws WebloggerException {
-        MediaFileDirectory rootDirectory = new MediaFileDirectory(null, "root",
-                "root directory", weblog);
-        createMediaFileDirectory(rootDirectory);
-        return rootDirectory;
+        MediaFileDirectory defaultDirectory = new MediaFileDirectory(weblog, "default",
+                "default directory");
+        createMediaFileDirectory(defaultDirectory);
+        return defaultDirectory;
     }
 
     /**
@@ -340,7 +231,7 @@ public class JPAMediaFileManagerImpl imp
                     .getFileContentManager();
             FileContent fc = cmgr.getFileContent(mediaFile.getWeblog(),
                     mediaFile.getId());
-            BufferedImage img = null;
+            BufferedImage img;
 
             img = ImageIO.read(fc.getInputStream());
 
@@ -462,17 +353,17 @@ public class JPAMediaFileManagerImpl imp
     /**
      * {@inheritDoc}
      */
-    public MediaFileDirectory getMediaFileDirectoryByPath(Weblog weblog,
-            String path) throws WebloggerException {
+    public MediaFileDirectory getMediaFileDirectoryByName(Weblog weblog,
+            String name) throws WebloggerException {
 
-        path = !path.startsWith("/") ? "/" + path : path;
+        name = name.startsWith("/") ? name.substring(1) : name;
 
-        log.debug("Looking up weblog|path: " + weblog.getHandle() + "|" + path);
+        log.debug("Looking up weblog|media file directory: " + weblog.getHandle() + "|" + name);
 
         Query q = this.strategy
-                .getNamedQuery("MediaFileDirectory.getByWeblogAndPath");
+                .getNamedQuery("MediaFileDirectory.getByWeblogAndName");
         q.setParameter(1, weblog);
-        q.setParameter(2, path);
+        q.setParameter(2, name);
         try {
             return (MediaFileDirectory) q.getSingleResult();
         } catch (NoResultException e) {
@@ -488,12 +379,12 @@ public class JPAMediaFileManagerImpl imp
 
         // get directory
         String fileName = path;
-        MediaFileDirectory mdir = null;
+        MediaFileDirectory mdir;
         int slash = path.lastIndexOf('/');
         if (slash > 0) {
-            mdir = getMediaFileDirectoryByPath(weblog, path.substring(0, slash));
+            mdir = getMediaFileDirectoryByName(weblog, path.substring(0, slash));
         } else {
-            mdir = getMediaFileRootDirectory(weblog);
+            mdir = getDefaultMediaFileDirectory(weblog);
         }
         if (slash != -1) {
             fileName = fileName.substring(slash + 1);
@@ -519,7 +410,7 @@ public class JPAMediaFileManagerImpl imp
                 .getNamedQuery("MediaFile.getByWeblogAndOrigpath");
         q.setParameter(1, weblog);
         q.setParameter(2, origpath);
-        MediaFile mf = null;
+        MediaFile mf;
         try {
             mf = (MediaFile) q.getSingleResult();
         } catch (NoResultException e) {
@@ -545,16 +436,9 @@ public class JPAMediaFileManagerImpl imp
     /**
      * {@inheritDoc}
      */
-    public MediaFileDirectory getMediaFileRootDirectory(Weblog weblog)
+    public MediaFileDirectory getDefaultMediaFileDirectory(Weblog weblog)
             throws WebloggerException {
-        Query q = this.strategy
-                .getNamedQuery("MediaFileDirectory.getByWeblogAndNoParent");
-        q.setParameter(1, weblog);
-        try {
-            return (MediaFileDirectory) q.getSingleResult();
-        } catch (NoResultException e) {
-            return null;
-        }
+        return getMediaFileDirectoryByName(weblog, "default");
     }
 
     /**
@@ -792,10 +676,10 @@ public class JPAMediaFileManagerImpl imp
                                     // create weblog's mediafile directory if
                                     // needed
                                     MediaFileDirectory root = this
-                                            .getMediaFileRootDirectory(weblog);
+                                            .getDefaultMediaFileDirectory(weblog);
                                     if (root == null) {
                                         root = this
-                                                .createRootMediaFileDirectory(weblog);
+                                                .createDefaultMediaFileDirectory(weblog);
                                         roller.flush();
                                     }
 
@@ -846,27 +730,24 @@ public class JPAMediaFileManagerImpl imp
             // a directory: go recursive
             if (files[i].isDirectory()) {
 
-                if (newDir.hasDirectory(files[i].getName())) {
+                if (weblog.hasMediaFileDirectory(files[i].getName())) {
                     // already have a mediafile directory for that
                     upgradeUploadsDir(weblog, user, files[i],
-                            newDir.getChildDirectory(files[i].getName()));
+                            weblog.getMediaFileDirectory(files[i].getName()));
 
                 } else {
                     // need to create a new mediafile directory
-                    MediaFileDirectory subDir = null;
+                    MediaFileDirectory secondDir = null;
                     try {
-                        subDir = newDir.createNewDirectory(files[i].getName());
-                        roller.getMediaFileManager().createMediaFileDirectory(
-                                subDir);
-                        newDir.getChildDirectories().add(subDir);
+                        secondDir = new MediaFileDirectory(weblog, files[i].getName(), null);
+                        roller.getMediaFileManager().createMediaFileDirectory(secondDir);
                         roller.flush();
                         dirCount++;
-
                     } catch (WebloggerException ex) {
                         log.error("ERROR creating directory: "
-                                + newDir.getPath() + "/" + files[i].getName());
+                                + newDir.getName() + "/" + files[i].getName());
                     }
-                    upgradeUploadsDir(weblog, user, files[i], subDir);
+                    upgradeUploadsDir(weblog, user, files[i], secondDir);
                 }
 
             } else {
@@ -878,10 +759,8 @@ public class JPAMediaFileManagerImpl imp
 
                 } else {
 
-                    String originalPath = ("/".equals(newDir.getPath()) ? ""
-                            : newDir.getPath()) + "/" + files[i].getName();
-                    log.debug("    Upgrade file with original path: "
-                            + originalPath);
+                    String originalPath = "/" + newDir.getName() + "/" + files[i].getName();
+                    log.debug("Upgrade file with original path: " + originalPath);
 
                     MediaFile mf = new MediaFile();
                     try {
@@ -933,12 +812,12 @@ public class JPAMediaFileManagerImpl imp
             log.debug("Count of files created: " + fileCount);
 
         } catch (WebloggerException ex) {
-            log.error("ERROR flushing changes to dir: " + newDir.getPath(), ex);
+            log.error("ERROR flushing changes to dir: " + newDir.getName(), ex);
         }
     }
 
     public void removeAllFiles(Weblog website) throws WebloggerException {
-        removeMediaFileDirectory(getMediaFileRootDirectory(website));
+        removeMediaFileDirectory(getDefaultMediaFileDirectory(website));
     }
 
     public void removeMediaFileDirectory(MediaFileDirectory dir)
@@ -960,24 +839,15 @@ public class JPAMediaFileManagerImpl imp
             this.strategy.remove(mf);
         }
 
-        // Children
-        roller.flush();
+        dir.getWeblog().getMediaFileDirectories().remove(dir);
 
-        // Set<MediaFileDirectory> dirs = dir.getChildDirectories();
-        // Recursive fix ConcurrentModificationException
-        Set<MediaFileDirectory> dirs = Collections
-                .synchronizedSet(new HashSet<MediaFileDirectory>(dir
-                        .getChildDirectories()));
-        for (MediaFileDirectory md : dirs) {
-            removeMediaFileDirectory(md);
-        }
+        // Contained media files
+        roller.flush();
 
         this.strategy.remove(dir);
 
         // Refresh associated parent
         roller.flush();
-        strategy.refresh(dir.getParent());
-
     }
 
     public void removeMediaFileTag(String name, MediaFile entry)

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java:r1588767-1601252

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAPersistenceStrategy.java Sun Jun  8 20:23:32 2014
@@ -313,7 +313,6 @@ public class JPAPersistenceStrategy {
         InputStream in;
         in = cl.getResourceAsStream(resourceName);
         if (in == null) {
-            //TODO: Check how i18n is done in roller
             throw new WebloggerException(
                     "Could not locate properties to load " + resourceName);
         }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java Sun Jun  8 20:23:32 2014
@@ -66,7 +66,7 @@ public class JPAWeblogEntryManagerImpl i
     private final JPAPersistenceStrategy strategy;
     
     // cached mapping of entryAnchors -> entryIds
-    private HashMap<String, String> entryAnchorToIdMap = new HashMap<String, String>();
+    private Map<String, String> entryAnchorToIdMap = new HashMap<String, String>();
     
     /* inline creation of reverse comparator, anonymous inner class */
     private static final Comparator REVERSE_COMPARATOR = new ReverseComparator();
@@ -233,13 +233,6 @@ public class JPAWeblogEntryManagerImpl i
     public void removeWeblogEntry(WeblogEntry entry) throws WebloggerException {
         Weblog weblog = entry.getWebsite();
         
-        Query q = strategy.getNamedQuery("WeblogReferrer.getByWeblogEntry");
-        q.setParameter(1, entry);
-        List referers = q.getResultList();
-        for (Object obj : referers) {
-            this.strategy.remove(obj);
-        }
-
         CommentSearchCriteria csc = new CommentSearchCriteria();
         csc.setEntry(entry);
 
@@ -973,7 +966,7 @@ public class JPAWeblogEntryManagerImpl i
         double min = Integer.MAX_VALUE;
         double max = Integer.MIN_VALUE;
         
-        List<TagStat> results = new ArrayList<TagStat>(limit);
+        List<TagStat> results = new ArrayList<TagStat>(limit >= 0 ? limit : 25);
         
         for (Iterator iter = queryResults.iterator(); iter.hasNext();) {
             Object[] row = (Object[]) iter.next();

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java Sun Jun  8 20:23:32 2014
@@ -50,7 +50,6 @@ import org.apache.roller.weblogger.pojos
 import org.apache.roller.weblogger.pojos.WeblogEntryTag;
 import org.apache.roller.weblogger.pojos.WeblogEntryTagAggregate;
 import org.apache.roller.weblogger.pojos.WeblogPermission;
-import org.apache.roller.weblogger.pojos.WeblogReferrer;
 import org.apache.roller.weblogger.pojos.WeblogTemplate;
 import org.apache.roller.weblogger.pojos.WeblogThemeAssoc;
 import org.apache.roller.weblogger.pojos.WeblogThemeTemplateCode;
@@ -167,14 +166,6 @@ public class JPAWeblogManagerImpl implem
             this.strategy.remove(autoPing);
         }
         
-        // remove associated referers
-        Query refQuery2 = strategy.getNamedQuery("WeblogReferrer.getByWebsite");
-        refQuery2.setParameter(1, website);
-        List referers = refQuery2.getResultList();
-        for (Object obj : referers) {
-            WeblogReferrer referer = (WeblogReferrer) obj;
-            this.strategy.remove(referer.getClass(), referer.getId());
-        }
         // TODO: can we eliminate this unnecessary flush with OpenJPA 1.0
         this.strategy.flush(); 
        
@@ -194,7 +185,7 @@ public class JPAWeblogManagerImpl implem
         // remove folders (including bookmarks)
         Query folderQuery = strategy.getNamedQuery("WeblogBookmarkFolder.getByWebsite");
         folderQuery.setParameter(1, website);
-        List<WeblogBookmarkFolder> folders = pageQuery.getResultList();
+        List<WeblogBookmarkFolder> folders = folderQuery.getResultList();
         for (WeblogBookmarkFolder wbf : folders) {
             this.strategy.remove(wbf);
         }
@@ -336,7 +327,7 @@ public class JPAWeblogManagerImpl implem
             }
         }
 
-        roller.getMediaFileManager().createRootMediaFileDirectory(newWeblog);
+        roller.getMediaFileManager().createDefaultMediaFileDirectory(newWeblog);
 
         // flush so that all data up to this point can be available in db
         this.strategy.flush();

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerImpl.java Sun Jun  8 20:23:32 2014
@@ -36,8 +36,6 @@ import org.apache.roller.weblogger.busin
 import org.apache.roller.weblogger.business.pings.PingQueueManager;
 import org.apache.roller.weblogger.business.pings.PingTargetManager;
 import org.apache.roller.weblogger.business.plugins.PluginManager;
-import org.apache.roller.weblogger.business.referrers.RefererManager;
-import org.apache.roller.weblogger.business.referrers.ReferrerQueueManager;
 import org.apache.roller.weblogger.business.search.IndexManager;
 import org.apache.roller.weblogger.business.themes.ThemeManager;
 
@@ -69,8 +67,6 @@ public class JPAWebloggerImpl extends We
         PingTargetManager    pingTargetManager,
         PluginManager        pluginManager,
         PropertiesManager    propertiesManager,
-        RefererManager       refererManager,
-        ReferrerQueueManager refererQueueManager,
         ThemeManager         themeManager,
         ThreadManager        threadManager,
         UserManager          userManager,
@@ -92,8 +88,6 @@ public class JPAWebloggerImpl extends We
             pingTargetManager,
             pluginManager,
             propertiesManager,
-            refererManager,
-            refererQueueManager,
             themeManager,
             threadManager,
             userManager,

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerModule.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerModule.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerModule.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWebloggerModule.java Sun Jun  8 20:23:32 2014
@@ -46,9 +46,6 @@ import org.apache.roller.weblogger.busin
 import org.apache.roller.weblogger.business.pings.PingTargetManager;
 import org.apache.roller.weblogger.business.plugins.PluginManager;
 import org.apache.roller.weblogger.business.plugins.PluginManagerImpl;
-import org.apache.roller.weblogger.business.referrers.RefererManager;
-import org.apache.roller.weblogger.business.referrers.ReferrerQueueManager;
-import org.apache.roller.weblogger.business.referrers.ReferrerQueueManagerImpl;
 import org.apache.roller.weblogger.business.runnable.ThreadManager;
 import org.apache.roller.weblogger.business.search.IndexManager;
 import org.apache.roller.weblogger.business.search.IndexManagerImpl;
@@ -73,8 +70,7 @@ public class JPAWebloggerModule implemen
         binder.bind(PingQueueManager.class).to(    JPAPingQueueManagerImpl.class);   
         binder.bind(PingTargetManager.class).to(   JPAPingTargetManagerImpl.class); 
         binder.bind(PropertiesManager.class).to(   JPAPropertiesManagerImpl.class);   
-        binder.bind(RefererManager.class).to(      JPARefererManagerImpl.class);
-        binder.bind(ThreadManager.class).to(       JPAThreadManagerImpl.class);  
+        binder.bind(ThreadManager.class).to(       JPAThreadManagerImpl.class);
         binder.bind(UserManager.class).to(         JPAUserManagerImpl.class);   
         binder.bind(WeblogManager.class).to(       JPAWeblogManagerImpl.class);   
         binder.bind(WeblogEntryManager.class).to(  JPAWeblogEntryManagerImpl.class);   
@@ -82,7 +78,6 @@ public class JPAWebloggerModule implemen
 
         binder.bind(OAuthValidator.class).to(      SimpleOAuthValidator.class);
                 
-        binder.bind(ReferrerQueueManager.class).to(ReferrerQueueManagerImpl.class);  
         binder.bind(MediaFileManager.class).to(    JPAMediaFileManagerImpl.class);
         binder.bind(FileContentManager.class).to(  FileContentManagerImpl.class);
         binder.bind(IndexManager.class).to(        IndexManagerImpl.class);

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/TopicTagPlugin.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/TopicTagPlugin.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/TopicTagPlugin.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/TopicTagPlugin.java Sun Jun  8 20:23:32 2014
@@ -245,7 +245,6 @@ public class TopicTagPlugin implements W
      */
     public String getName()
     {
-        // TODO: i18n
         return "Topic Tags";
     }
 
@@ -256,7 +255,6 @@ public class TopicTagPlugin implements W
      */
     public String getDescription()
     {
-        // TODO: i18n
         return "Expands topic tags for <a href=\\'http://www.technorati.com\\'>Technorati</a> and similar sites. " +
             "Topic tags are of the form <code>topic:{topicbookmark}[tag]</code>, where <code>topicbookmark</code> " +
             "is the name of a bookmark whose URL will be used for the site name in the topic tag. " +

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/runnable/ResetHitCountsTask.java Sun Jun  8 20:23:32 2014
@@ -130,7 +130,7 @@ public class ResetHitCountsTask extends 
             log.info("task completed");
             
         } catch (WebloggerException e) {
-            log.error("Error while checking for referer turnover", e);
+            log.error("Error while resetting hit counts", e);
         } catch (Exception ee) {
             log.error("unexpected exception", ee);
         } finally {

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexManagerImpl.java Sun Jun  8 20:23:32 2014
@@ -362,29 +362,18 @@ public class IndexManagerImpl implements
             public void doRun() {
                 Directory dir = getIndexDirectory();
                 Directory fsdir = getFSDirectory(true);
-
                 IndexWriter writer = null;
-
                 try {
-                    IndexWriterConfig config = new IndexWriterConfig(
-                            FieldConstants.LUCENE_VERSION,
-                            new LimitTokenCountAnalyzer(
-                                    IndexManagerImpl.getAnalyzer(),
+                    IndexWriterConfig config = new IndexWriterConfig(FieldConstants.LUCENE_VERSION,
+                            new LimitTokenCountAnalyzer(IndexManagerImpl.getAnalyzer(),
                                     IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL));
-
                     writer = new IndexWriter(fsdir, config);
-
                     writer.addIndexes(new Directory[] { dir });
-
                     writer.commit();
-
                     indexConsistencyMarker.delete();
-
                 } catch (IOException e) {
                     mLogger.error("Problem saving index to disk", e);
-
-                    // Delete the directory, since there was a problem saving
-                    // the RAM contents
+                    // Delete the directory, since there was a problem saving the RAM contents
                     getFSDirectory(true);
                 } finally {
                     try {
@@ -395,7 +384,6 @@ public class IndexManagerImpl implements
                         mLogger.warn("Unable to close IndexWriter.");
                     }
                 }
-
             }
         };
     }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexUtil.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexUtil.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexUtil.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/search/IndexUtil.java Sun Jun  8 20:23:32 2014
@@ -45,7 +45,7 @@ public final class IndexUtil {
      * 
      * @return Lucene search term
      */
-    public static final Term getTerm(String field, String input) {
+    public static Term getTerm(String field, String input) {
 
         if (input == null || field == null) {
             return null;

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeTemplate.java Sun Jun  8 20:23:32 2014
@@ -25,6 +25,7 @@ import org.apache.roller.weblogger.pojos
 import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -47,7 +48,7 @@ public class SharedThemeTemplate impleme
     private String type = null;
 
     //hash map to cache template Code objects parsed
-    private HashMap<String, TemplateCode> templateCodeHashMap = new HashMap<String, TemplateCode>();
+    private Map<String, TemplateCode> templateCodeHashMap = new HashMap<String, TemplateCode>();
     
     
     public SharedThemeTemplate() {}

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java Sun Jun  8 20:23:32 2014
@@ -83,7 +83,7 @@ public class ThemeManagerImpl implements
 	private Map<String, Theme> themes = null;
 
 	// list of available types for templates
-	private static ArrayList<String> typeList = new ArrayList<String>();
+	private static List<String> typeList = new ArrayList<String>();
 
 	@com.google.inject.Inject
 	protected ThemeManagerImpl(Weblogger roller) {
@@ -204,7 +204,7 @@ public class ThemeManagerImpl implements
 		WeblogManager wmgr = roller.getWeblogManager();
 		MediaFileManager fileMgr = roller.getMediaFileManager();
 
-		MediaFileDirectory root = fileMgr.getMediaFileRootDirectory(website);
+		MediaFileDirectory root = fileMgr.getDefaultMediaFileDirectory(website);
         if (root == null) {
             log.warn("Weblog " + website.getHandle()
                     + " does not have a root MediaFile directory");
@@ -319,12 +319,11 @@ public class ThemeManagerImpl implements
 			log.debug("Importing resource " + resource.getPath());
 
 			if (resource.isDirectory()) {
-				MediaFileDirectory mdir = fileMgr.getMediaFileDirectoryByPath(
+				MediaFileDirectory mdir = fileMgr.getMediaFileDirectoryByName(
 						website, resource.getPath());
 				if (mdir == null) {
 					log.debug("    Creating directory: " + resource.getPath());
-					mdir = fileMgr.createMediaFileDirectory(
-							fileMgr.getMediaFileRootDirectory(website),
+					mdir = fileMgr.createMediaFileDirectory(website,
 							resource.getPath());
 					roller.flush();
 				} else {
@@ -339,7 +338,7 @@ public class ThemeManagerImpl implements
 				String justPath;
 
 				if (resourcePath.indexOf('/') == -1) {
-					mdir = fileMgr.getMediaFileRootDirectory(website);
+					mdir = fileMgr.getDefaultMediaFileDirectory(website);
 					justPath = "";
 					justName = resourcePath;
 
@@ -351,11 +350,11 @@ public class ThemeManagerImpl implements
                     }
 					justName = resourcePath.substring(resourcePath
 							.lastIndexOf('/') + 1);
-					mdir = fileMgr.getMediaFileDirectoryByPath(website,
+					mdir = fileMgr.getMediaFileDirectoryByName(website,
 							justPath);
 					if (mdir == null) {
 						log.debug("    Creating directory: " + justPath);
-						mdir = fileMgr.createMediaFileDirectoryByPath(website,
+						mdir = fileMgr.createMediaFileDirectory(website,
 								justPath);
 						roller.flush();
 					}
@@ -472,7 +471,7 @@ public class ThemeManagerImpl implements
         ThemeManagerImpl.getTypesList().add("mobile");
 	}
 
-	public static ArrayList<String> getTypesList() {
+	public static List<String> getTypesList() {
 		return typeList;
 	}
 

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeMetadataTemplate.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeMetadataTemplate.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeMetadataTemplate.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeMetadataTemplate.java Sun Jun  8 20:23:32 2014
@@ -19,6 +19,7 @@
 package org.apache.roller.weblogger.business.themes;
 
 import java.util.HashMap;
+import java.util.Map;
 
 /**
  * A parsed 'template' element of a theme metadata descriptor.
@@ -36,7 +37,7 @@ public class ThemeMetadataTemplate {
     private String contentsFile = null;
     private String type = null;
     // Hash table to keep metadata about parsed template code files
-    private HashMap<String, ThemeMetadataTemplateCode> templateCodeTable
+    private Map<String, ThemeMetadataTemplateCode> templateCodeTable
             = new HashMap<String, ThemeMetadataTemplateCode>();
 
     public String getAction() {
@@ -127,7 +128,7 @@ public class ThemeMetadataTemplate {
         return this.getTemplateCodeTable().get(type);
     }
 
-    public HashMap<String, ThemeMetadataTemplateCode> getTemplateCodeTable() {
+    public Map<String, ThemeMetadataTemplateCode> getTemplateCodeTable() {
         return templateCodeTable;
     }
 

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/planet/ui/PlanetGroups.java Sun Jun  8 20:23:32 2014
@@ -117,9 +117,8 @@ public class PlanetGroups extends Planet
                 addMessage("planetGroups.success.saved");
 
             } catch(Exception ex) {
-                log.error("Error saving planet group - "+getBean().getId(), ex);
-                // TODO: i18n
-                addError("Error saving planet group");
+                log.error("Error saving planet group - " + getBean().getId(), ex);
+                addError("planetGroups.error.saved");
             }
         }
         
@@ -141,7 +140,6 @@ public class PlanetGroups extends Planet
                 addMessage("planetSubscription.success.deleted");
             } catch(Exception ex) {
                 log.error("Error deleting planet group - "+getBean().getId());
-                // TODO: i18n
                 addError("Error deleting planet group");
             }
         }

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java Sun Jun  8 20:23:32 2014
@@ -318,7 +318,7 @@ public class MediaFile implements Serial
     }
 
     public String getPath() {
-        return getDirectory().getPath();
+        return getDirectory().getName();
     }
 
     /**

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java:r1588767-1601252

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java Sun Jun  8 20:23:32 2014
@@ -33,36 +33,24 @@ public class MediaFileDirectory {
     String name;
     String description;
     Weblog weblog;
-    String path;
-    MediaFileDirectory parent;
-    Set<MediaFileDirectory> childDirectories = new HashSet<MediaFileDirectory>();
     Set<MediaFile> mediaFiles = new HashSet<MediaFile>();
 
     public MediaFileDirectory() {
     }
 
-    public MediaFileDirectory(MediaFileDirectory parent, String name,
-            String desc, Weblog weblog) {
+    public MediaFileDirectory(Weblog weblog, String name,
+            String desc) {
 
         this.id = UUIDGenerator.generateUUID();
         this.name = name;
         this.description = desc;
 
         this.weblog = weblog;
-        this.parent = parent;
-
-        // calculate path
-        if (parent == null) {
-            this.path = "/";
-        } else if ("/".equals(parent.getPath())) {
-            this.path = "/" + name;
-        } else {
-            this.path = parent.getPath() + "/" + name;
-        }
+        weblog.getMediaFileDirectories().add(this);
     }
 
     public boolean isEmpty() {
-        return getChildDirectories().isEmpty() && getMediaFiles().isEmpty();
+        return getMediaFiles().isEmpty();
     }
 
     /**
@@ -106,18 +94,6 @@ public class MediaFileDirectory {
     }
 
     /**
-     * Return parent folder, or null if folder is root of hierarchy.
-     * 
-     */
-    public MediaFileDirectory getParent() {
-        return parent;
-    }
-
-    public void setParent(MediaFileDirectory parent) {
-        this.parent = parent;
-    }
-
-    /**
      * Get the weblog which owns this folder.
      * 
      */
@@ -130,18 +106,6 @@ public class MediaFileDirectory {
     }
 
     /**
-     * The full path to this folder in the hierarchy.
-     * 
-     */
-    public String getPath() {
-        return path;
-    }
-
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    /**
      * The collection of files in this directory
      * 
      */
@@ -154,18 +118,6 @@ public class MediaFileDirectory {
     }
 
     /**
-     * Get child folders of this folder.
-     * 
-     */
-    public Set<MediaFileDirectory> getChildDirectories() {
-        return this.childDirectories;
-    }
-
-    public void setChildDirectories(Set<MediaFileDirectory> folders) {
-        this.childDirectories = folders;
-    }
-
-    /**
      * Indicates whether this directory contains the specified file.
      * 
      * @param name
@@ -205,56 +157,6 @@ public class MediaFileDirectory {
         return null;
     }
 
-    /**
-     * Indicates whether this directory contains the specified sub-directory.
-     * 
-     * @param name
-     *            directory name
-     * @return true if the sub-directory is present, false otherwise.
-     */
-    public boolean hasDirectory(String name) {
-        Set<MediaFileDirectory> dirSet = this.getChildDirectories();
-        for (MediaFileDirectory directory : dirSet) {
-            if (directory.getName().equals(name)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public MediaFileDirectory getChildDirectory(String name) {
-        for (MediaFileDirectory dir : getChildDirectories()) {
-            if (name.equals(dir.getName())) {
-                return dir;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Creates a new sub-directory
-     * 
-     * @param name
-     *            new directory name
-     * @return reference to the newly created directory.
-     */
-    public MediaFileDirectory createNewDirectory(String name) {
-        MediaFileDirectory newDirectory = new MediaFileDirectory(this, name,
-                "", this.getWeblog());
-        this.getChildDirectories().add(newDirectory);
-        return newDirectory;
-    }
-
-    /**
-     * Removes a directory from this MediaFileDirectory's child list
-     * 
-     * @param mfd
-     *            Media directory to remove
-     */
-    public void removeChildDirectory(MediaFileDirectory mfd) {
-        this.getChildDirectories().remove(mfd);
-    }
-
     @Override
     public boolean equals(Object other) {
         if (other == this) {
@@ -266,13 +168,12 @@ public class MediaFileDirectory {
         MediaFileDirectory o = (MediaFileDirectory) other;
         return new EqualsBuilder().append(getId(), o.getId())
                 .append(getName(), o.getName())
-                .append(getDescription(), o.getDescription())
-                .append(getPath(), o.getPath()).isEquals();
+                .append(getDescription(), o.getDescription()).isEquals();
     }
 
     public int hashCode() {
         return new HashCodeBuilder().append(getId()).append(getName())
-                .append(getDescription()).append(getPath()).toHashCode();
+                .append(getDescription()).toHashCode();
     }
 
 }

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectory.java:r1588767-1601252

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectoryComparator.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectoryComparator.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectoryComparator.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectoryComparator.java Sun Jun  8 20:23:32 2014
@@ -33,7 +33,7 @@ public class MediaFileDirectoryComparato
 	 * Comparator types that define all possible attributes for comparing media file directories. 
 	 *
 	 */
-	public enum DirectoryComparatorType {NAME, PATH};
+	public enum DirectoryComparatorType {NAME};
 	
 	// Comparator type associated with this instance of media directory comparator
 	DirectoryComparatorType type;
@@ -49,7 +49,6 @@ public class MediaFileDirectoryComparato
 	public int compare(MediaFileDirectory dir1, MediaFileDirectory dir2) {
 		switch (this.type) {
 		    case NAME: return dir1.getName().compareTo(dir2.getName());
-		    case PATH: return dir1.getPath().compareTo(dir2.getPath());
 		    default: return 0;
 		}
 	}

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectoryComparator.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFileDirectoryComparator.java:r1588767-1601252

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java Sun Jun  8 20:23:32 2014
@@ -25,7 +25,6 @@ import org.apache.commons.lang3.builder.
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.roller.weblogger.WebloggerException;
 import org.apache.roller.weblogger.business.plugins.entry.WeblogEntryPlugin;
-import org.apache.roller.weblogger.business.referrers.RefererManager;
 import org.apache.roller.weblogger.business.WebloggerFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -89,6 +88,8 @@ public class Weblog implements Serializa
     private String  about            = null;
     private String  creator          = null;
 
+    private String  analyticsCode    = null;
+
     // Associated objects
     private WeblogCategory bloggerCategory = null;
 
@@ -98,6 +99,8 @@ public class Weblog implements Serializa
 
     private List<WeblogBookmarkFolder> bookmarkFolders = new ArrayList<WeblogBookmarkFolder>();
 
+    private List<MediaFileDirectory> mediaFileDirectories = new ArrayList<MediaFileDirectory>();
+
     public Weblog() {
     }
     
@@ -598,9 +601,8 @@ public class Weblog implements Serializa
      * This includes a change to weblog settings, entries, themes, templates, 
      * comments, categories, bookmarks, folders, etc.
      *
-     * Pings and Referrers are explicitly not included because pings do not
-     * affect visible changes to a weblog, and referrers change so often that
-     * it would diminish the usefulness of the attribute.
+     * Pings are explicitly not included because pings do not
+     * affect visible changes to a weblog.
      *
      */
     public Date getLastModified() {
@@ -683,7 +685,14 @@ public class Weblog implements Serializa
         this.iconPath = iconPath;
     }
 
-    
+    public String getAnalyticsCode() {
+        return analyticsCode;
+    }
+
+    public void setAnalyticsCode(String analyticsCode) {
+        this.analyticsCode = analyticsCode;
+    }
+
     /**
      * A description for the weblog (its purpose, authors, etc.)
      *
@@ -866,21 +875,7 @@ public class Weblog implements Serializa
         return ret;
     }
 
-    
-    /** 
-     * Return collection of referrers for current day.
-     */
-    public List<WeblogReferrer> getTodaysReferrers() {
-        try {
-            Weblogger roller = WebloggerFactory.getWeblogger();
-            RefererManager rmgr = roller.getRefererManager();
-            return rmgr.getTodaysReferers(this);
-        } catch (WebloggerException e) {
-            log.error("PageModel getTodaysReferers()", e);
-        }
-        return Collections.emptyList();
-    }
-    
+
     /**
      * Get number of hits counted today.
      */
@@ -1011,6 +1006,14 @@ public class Weblog implements Serializa
         this.bookmarkFolders = bookmarkFolders;
     }
 
+    public List<MediaFileDirectory> getMediaFileDirectories() {
+        return mediaFileDirectories;
+    }
+
+    public void setMediaFileDirectories(List<MediaFileDirectory> mediaFileDirectories) {
+        this.mediaFileDirectories = mediaFileDirectories;
+    }
+
     /**
      * Add a bookmark folder to this weblog.
      */
@@ -1044,4 +1047,30 @@ public class Weblog implements Serializa
         }
         return false;
     }
+
+    /**
+     * Indicates whether this weblog contains the specified media file directory
+     *
+     * @param name directory name
+     *
+     * @return true if directory is present, false otherwise.
+     */
+    public boolean hasMediaFileDirectory(String name) {
+        for (MediaFileDirectory directory : this.getMediaFileDirectories()) {
+            if (directory.getName().equals(name)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public MediaFileDirectory getMediaFileDirectory(String name) {
+        for (MediaFileDirectory dir : this.getMediaFileDirectories()) {
+            if (name.equals(dir.getName())) {
+                return dir;
+            }
+        }
+        return null;
+    }
+
 }

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java:r1588767-1601252

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java Sun Jun  8 20:23:32 2014
@@ -752,16 +752,6 @@ public class WeblogEntry implements Seri
         return comments.size();
     }
     
-    public List getReferers() {
-        List referers = null;
-        try {
-            referers = WebloggerFactory.getWeblogger().getRefererManager().getReferersToEntry(getId());
-        } catch (WebloggerException e) {
-            mLogger.error("Unexpected exception", e);
-        }
-        return referers;
-    }
-    
     //------------------------------------------------------------------------
         
     /**

Propchange: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java
------------------------------------------------------------------------------
  Merged /roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java:r1588767-1601252

Modified: roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogEntryWrapper.java
URL: http://svn.apache.org/viewvc/roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogEntryWrapper.java?rev=1601254&r1=1601253&r2=1601254&view=diff
==============================================================================
--- roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogEntryWrapper.java (original)
+++ roller/branches/rome2/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogEntryWrapper.java Sun Jun  8 20:23:32 2014
@@ -32,7 +32,6 @@ import org.apache.roller.weblogger.pojos
 import org.apache.roller.weblogger.pojos.WeblogEntryComment;
 import org.apache.roller.weblogger.pojos.WeblogEntryTag;
 import org.apache.roller.weblogger.pojos.WeblogEntryTagComparator;
-import org.apache.roller.weblogger.pojos.WeblogReferrer;
 import org.apache.roller.weblogger.util.HTMLSanitizer;
 
 
@@ -288,24 +287,6 @@ public final class WeblogEntryWrapper {
     }
     
     
-    public List getReferers() {
-        List initialCollection = this.pojo.getReferers();
-        
-        // iterate through and wrap
-        // we force the use of an ArrayList because it should be good enough to cover
-        // for any Collection type we encounter.
-        ArrayList wrappedCollection = new ArrayList(initialCollection.size());
-        Iterator it = initialCollection.iterator();
-        int i = 0;
-        while(it.hasNext()) {
-            wrappedCollection.add(i,WeblogReferrerWrapper.wrap((WeblogReferrer) it.next(), urlStrategy));
-            i++;
-        }
-        
-        return wrappedCollection;
-    }
-    
-    
     public String getPermalink() {
         return this.pojo.getPermalink();
     }



Mime
View raw message