roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r395393 [1/10] - in /incubator/roller/trunk: ./ contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/ metadata/database/hibernate/ sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/ sandbox/atomprotocol/src...
Date Wed, 19 Apr 2006 20:53:20 GMT
Author: agilliland
Date: Wed Apr 19 13:53:01 2006
New Revision: 395393

URL: http://svn.apache.org/viewcvs?rev=395393&view=rev
Log:
merging newbackend into trunk.
this merges changes in the roller-newbackend branch between revisions 391353 and 395388.


Added:
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePersistenceStrategy.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernatePersistenceStrategy.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateRollerPlanetManagerImpl.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateRollerPlanetManagerImpl.java
    incubator/roller/trunk/src/org/roller/presentation/filters/DebugFilter.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/src/org/roller/presentation/filters/DebugFilter.java
    incubator/roller/trunk/tests/org/roller/TestUtils.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java
    incubator/roller/trunk/tests/org/roller/business/CommentTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/CommentTest.java
    incubator/roller/trunk/tests/org/roller/business/PermissionTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/PermissionTest.java
    incubator/roller/trunk/tests/org/roller/business/PingsTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/PingsTest.java
    incubator/roller/trunk/tests/org/roller/business/PropertiesTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/PropertiesTest.java
    incubator/roller/trunk/tests/org/roller/business/UserTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/UserTest.java
    incubator/roller/trunk/tests/org/roller/business/WeblogCategoryTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogCategoryTest.java
    incubator/roller/trunk/tests/org/roller/business/WeblogEntryTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogEntryTest.java
    incubator/roller/trunk/tests/org/roller/business/WeblogPageTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogPageTest.java
    incubator/roller/trunk/tests/org/roller/business/WeblogTest.java
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogTest.java
    incubator/roller/trunk/tools/hibernate-3.1/
      - copied from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/
    incubator/roller/trunk/tools/hibernate-3.1/changelog.txt
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/changelog.txt
    incubator/roller/trunk/tools/hibernate-3.1/hibernate3.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/hibernate3.jar
    incubator/roller/trunk/tools/hibernate-3.1/lgpl.txt
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lgpl.txt
    incubator/roller/trunk/tools/hibernate-3.1/lib/
      - copied from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/
    incubator/roller/trunk/tools/hibernate-3.1/lib/_README.txt
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/_README.txt
    incubator/roller/trunk/tools/hibernate-3.1/lib/asm-attrs.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/asm-attrs.jar
    incubator/roller/trunk/tools/hibernate-3.1/lib/asm.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/asm.jar
    incubator/roller/trunk/tools/hibernate-3.1/lib/cglib-2.1.3.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/cglib-2.1.3.jar
    incubator/roller/trunk/tools/hibernate-3.1/lib/dom4j-1.6.1.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/dom4j-1.6.1.jar
    incubator/roller/trunk/tools/hibernate-3.1/lib/ehcache-1.1.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/ehcache-1.1.jar
    incubator/roller/trunk/tools/hibernate-3.1/lib/jdbc2_0-stdext.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/jdbc2_0-stdext.jar
    incubator/roller/trunk/tools/hibernate-3.1/lib/jdbc2_0-stdext.licence.txt
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/jdbc2_0-stdext.licence.txt
    incubator/roller/trunk/tools/hibernate-3.1/lib/jta.jar
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/jta.jar
    incubator/roller/trunk/tools/hibernate-3.1/lib/jta.licence.txt
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/lib/jta.licence.txt
    incubator/roller/trunk/tools/hibernate-3.1/readme.txt
      - copied unchanged from r395388, incubator/roller/branches/roller-newbackend/tools/hibernate-3.1/readme.txt
Removed:
    incubator/roller/trunk/src/org/roller/business/AutoPingManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/BookmarkManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/ConfigManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/HitCountData.java
    incubator/roller/trunk/src/org/roller/business/PersistenceStrategy.java
    incubator/roller/trunk/src/org/roller/business/PingQueueManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/PingTargetManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/PlanetManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/PropertiesManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/PubTimeData.java
    incubator/roller/trunk/src/org/roller/business/RefererManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/UserManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/WeblogManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePersistenceSession.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateStrategy.java
    incubator/roller/trunk/src/org/roller/business/hibernate/Messages.java
    incubator/roller/trunk/src/org/roller/business/hibernate/messages.properties
    incubator/roller/trunk/src/org/roller/model/PersistenceSession.java
    incubator/roller/trunk/src/org/roller/pojos/WebsiteObject.java
    incubator/roller/trunk/tests/org/roller/business/PermissionsTest.java
    incubator/roller/trunk/tests/org/roller/business/UserManagerTest.java
    incubator/roller/trunk/tests/org/roller/business/WebsiteTest.java
    incubator/roller/trunk/tools/hibernate-3.0/
Modified:
    incubator/roller/trunk/build.xml
    incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java
    incubator/roller/trunk/metadata/database/hibernate/hibernate.cfg.xml
    incubator/roller/trunk/properties.xmlf
    incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/Handler.java
    incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerMemberHandler.java
    incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerUserHandler.java
    incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerWeblogHandler.java
    incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java
    incubator/roller/trunk/src/org/roller/business/RollerImpl.java
    incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateBookmarkManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateConfigManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePingQueueManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePingTargetManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernatePropertiesManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateRefererManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateRollerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateUserManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java
    incubator/roller/trunk/src/org/roller/business/search/operations/RebuildWebsiteIndexOperation.java
    incubator/roller/trunk/src/org/roller/config/PingConfig.java
    incubator/roller/trunk/src/org/roller/model/AutoPingManager.java
    incubator/roller/trunk/src/org/roller/model/BookmarkManager.java
    incubator/roller/trunk/src/org/roller/model/PingQueueManager.java
    incubator/roller/trunk/src/org/roller/model/PingTargetManager.java
    incubator/roller/trunk/src/org/roller/model/PropertiesManager.java
    incubator/roller/trunk/src/org/roller/model/RefererManager.java
    incubator/roller/trunk/src/org/roller/model/Roller.java
    incubator/roller/trunk/src/org/roller/model/UserManager.java
    incubator/roller/trunk/src/org/roller/model/WeblogManager.java
    incubator/roller/trunk/src/org/roller/pojos/Assoc.java
    incubator/roller/trunk/src/org/roller/pojos/BookmarkData.java
    incubator/roller/trunk/src/org/roller/pojos/FolderData.java
    incubator/roller/trunk/src/org/roller/pojos/HierarchicalPersistentObject.java
    incubator/roller/trunk/src/org/roller/pojos/PersistentObject.java
    incubator/roller/trunk/src/org/roller/pojos/PingTargetData.java
    incubator/roller/trunk/src/org/roller/pojos/PlanetEntryData.java
    incubator/roller/trunk/src/org/roller/pojos/PlanetSubscriptionData.java
    incubator/roller/trunk/src/org/roller/pojos/RoleData.java
    incubator/roller/trunk/src/org/roller/pojos/RollerConfigData.java
    incubator/roller/trunk/src/org/roller/pojos/UserData.java
    incubator/roller/trunk/src/org/roller/pojos/WeblogCategoryAssoc.java
    incubator/roller/trunk/src/org/roller/pojos/WeblogCategoryData.java
    incubator/roller/trunk/src/org/roller/pojos/WeblogEntryData.java
    incubator/roller/trunk/src/org/roller/pojos/WeblogTemplate.java
    incubator/roller/trunk/src/org/roller/pojos/WebsiteData.java
    incubator/roller/trunk/src/org/roller/presentation/RollerContext.java
    incubator/roller/trunk/src/org/roller/presentation/RollerRequest.java
    incubator/roller/trunk/src/org/roller/presentation/RollerSession.java
    incubator/roller/trunk/src/org/roller/presentation/TurnoverReferersTask.java
    incubator/roller/trunk/src/org/roller/presentation/bookmarks/actions/BookmarkEditAction.java
    incubator/roller/trunk/src/org/roller/presentation/bookmarks/actions/BookmarkSaveAction.java
    incubator/roller/trunk/src/org/roller/presentation/bookmarks/actions/BookmarksAction.java
    incubator/roller/trunk/src/org/roller/presentation/bookmarks/actions/FolderEditAction.java
    incubator/roller/trunk/src/org/roller/presentation/bookmarks/actions/FolderSaveAction.java
    incubator/roller/trunk/src/org/roller/presentation/bookmarks/actions/ImportBookmarksFormAction.java
    incubator/roller/trunk/src/org/roller/presentation/filters/PersistenceSessionFilter.java
    incubator/roller/trunk/src/org/roller/presentation/pings/PingQueueProcessor.java
    incubator/roller/trunk/src/org/roller/presentation/pings/PingQueueTask.java
    incubator/roller/trunk/src/org/roller/presentation/planet/PlanetConfigAction.java
    incubator/roller/trunk/src/org/roller/presentation/planet/PlanetGroupsAction.java
    incubator/roller/trunk/src/org/roller/presentation/planet/PlanetSubscriptionsAction.java
    incubator/roller/trunk/src/org/roller/presentation/planet/RefreshEntriesTask.java
    incubator/roller/trunk/src/org/roller/presentation/planet/SyncWebsitesTask.java
    incubator/roller/trunk/src/org/roller/presentation/search/SearchResultsPageModel.java
    incubator/roller/trunk/src/org/roller/presentation/servlets/CommentServlet.java
    incubator/roller/trunk/src/org/roller/presentation/servlets/TrackbackServlet.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java
    incubator/roller/trunk/src/org/roller/presentation/velocity/RollerResourceLoader.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/BasePingTargetsAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CategoriesAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CategoryEditAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CategorySaveAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/CustomPingTargetsAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/PingSetupAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/ReferersAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/ToggleLinkbackDisplayAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java
    incubator/roller/trunk/src/org/roller/presentation/weblog/actions/WeblogEntryManagementAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/CommonPingTargetsAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/CreateWebsiteAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/InviteMemberAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/MemberPermissionsAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/RollerPropertiesAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/ThemeEditorAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/UserAdminAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/UserNewAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/WebsiteFormAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/YourProfileAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/actions/YourWebsitesAction.java
    incubator/roller/trunk/src/org/roller/presentation/website/formbeans/WebsiteFormEx.java
    incubator/roller/trunk/src/org/roller/presentation/xmlrpc/BaseAPIHandler.java
    incubator/roller/trunk/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java
    incubator/roller/trunk/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java
    incubator/roller/trunk/testdata/WEB-INF/classes/hibernate.cfg.xml
    incubator/roller/trunk/testdata/WEB-INF/classes/log4j.properties
    incubator/roller/trunk/tests/org/roller/RollerTestBase.java
    incubator/roller/trunk/tests/org/roller/business/BookmarkManagerTest.java
    incubator/roller/trunk/tests/org/roller/business/FileManagerTest.java
    incubator/roller/trunk/tests/org/roller/business/IndexManagerTest.java
    incubator/roller/trunk/tests/org/roller/business/PlanetManagerTest.java
    incubator/roller/trunk/tests/org/roller/business/RefererManagerTest.java
    incubator/roller/trunk/tests/org/roller/business/TestAll.java
    incubator/roller/trunk/tests/org/roller/business/WeblogManagerTest.java
    incubator/roller/trunk/tests/org/roller/presentation/ArchiveParserTest.java
    incubator/roller/trunk/tests/org/roller/presentation/StrutsActionTestBase.java
    incubator/roller/trunk/tests/org/roller/presentation/velocity/ExportRssTest.java

Modified: incubator/roller/trunk/build.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/build.xml?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/build.xml (original)
+++ incubator/roller/trunk/build.xml Wed Apr 19 13:53:01 2006
@@ -762,6 +762,7 @@
         <fileset dir="${basedir}/web/WEB-INF/classes">
             <include name="App*.properties"/>
             <include name="**/*.vm"/>
+	    <exclude name="hibernate.cfg.xml"/>
         </fileset>
     </copy>
     <copy file="${basedir}/web/WEB-INF/classes/roller.properties"
@@ -815,7 +816,20 @@
         <formatter type="xml"/>
         <batchtest toDir="${build.reports}/business/xml">
             <fileset dir="${build.tests}/WEB-INF/classes">
-               <include name="org/roller/business/*Test.class"/> 
+		<!-- UserManager Tests -->
+		<include name="org/roller/business/UserTest.class"/> 
+	        <include name="org/roller/business/WeblogTest.class"/>
+	        <include name="org/roller/business/PermissionTest.class"/>
+	        <include name="org/roller/business/WeblogPageTest.class"/>
+	        <include name="org/roller/business/PingsTest.class"/>
+	        <include name="org/roller/business/PropertiesTest.class"/>
+	        <include name="org/roller/business/WeblogEntryTest.class"/>
+	        <include name="org/roller/business/WeblogCategoryTest.class"/>
+	        <include name="org/roller/business/CommentTest.class"/>
+		<include name="org/roller/business/FileManagerTest.class"/>
+	        <include name="org/roller/business/PlanetManagerTest.class"/>
+		<include name="org/roller/business/BookmarkManagerTest.class"/>
+		<include name="org/roller/business/RefererManagerTest.class"/>
             </fileset>
         </batchtest>
     </junit>

Modified: incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java (original)
+++ incubator/roller/trunk/contrib/plugins/src/org/roller/presentation/velocity/plugins/topictag/TopicTagPlugin.java Wed Apr 19 13:53:01 2006
@@ -323,7 +323,7 @@
         else
         {
             BookmarkManager bMgr = RollerFactory.getRoller().getBookmarkManager();
-            List bookmarks = bMgr.retrieveBookmarks(bMgr.getRootFolder(website), true);
+            List bookmarks = bMgr.getBookmarks(bMgr.getRootFolder(website), true);
 
             for (Iterator i = bookmarks.iterator(); i.hasNext();)
             {

Modified: incubator/roller/trunk/metadata/database/hibernate/hibernate.cfg.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/metadata/database/hibernate/hibernate.cfg.xml?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/metadata/database/hibernate/hibernate.cfg.xml (original)
+++ incubator/roller/trunk/metadata/database/hibernate/hibernate.cfg.xml Wed Apr 19 13:53:01 2006
@@ -5,11 +5,16 @@
 <hibernate-configuration>
     <session-factory>
     
-        <!-- By default Roller uses a JNDI DataSource and the MySQLDialect -->
-        <property name="show_sql">false</property>
+        <!-- By default Roller uses a JNDI DataSource -->
         <property name="connection.datasource">java:comp/env/jdbc/rollerdb</property>
-        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
+        <property name="show_sql">false</property>
+        
+        <!-- use thread local Session context -->
+        <property name="hibernate.current_session_context_class">thread</property>
         
+        
+        <!-- select SQL dialect, MySQL by default -->
+        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
         <!--
         If you want to use HSQLDB, PostgreSQL, DB2 or Derby, Oracle, SQLServer then use the right dialect   
         <property name="dialect">org.hibernate.dialect.HQLDBDialect</property> 
@@ -42,13 +47,14 @@
         <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
         -->
 
+        
         <!-- Hibernate L2 Caching -->
         <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
         <property name="hibernate.generate_statistics">true</property>
         <property name="hibernate.cache.use_structured_entries">true</property>
         
+        
         <!-- Map Roller pojo classes -->
-        <mapping resource="org/roller/business/HitCountData.hbm.xml" />
         <mapping resource="org/roller/pojos/BookmarkData.hbm.xml" />
         <mapping resource="org/roller/pojos/CommentData.hbm.xml" />
         <mapping resource="org/roller/pojos/EntryAttributeData.hbm.xml" />

Modified: incubator/roller/trunk/properties.xmlf
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/properties.xmlf?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/properties.xmlf (original)
+++ incubator/roller/trunk/properties.xmlf Wed Apr 19 13:53:01 2006
@@ -14,7 +14,7 @@
 <property name="build.jspc"          value="${ro.build}/jspc"/>
 <property name="build.reports"       value="${ro.build}/reports"/>
 <property name="tools.struts"        value="${ro.tools}/struts-1.2.4" />
-<property name="tools.hibernate"     value="${ro.tools}/hibernate-3.0" />
+<property name="tools.hibernate"     value="${ro.tools}/hibernate-3.1" />
 <property name="tools.spring"        value="${ro.tools}/spring-1.2" />
 <property name="tools.jstl"          value="${ro.tools}/jakarta-taglibs-standard-1.1.2" />
 <property name="tools.xdoclet"       value="${ro.tools}/buildtime/xdoclet-1.2.3" />

Modified: incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/Handler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/Handler.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/Handler.java (original)
+++ incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/Handler.java Wed Apr 19 13:53:01 2006
@@ -139,7 +139,6 @@
                 UserData user = getRoller().getUserManager().getUser(auth.getUserId());
                 if (user != null && user.hasRole("admin") && user.getEnabled().booleanValue()) {
                     // success!
-                    getRoller().setUser(user);
                     username = auth.getUserId();
                 } else {
                     logger.warn("WARN: Is not global admin user: " + user.getUserName());

Modified: incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerMemberHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerMemberHandler.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerMemberHandler.java (original)
+++ incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerMemberHandler.java Wed Apr 19 13:53:01 2006
@@ -269,15 +269,12 @@
         try {
             UserManager mgr = getRoller().getUserManager();
             
-            // Need system user to create website
-            getRoller().setUser(UserData.SYSTEM_USER);
-            
             for (int i = 0; i < c.getEntries().length; i++) {
                 MemberEntry entry = (MemberEntry)c.getEntries()[i];
                 PermissionsData pd = toPermissionsData(entry);
-                pd.save();
+                mgr.storePermissions(pd);
             }
-            getRoller().commit();
+            getRoller().flush();
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not create members", re);
         }
@@ -319,7 +316,6 @@
     
     private void updateMembers(MemberEntrySet c) throws HandlerException {
         try {
-            getRoller().setUser(UserData.SYSTEM_USER);
             for (int i = 0; i < c.getEntries().length; i++) {
                 MemberEntry entry = (MemberEntry)c.getEntries()[i];
                 PermissionsData pd = getPermissionsData(entry);
@@ -328,7 +324,7 @@
                 }
                 updatePermissionsData(pd, entry);
             }
-            getRoller().commit();
+            getRoller().flush();
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not update members", re);
         }
@@ -347,7 +343,9 @@
             WebsiteData wd = getRoller().getUserManager().getWebsiteByHandle(entry.getHandle());
             CacheManager.invalidate(wd);
             
-            pd.save();
+            UserManager mgr = getRoller().getUserManager();
+            mgr.storePermissions(pd);
+            
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not update permissions data", re);
         }
@@ -365,7 +363,6 @@
         }
         
         try {
-            getRoller().setUser(UserData.SYSTEM_USER);
             PermissionsData pd = getPermissionsData(handle, username);
             PermissionsData[] pds;
             if (pd == null) {
@@ -373,8 +370,8 @@
             }
             pds = new PermissionsData[] { pd };
             
-            pd.remove();
-            getRoller().commit();
+            UserManager mgr = getRoller().getUserManager();
+            mgr.removePermissions(pd);
             
             UserData ud = getRoller().getUserManager().getUser(username);
             CacheManager.invalidate(ud);

Modified: incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerUserHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerUserHandler.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerUserHandler.java (original)
+++ incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerUserHandler.java Wed Apr 19 13:53:01 2006
@@ -171,15 +171,12 @@
         try {
             UserManager mgr = getRoller().getUserManager();
             
-            // Need system user to create website
-            getRoller().setUser(UserData.SYSTEM_USER);
-            
             for (int i = 0; i < c.getEntries().length; i++) {
                 UserEntry entry = (UserEntry)c.getEntries()[i];
                 UserData user = toUserData(entry);
                 mgr.addUser(user);
             }
-            getRoller().commit();
+            getRoller().flush();
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not create users: " + c, re);
         }
@@ -189,9 +186,6 @@
         try {
             UserManager mgr = getRoller().getUserManager();
             
-            // Need system user to create user
-            getRoller().setUser(UserData.SYSTEM_USER);
-            
             for (int i = 0; i < c.getEntries().length; i++) {
                 UserEntry entry = (UserEntry)c.getEntries()[i];
                 UserData ud = mgr.getUser(entry.getName());
@@ -199,9 +193,10 @@
                     throw new NotFoundException("ERROR: Uknown user: " + entry.getName());
                 }
                 updateUserData(ud, entry);
-                ud.save();
+                
+                mgr.storeUser(ud);
             }
-            getRoller().commit();
+            getRoller().flush();
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not update users: " + c, re);
         }
@@ -229,7 +224,6 @@
     
     private EntrySet deleteEntry() throws HandlerException {
         try {
-            getRoller().setUser(UserData.SYSTEM_USER);
             UserManager mgr = getRoller().getUserManager();
             UserData ud = mgr.getUser(getUri().getEntryId());
             
@@ -242,8 +236,8 @@
             }
             
             UserData[] uds = new UserData[] { ud };
-            ud.remove();
-            getRoller().commit();
+            mgr.removeUser(ud);
+            
             CacheManager.invalidate(ud);
             
             EntrySet es = toUserEntrySet(uds);

Modified: incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerWeblogHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerWeblogHandler.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerWeblogHandler.java (original)
+++ incubator/roller/trunk/sandbox/atomadminprotocol/src/org/roller/presentation/atomadminapi/RollerWeblogHandler.java Wed Apr 19 13:53:01 2006
@@ -181,17 +181,14 @@
             
             //TODO: group blogging check?
             
-            // Need system user to create website
-            getRoller().setUser(UserData.SYSTEM_USER);
             HashMap pages = null; //getRollerContext().readThemeMacros(form.getTheme());
             
             for (int i = 0; i < c.getEntries().length; i++) {
                 WeblogEntry entry = (WeblogEntry)c.getEntries()[i];
                 UserData user = mgr.getUser(entry.getCreatingUser());
                 WebsiteData wd = mgr.createWebsite(user, pages, entry.getHandle(), entry.getName(), entry.getDescription(), entry.getEmailAddress(), DEFAULT_THEME, entry.getLocale(), entry.getTimezone());
-                wd.save();
             }
-            getRoller().commit();
+            getRoller().flush();
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not create weblogs: " + c, re);
         }
@@ -203,8 +200,6 @@
             
             //TODO: group blogging check?
             
-            // Need system user to create website
-            getRoller().setUser(UserData.SYSTEM_USER);
             HashMap pages = null;
             
             for (int i = 0; i < c.getEntries().length; i++) {
@@ -215,7 +210,7 @@
                 }
                 updateWebsiteData(wd, entry);
             }
-            getRoller().commit();
+            getRoller().flush();
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not update weblogs: " + c, re);
         }
@@ -239,7 +234,9 @@
         }
         
         try {
-            wd.save();
+            UserManager mgr = getRoller().getUserManager();
+            mgr.storeWebsite(wd);
+            
             CacheManager.invalidate(wd);
         } catch (RollerException re) {
             throw new InternalException("ERROR: Could not update website data", re);
@@ -250,9 +247,6 @@
         try {
             UserManager mgr = getRoller().getUserManager();
             
-            // Need system user to create website
-            getRoller().setUser(UserData.SYSTEM_USER);
-            
             WebsiteData wd = mgr.getWebsiteByHandle(getUri().getEntryId());
             if (wd == null) {
                 throw new NotFoundException("ERROR: Uknown weblog handle: " + getUri().getEntryId());
@@ -261,8 +255,7 @@
             WebsiteData[] wds = new WebsiteData[] { wd };
             EntrySet es = toWeblogEntrySet(wds);
             
-            wd.remove();
-            getRoller().commit();
+            mgr.removeWebsite(wd);
             
             CacheManager.invalidate(wd);
             

Modified: incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java (original)
+++ incubator/roller/trunk/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java Wed Apr 19 13:53:01 2006
@@ -52,6 +52,7 @@
 import javax.activation.FileTypeMap;
 import org.roller.RollerException;
 import org.roller.config.RollerConfig;
+import org.roller.model.WeblogManager;
 import org.roller.presentation.cache.CacheManager;
 
 /**
@@ -82,7 +83,7 @@
     private HttpServletRequest mRequest;
     private Roller             mRoller;
     private RollerContext      mRollerContext;
-    private String             mUsername;
+    private UserData           user;
     private int                mMaxEntries = 20;
     //private MessageDigest    md5Helper = null;
     //private MD5Encoder       md5Encoder = new MD5Encoder();
@@ -104,12 +105,11 @@
         
         // TODO: decide what to do about authentication, is WSSE going to fly?
         //mUsername = authenticateWSSE(request);
-        mUsername = authenticateBASIC(request);
+        String mUsername = authenticateBASIC(request);
         
         if (mUsername != null) {
             try {
-                UserData user = mRoller.getUserManager().getUser(mUsername);
-                mRoller.setUser(user);
+                this.user = mRoller.getUserManager().getUserByUsername(mUsername);
             } catch (Exception e) {
                 mLogger.error("ERROR: setting user", e);
             }
@@ -120,7 +120,7 @@
      * Return weblogHandle of authenticated user or null if there is none.
      */
     public String getAuthenticatedUsername() {
-        return mUsername;
+        return this.user.getUserName();
     }
     
     //---------------------------------------------------------------- introspection
@@ -133,7 +133,6 @@
         if (pathInfo.length == 0) {
             String absUrl = mRollerContext.getAbsoluteContextUrl(mRequest);
             AtomService service = new AtomService();
-            UserData user = mRoller.getUserManager().getUser(mUsername);
             List perms = mRoller.getUserManager().getAllPermissions(user);
             if (perms != null) {
                 for (Iterator iter=perms.iterator(); iter.hasNext();) {
@@ -298,13 +297,12 @@
         // authenticated client posted a weblog entry
         String handle = pathInfo[0];
         WebsiteData website = mRoller.getUserManager().getWebsiteByHandle(handle);
-        UserData creator = mRoller.getUserManager().getUser(mUsername);
         if (canEdit(website)) {
             // Save it and commit it
+            WeblogManager mgr = mRoller.getWeblogManager();
             WeblogEntryData rollerEntry = createRollerEntry(website, entry);
-            rollerEntry.setCreator(creator);
-            rollerEntry.save();
-            mRoller.commit();
+            rollerEntry.setCreator(this.user);
+            mgr.saveWeblogEntry(rollerEntry);
             
             // Throttle one entry per second
             // (MySQL timestamp has 1 sec resolution, damnit)
@@ -326,7 +324,7 @@
         if (pathInfo.length == 3) // URI is /blogname/entries/entryid
         {
             WeblogEntryData entry =
-                mRoller.getWeblogManager().retrieveWeblogEntry(pathInfo[2]);
+                mRoller.getWeblogManager().getWeblogEntry(pathInfo[2]);
             if (entry != null && !canView(entry)) {
                 throw new Exception("ERROR not authorized to view entry");
             } else if (entry != null) {
@@ -344,8 +342,10 @@
         if (pathInfo.length == 3) // URI is /blogname/entries/entryid
         {
             WeblogEntryData rollerEntry =
-                    mRoller.getWeblogManager().retrieveWeblogEntry(pathInfo[2]);
+                    mRoller.getWeblogManager().getWeblogEntry(pathInfo[2]);
             if (canEdit(rollerEntry)) {
+                WeblogManager mgr = mRoller.getWeblogManager();
+                
                 WeblogEntryData rawUpdate = createRollerEntry(rollerEntry.getWebsite(), entry);
                 rollerEntry.setPubTime(rawUpdate.getPubTime());
                 rollerEntry.setUpdateTime(rawUpdate.getUpdateTime());
@@ -353,8 +353,8 @@
                 rollerEntry.setStatus(rawUpdate.getStatus());
                 rollerEntry.setCategory(rawUpdate.getCategory());
                 rollerEntry.setTitle(rawUpdate.getTitle());
-                rollerEntry.save();
-                mRoller.commit();
+                
+                mgr.saveWeblogEntry(rollerEntry);
                 
                 CacheManager.invalidate(rollerEntry.getWebsite());
                 if (rollerEntry.isPublished()) {
@@ -374,10 +374,10 @@
         if (pathInfo.length == 3) // URI is /blogname/entries/entryid
         {
             WeblogEntryData rollerEntry =
-                    mRoller.getWeblogManager().retrieveWeblogEntry(pathInfo[2]);
+                    mRoller.getWeblogManager().getWeblogEntry(pathInfo[2]);
             if (canEdit(rollerEntry)) {
-                rollerEntry.remove();
-                mRoller.commit();
+                WeblogManager mgr = mRoller.getWeblogManager();
+                mgr.removeWeblogEntry(rollerEntry);
                 return;
             }
             throw new Exception("ERROR not authorized to delete entry");
@@ -555,7 +555,7 @@
      */
     private boolean canEdit(WeblogEntryData entry) {
         try {
-            return entry.canSave();
+            return entry.hasWritePermissions(this.user);
         } catch (Exception e) {
             mLogger.error("ERROR: checking website.canSave()");
         }
@@ -567,8 +567,7 @@
      */
     private boolean canEdit(WebsiteData website) {
         try {
-            UserData user = mRoller.getUser();
-            return website.hasUserPermissions(user, PermissionsData.AUTHOR);
+            return website.hasUserPermissions(this.user, PermissionsData.AUTHOR);
         } catch (Exception e) {
             mLogger.error("ERROR: checking website.hasUserPermissions()");
         }
@@ -624,7 +623,7 @@
         }
         String digest = null;
         try {
-            UserData user = mRoller.getUserManager().getUser(userName);
+            UserData user = mRoller.getUserManager().getUserByUsername(userName);
             digest = WSSEUtilities.generateDigest(
                     WSSEUtilities.base64Decode(nonce),
                     created.getBytes("UTF-8"),
@@ -657,7 +656,7 @@
                         int p = userPass.indexOf(":");
                         if (p != -1) {
                             userID = userPass.substring(0, p);
-                            UserData user = mRoller.getUserManager().getUser(userID);                                                        
+                            UserData user = mRoller.getUserManager().getUserByUsername(userID);                                                        
                             boolean enabled = user.getEnabled().booleanValue();
                             if (enabled) {    
                                 // are passwords encrypted?
@@ -671,9 +670,6 @@
                                         RollerConfig.getProperty("passwds.encryption.algorithm"));
                                 }
                                 valid = user.getPassword().equals(password);
-                                if (valid) {
-                                    RollerFactory.getRoller().setUser(user);
-                                }
                             }
                         }
                     }

Modified: incubator/roller/trunk/src/org/roller/business/RollerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/business/RollerImpl.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/business/RollerImpl.java (original)
+++ incubator/roller/trunk/src/org/roller/business/RollerImpl.java Wed Apr 19 13:53:01 2006
@@ -6,33 +6,19 @@
 package org.roller.business;
 
 import java.sql.Connection;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.roller.RollerException;
 import org.roller.business.referrers.ReferrerQueueManager;
 import org.roller.business.referrers.ReferrerQueueManagerImpl;
-
 import org.roller.business.utils.UpgradeDatabase;
-
-import org.roller.model.AutoPingManager;
-import org.roller.model.BookmarkManager;
-import org.roller.model.ConfigManager;
 import org.roller.model.FileManager;
 import org.roller.model.IndexManager;
 import org.roller.model.PagePluginManager;
-import org.roller.model.PingQueueManager;
-import org.roller.model.PingTargetManager;
-import org.roller.model.PlanetManager;
-import org.roller.model.PropertiesManager;
-import org.roller.model.RefererManager;
 import org.roller.model.Roller;
 import org.roller.model.ThemeManager;
 import org.roller.model.ThreadManager;
-import org.roller.pojos.UserData;
-import org.roller.model.UserManager;
-import org.roller.model.WeblogManager;
+
 
 /**
  * The abstract version of the Roller implementation.
@@ -43,26 +29,15 @@
  */
 public abstract class RollerImpl implements Roller {
     
-    private static Log mLogger =
-            LogFactory.getFactory().getInstance(RollerImpl.class);
+    private static Log mLogger = LogFactory.getLog(RollerImpl.class);
+    
+    private FileManager fileManager = null;
+    private IndexManager indexManager = null;
+    private ThreadManager threadManager = null;
+    private ThemeManager themeManager = null;
+    private PagePluginManager pluginManager = null;
     
-    protected FileManager   mFileManager = null;
-    protected IndexManager  mIndexManager = null;
-    protected ThreadManager mThreadManager = null;
-    protected ThemeManager  mThemeManager = null;
-    protected PagePluginManager mPluginManager = null;
-    protected BookmarkManager mBookmarkManager;   
-    protected PropertiesManager mPropsManager = null;
-    protected PlanetManager   mPlanetManager = null;
-    protected RefererManager  mRefererManager;
-    protected UserManager     mUserManager;
-    protected WeblogManager   mWeblogManager;
-    protected PingQueueManager mPingQueueManager;
-    protected AutoPingManager mAutoPingManager;
-    protected PingTargetManager mPingTargetManager;
-    protected PersistenceStrategy mStrategy = null;
     
-    /** Creates a new instance of RollerImpl */
     public RollerImpl() {
         // nothing to do here yet
     }
@@ -72,265 +47,92 @@
      * @see org.roller.model.Roller#getFileManager()
      */
     public FileManager getFileManager() throws RollerException {
-        if (mFileManager == null) {
-            mFileManager = new FileManagerImpl();
+        if (fileManager == null) {
+            fileManager = new FileManagerImpl();
         }
-        return mFileManager;
+        return fileManager;
     }
     
+    
     /**
      * @see org.roller.model.Roller#getThreadManager()
      */
     public ThreadManager getThreadManager() throws RollerException {
-        if (mThreadManager == null) {
-            mThreadManager = new ThreadManagerImpl();
+        if (threadManager == null) {
+            threadManager = new ThreadManagerImpl();
         }
-        return mThreadManager;
+        return threadManager;
     }
     
+    
     /**
      * @see org.roller.model.Roller#getIndexManager()
      */
     public IndexManager getIndexManager() throws RollerException {
-        if (mIndexManager == null) {
-            mIndexManager = new IndexManagerImpl();
+        if (indexManager == null) {
+            indexManager = new IndexManagerImpl();
         }
-        return mIndexManager;
+        return indexManager;
     }
     
+    
     /**
      * @see org.roller.model.Roller#getThemeManager()
      */
     public ThemeManager getThemeManager() throws RollerException {
-        if (mThemeManager == null) {
-            mThemeManager = new ThemeManagerImpl();
+        if (themeManager == null) {
+            themeManager = new ThemeManagerImpl();
         }
-        return mThemeManager;
+        return themeManager;
     }
     
+    
+    /**
+     * @see org.roller.business.referrers.ReferrerQueueManager
+     */
     public ReferrerQueueManager getReferrerQueueManager() {
         return ReferrerQueueManagerImpl.getInstance();
     }
     
+    
     /**
      * @see org.roller.model.Roller#getPluginManager()
      */
     public PagePluginManager getPagePluginManager() throws RollerException {
-        if (mPluginManager == null) {
-            mPluginManager = new PagePluginManagerImpl();
+        if (pluginManager == null) {
+            pluginManager = new PagePluginManagerImpl();
         }
-        return mPluginManager;
+        return pluginManager;
     }
     
     
-    public void release() {
-        if (mFileManager != null) mFileManager.release();
-        if (mThreadManager != null) mThreadManager.release();
-        if (mPluginManager != null) mPluginManager.release();
-        if (mBookmarkManager != null) mBookmarkManager.release();
-        if (mRefererManager != null) mRefererManager.release();
-        if (mUserManager != null) mUserManager.release();
-        if (mWeblogManager != null) mWeblogManager.release();
-        if (mPingTargetManager != null) mPingTargetManager.release();
-        if (mPingQueueManager != null) mPingQueueManager.release();
-        if (mAutoPingManager != null) mAutoPingManager.release();
-        
-        try
-        {
-            if (mStrategy != null) mStrategy.release(); 
-        }
-        catch (Throwable e)
-        {
-            mLogger.error(
-            "Exception with mSupport.release() [" + e + "]", e);
-        }
-    }
-    
-    public void begin() throws RollerException {
-        mStrategy.begin(UserData.ANONYMOUS_USER);
+    /**
+     * @see org.roller.model.Roller#upgradeDatabase(java.sql.Connection)
+     */
+    public void upgradeDatabase(Connection con) throws RollerException {
+        UpgradeDatabase.upgradeDatabase(con);
     }
     
-    public void begin(UserData user) throws RollerException {
-        mStrategy.begin(user);
-    }
     
-    public UserData getUser() throws RollerException {
-        return mStrategy.getUser();
-    }
-
-    public void setUser(UserData user) throws RollerException {
-        mStrategy.setUser(user);
-    }
-
-    public void commit() throws RollerException {
-        mStrategy.commit();
-    }
-
-    public void rollback() {
+    public void release() {
         try {
-            mStrategy.rollback();
-        } catch (Throwable e) {
-            mLogger.error(e);
-        }
-    }
-
-    /** */
-    protected UserManager createUserManager() {
-        throw new NullPointerException();
-    }
-
-    /** 
-     * @see org.roller.model.Roller#getUserManager()
-     */
-    public UserManager getUserManager() throws RollerException {
-        if (mUserManager == null) {
-            mUserManager = createUserManager();
-        }
-        return mUserManager;
-    }
-
-    /** */
-    protected BookmarkManager createBookmarkManager() {
-        throw new NullPointerException();
-    }
-
-    /** 
-     * @see org.roller.model.Roller#getBookmarkManager()
-     */
-    public BookmarkManager getBookmarkManager() throws RollerException {
-        if ( mBookmarkManager == null )  {
-            mBookmarkManager = createBookmarkManager();
+            if (fileManager != null) fileManager.release();
+            if (threadManager != null) threadManager.release();
+            if (pluginManager != null) pluginManager.release();
+        } catch(Throwable e) {
+            mLogger.error("Error calling Roller.release()", e);
         }
-        return mBookmarkManager;
-    }
-
-    /** */
-    protected WeblogManager createWeblogManager() {
-        throw new NullPointerException();
-    }
-
-    /** 
-     * @see org.roller.model.Roller#getWeblogManager()
-     */
-    public WeblogManager getWeblogManager() throws RollerException {
-        if ( mWeblogManager == null )  {
-            mWeblogManager = createWeblogManager();
-        }
-        return mWeblogManager;
-    }
-
-    /** */
-    protected RefererManager createRefererManager() {
-        throw new NullPointerException();
-    }
-
-    /** 
-     * @see org.roller.model.Roller#getRefererManager()
-     */
-    public RefererManager getRefererManager() throws RollerException {
-        if (mRefererManager == null) {
-            mRefererManager = createRefererManager();
-        }
-        return mRefererManager;
-    }
-
-    /**
-     * @see org.roller.model.Roller#getConfigManager()
-     */
-    public ConfigManager getConfigManager() throws RollerException 
-    {
-        throw new RollerException("getConfigManager is Deprecated.");
     }
     
-    /** */
-    protected PropertiesManager createPropertiesManager() {
-        throw new NullPointerException();
-    }
-
-    /**
-     * @see org.roller.model.Roller#getPropertiesManager()
-     */
-    public PropertiesManager getPropertiesManager() throws RollerException {
-        if (mPropsManager == null) {
-            mPropsManager = createPropertiesManager();
-        }
-        return mPropsManager;
-    }
-
-    /** */
-    protected PingQueueManager createPingQueueManager() {
-        throw new NullPointerException();
-    }
-
-    /**
-     * @see org.roller.model.Roller#getPingTargetManager()
-     */
-    public PingQueueManager getPingQueueManager() throws RollerException {
-        if (mPingQueueManager == null) {
-            mPingQueueManager = createPingQueueManager();
-        }
-        return mPingQueueManager;
-    }
-
-    /** */
-    protected PlanetManager createPlanetManager() {
-        throw new NullPointerException();
-    }
-
-    /**
-     * @see org.roller.model.Roller#getPlanetManager()
-     */
-    public PlanetManager getPlanetManager() throws RollerException {
-        if ( mPlanetManager == null ) {
-            mPlanetManager = createPlanetManager();
-        }
-        return mPlanetManager;
-    }
-
-    /** */
-    protected  AutoPingManager createAutoPingManager() {
-        throw new NullPointerException();
-    }
-
-    /**
-     * @see org.roller.model.Roller#getPingTargetManager()
-     */
-    public AutoPingManager getAutopingManager() throws RollerException {
-        if (mAutoPingManager == null) {
-            mAutoPingManager = createAutoPingManager();
-        }
-        return mAutoPingManager;
-    }
-
-    /** */
-    protected PingTargetManager createPingTargetManager() {
-        throw new NullPointerException();
-    }
-
-    /**
-     * @see org.roller.model.Roller#getPingTargetManager()
-     */
-    public PingTargetManager getPingTargetManager() throws RollerException {
-        if (mPingTargetManager == null) {
-            mPingTargetManager = createPingTargetManager();
-        }
-        return mPingTargetManager;
-    }
-
-    /**
-     * @see org.roller.model.Roller#upgradeDatabase(java.sql.Connection)
-     */
-    public void upgradeDatabase(Connection con) throws RollerException {
-        UpgradeDatabase.upgradeDatabase(con);
-    }
-
-     public void shutdown() {
+    
+    public void shutdown() {
         try {
-            if(getReferrerQueueManager() != null) getReferrerQueueManager().shutdown();
-            if (mIndexManager != null) mIndexManager.shutdown();
-            if (mThreadManager != null) mThreadManager.shutdown();
-        } catch(Exception e) {
-            mLogger.warn(e);
+            if (getReferrerQueueManager() != null) getReferrerQueueManager().shutdown();
+            if (indexManager != null) indexManager.shutdown();
+            if (threadManager != null) threadManager.shutdown();
+        } catch(Throwable e) {
+            mLogger.error("Error calling Roller.shutdown()", e);
         }
     }
+    
 }

Modified: incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/roller/business/ThemeManagerImpl.java Wed Apr 19 13:53:01 2006
@@ -311,7 +311,7 @@
                 if(theme_template.getName().equals(WeblogTemplate.DEFAULT_PAGE)) {
                     // this is the main Weblog template
                     try {
-                        template = userMgr.retrievePage(website.getDefaultPageId());
+                        template = userMgr.getPage(website.getDefaultPageId());
                     } catch(Exception e) {
                         // user may not have a default page yet
                     }
@@ -335,7 +335,7 @@
                             theme_template.getContents(),       // contents
                             new Date()                          // last mod
                             );
-                    userMgr.storePage( template );
+                    userMgr.savePage( template );
                 }
             }
             
@@ -363,7 +363,7 @@
             }
             
             // save our updated website
-            userMgr.storeWebsite(website);
+            userMgr.saveWebsite(website);
             
         } catch (Exception e) {
             mLogger.error("ERROR in action",e);

Modified: incubator/roller/trunk/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java?rev=395393&r1=395392&r2=395393&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java Wed Apr 19 13:53:01 2006
@@ -13,123 +13,165 @@
 import org.hibernate.Session;
 import org.hibernate.criterion.Expression;
 import org.roller.RollerException;
-import org.roller.business.PersistenceStrategy;
-import org.roller.business.AutoPingManagerImpl;
 import org.roller.pojos.AutoPingData;
 import org.roller.pojos.PingTargetData;
 import org.roller.pojos.WeblogEntryData;
 import org.roller.pojos.WebsiteData;
-
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.roller.config.PingConfig;
+import org.roller.model.AutoPingManager;
+import org.roller.model.PingQueueManager;
+import org.roller.model.RollerFactory;
 
-public class HibernateAutoPingManagerImpl extends AutoPingManagerImpl
-{
-    static final long serialVersionUID = 5420615676256979199L;
 
-    public HibernateAutoPingManagerImpl(PersistenceStrategy persistenceStrategy)
-    {
-        super(persistenceStrategy);
-    }
-
-    public void removeAutoPing(PingTargetData pingTarget, WebsiteData website) throws RollerException
-    {
-        try
-        {
-            Session session = ((HibernateStrategy) persistenceStrategy).getSession();
+/**
+ * Hibernate implementation of the AutoPingManager.
+ */
+public class HibernateAutoPingManagerImpl implements AutoPingManager {
+    
+    static final long serialVersionUID = 5420615676256979199L;
+    
+    private static Log log = LogFactory.getLog(HibernateAutoPingManagerImpl.class);
+    
+    private HibernatePersistenceStrategy strategy = null;
+    
+    
+    public HibernateAutoPingManagerImpl(HibernatePersistenceStrategy strat) {
+        this.strategy = strat;
+    }
+    
+    
+    public AutoPingData getAutoPing(String id) throws RollerException {
+        return (AutoPingData) strategy.load(id, AutoPingData.class);
+    }
+    
+    
+    public void saveAutoPing(AutoPingData autoPing) throws RollerException {
+        strategy.store(autoPing);
+    }
+    
+    
+    public void removeAutoPing(AutoPingData autoPing)  throws RollerException {
+        //TODO: first remove all related category restrictions (category restrictions are not yet implemented)
+        strategy.remove(autoPing);
+    }
+    
+    
+    public void removeAutoPing(PingTargetData pingTarget, WebsiteData website) throws RollerException {
+        try {
+            Session session = strategy.getSession();
             Criteria criteria = session.createCriteria(AutoPingData.class);
-            // Currently category restrictions are not yet implemented, so we return all auto ping configs for the
-            // website.
+            
+            // Currently category restrictions are not yet implemented, so we 
+            // return all auto ping configs for the website.
             criteria.add(Expression.eq("pingTarget", pingTarget));
             criteria.add(Expression.eq("website", website));
             List matches = criteria.list();
+            
             // This should have at most one element, but we remove them all regardless.
-            for (Iterator i = matches.iterator(); i.hasNext(); ) {
-                ((AutoPingData) i.next()).remove();
-            }
+            this.removeAutoPings(matches);
+        } catch (HibernateException e) {
+            throw new RollerException(e);
+        }
+    }
+    
+    
+    public void removeAutoPings(Collection autopings) throws RollerException {
+        
+        // just go through the list and remove each auto ping
+        Iterator pings = autopings.iterator();
+        while (pings.hasNext()) {
+            this.strategy.remove((AutoPingData) pings.next());
         }
-        catch (HibernateException e)
-        {
+    }
+    
+    
+    public void removeAllAutoPings() throws RollerException {
+        try {
+            Session session = ((HibernatePersistenceStrategy) strategy).getSession();
+            Criteria criteria = session.createCriteria(AutoPingData.class);
+            List allAutoPings = criteria.list();
+            this.removeAutoPings(allAutoPings);
+        } catch (HibernateException e) {
             throw new RollerException(e);
         }
     }
-
-    public List getAutoPingsByWebsite(WebsiteData website) throws RollerException
-    {
-        try
-        {
-            Session session = ((HibernateStrategy) persistenceStrategy).getSession();
+    
+    
+    public void queueApplicableAutoPings(WeblogEntryData changedWeblogEntry) throws RollerException {
+        if (PingConfig.getSuspendPingProcessing()) {
+            if (log.isDebugEnabled()) log.debug("Ping processing is suspended.  No auto pings will be queued.");
+            return;
+        }
+        
+        // TODO: new manager method for addQueueEntries(list)?
+        PingQueueManager pingQueueMgr = RollerFactory.getRoller().getPingQueueManager();
+        List applicableAutopings = getApplicableAutoPings(changedWeblogEntry);
+        for (Iterator i = applicableAutopings.iterator(); i.hasNext(); ) {
+            AutoPingData autoPing = (AutoPingData) i.next();
+            pingQueueMgr.addQueueEntry(autoPing);
+        }
+    }
+    
+    
+    public List getAutoPingsByWebsite(WebsiteData website) throws RollerException {
+        try {
+            Session session = ((HibernatePersistenceStrategy) strategy).getSession();
             Criteria criteria = session.createCriteria(AutoPingData.class);
             // Currently category restrictions are not yet implemented, so we return all auto ping configs for the
             // website.
             criteria.add(Expression.eq("website", website));
             return criteria.list();
-        }
-        catch (HibernateException e)
-        {
+        } catch (HibernateException e) {
             throw new RollerException(e);
         }
     }
-
-    public List getAutoPingsByTarget(PingTargetData pingTarget) throws RollerException
-    {
-        try
-        {
-            Session session = ((HibernateStrategy) persistenceStrategy).getSession();
+    
+    
+    public List getAutoPingsByTarget(PingTargetData pingTarget) throws RollerException {
+        try {
+            Session session = ((HibernatePersistenceStrategy) strategy).getSession();
             Criteria criteria = session.createCriteria(AutoPingData.class);
             // Currently category restrictions are not yet implemented, so we return all auto ping configs for the
             // website.
             criteria.add(Expression.eq("pingTarget", pingTarget));
             return criteria.list();
-        }
-        catch (HibernateException e)
-        {
+        } catch (HibernateException e) {
             throw new RollerException(e);
         }
     }
-
-    public void removeAllAutoPings() throws RollerException
-    {
-        try
-        {
-            Session session = ((HibernateStrategy) persistenceStrategy).getSession();
+    
+    
+    public List getApplicableAutoPings(WeblogEntryData changedWeblogEntry) throws RollerException {
+        try {
+            Session session = ((HibernatePersistenceStrategy) strategy).getSession();
             Criteria criteria = session.createCriteria(AutoPingData.class);
-            List allAutoPings = criteria.list();
-            removeAutoPings(allAutoPings);
-        }
-        catch (HibernateException e)
-        {
+            // Currently category restrictions are not yet implemented, so we return all auto ping configs for the
+            // website.
+            criteria.add(Expression.eq("website", changedWeblogEntry.getWebsite()));
+            return criteria.list();
+        } catch (HibernateException e) {
             throw new RollerException(e);
         }
     }
-
-    public List getCategoryRestrictions(AutoPingData autoPing) throws RollerException
-    {
+    
+    
+    public List getCategoryRestrictions(AutoPingData autoPing) throws RollerException {
         return Collections.EMPTY_LIST;
     }
-
-    public void setCategoryRestrictions(AutoPingData autoPing, Collection newCategories)
-    {
+    
+    
+    public void setCategoryRestrictions(AutoPingData autoPing, Collection newCategories) {
         // NOT YET IMPLEMENTED
         return;
     }
-
-    public List getApplicableAutoPings(WeblogEntryData changedWeblogEntry) throws RollerException
-    {
-        try
-        {
-            Session session = ((HibernateStrategy) persistenceStrategy).getSession();
-            Criteria criteria = session.createCriteria(AutoPingData.class);
-            // Currently category restrictions are not yet implemented, so we return all auto ping configs for the
-            // website.
-            criteria.add(Expression.eq("website", changedWeblogEntry.getWebsite()));
-            return criteria.list();
-        }
-        catch (HibernateException e)
-        {
-            throw new RollerException(e);
-        }
-    }
+    
+    
+    public void release() {}
+    
 }



Mime
View raw message