roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r526991 - in /roller/trunk: apps/planet/src/java/org/apache/roller/planet/business/hibernate/ apps/planet/src/java/org/apache/roller/planet/tasks/ apps/planet/src/java/org/apache/roller/planet/ui/core/ apps/planet/test/java/org/apache/rolle...
Date Tue, 10 Apr 2007 01:40:55 GMT
Author: snoopdave
Date: Mon Apr  9 18:40:53 2007
New Revision: 526991

URL: http://svn.apache.org/viewvc?view=rev&rev=526991
Log:
Roller-Planet tasks now working in Roller-Weblogger again

Added:
    roller/trunk/src/org/apache/roller/planet/tasks/RefreshRollerPlanetTask.java
Removed:
    roller/trunk/src/org/apache/roller/planet/business/hibernate/HibernateRollerPlanetImpl.java
    roller/trunk/src/org/apache/roller/planet/business/hibernate/HibernateRollerPlanetManagerImpl.java
    roller/trunk/src/org/apache/roller/planet/business/hibernate/package.html
Modified:
    roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetImpl.java
    roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetManagerImpl.java
    roller/trunk/apps/planet/src/java/org/apache/roller/planet/tasks/PlanetTask.java
    roller/trunk/apps/planet/src/java/org/apache/roller/planet/ui/core/PlanetContext.java
    roller/trunk/apps/planet/test/java/org/apache/roller/planet/business/RomeFeedFetcherTest.java
    roller/trunk/apps/planet/testdata/planet.properties
    roller/trunk/metadata/database/tmpls/3xx-to-400-migration.vm
    roller/trunk/metadata/database/tmpls/createdb.vm
    roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java
    roller/trunk/src/org/apache/roller/planet/tasks/SyncWebsitesTask.java
    roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetGroupsAction.java
    roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetSubscriptionsAction.java
    roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java
    roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java
    roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java
    roller/trunk/tests/org/apache/roller/business/PlanetManagerLocalTest.java
    roller/trunk/tools/roller-planet/roller-planet-business.jar
    roller/trunk/web/WEB-INF/classes/ApplicationResources.properties
    roller/trunk/web/WEB-INF/classes/planet.properties
    roller/trunk/web/WEB-INF/classes/roller.properties
    roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp

Modified: roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetImpl.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetImpl.java
(original)
+++ roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetImpl.java
Mon Apr  9 18:40:53 2007
@@ -75,10 +75,27 @@
                     PlanetConfig.getProperty("hibernate.configResource"),
                     PlanetConfig.getProperty("hibernate.dialect")); 
             }
+
         } catch(Throwable t) {
             // if this happens then we are screwed
             log.fatal("Error initializing Hibernate", t);
             throw new RollerException(t);
+        }
+        
+        try {
+            String feedFetchClass = PlanetConfig.getProperty("feedfetcher.classname");
+            if(feedFetchClass == null || feedFetchClass.trim().length() < 1) {
+                throw new RollerException("No FeedFetcher configured!!!");
+            }
+            
+            Class fetchClass = Class.forName(feedFetchClass);
+            FeedFetcher feedFetcher = (FeedFetcher) fetchClass.newInstance();
+            
+            // plug it in
+            setFeedFetcher(feedFetcher);
+            
+        } catch (Exception e) {
+            throw new RollerException("Error initializing feed fetcher", e);
         }
     }
     

Modified: roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetManagerImpl.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetManagerImpl.java
(original)
+++ roller/trunk/apps/planet/src/java/org/apache/roller/planet/business/hibernate/HibernatePlanetManagerImpl.java
Mon Apr  9 18:40:53 2007
@@ -341,10 +341,10 @@
             
             sb.append("where (");
             for (int i=0; i<groups.size(); i++) {
-                if (i > 0) sb.append(" and ");
+                if (i > 0) sb.append(" or ");
                 sb.append(" g=:group" + i);
             }
-            sb.append(")");
+            sb.append(") ");
             
             if (startDate != null) {
                 sb.append("and e.pubTime > :startDate ");

Modified: roller/trunk/apps/planet/src/java/org/apache/roller/planet/tasks/PlanetTask.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/src/java/org/apache/roller/planet/tasks/PlanetTask.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/apps/planet/src/java/org/apache/roller/planet/tasks/PlanetTask.java (original)
+++ roller/trunk/apps/planet/src/java/org/apache/roller/planet/tasks/PlanetTask.java Mon Apr
 9 18:40:53 2007
@@ -34,7 +34,6 @@
      */
     public void initialize() throws Exception {
         setupURLStrategy();
-        setupFeedFetcher();
     }
     
     
@@ -55,26 +54,5 @@
         
         // plug it in
         PlanetFactory.getPlanet().setURLStrategy(urlStrategy);
-    }
-    
-    
-    /**
-     * Lookup configured FeedFetcher from config and plug it in.
-     *
-     * If no FeedFetcher can be configured then we bail and spew errors.
-     */
-    protected void setupFeedFetcher() throws Exception {
-        
-        String feedFetchClass = PlanetConfig.getProperty("feedfetcher.classname");
-        if(feedFetchClass == null || feedFetchClass.trim().length() < 1) {
-            throw new Exception("No FeedFetcher configured!!!");
-        }
-        
-        Class fetchClass = Class.forName(feedFetchClass);
-        FeedFetcher feedFetcher = (FeedFetcher) fetchClass.newInstance();
-        
-        // plug it in
-        PlanetFactory.getPlanet().setFeedFetcher(feedFetcher);
-    }
-    
+    }        
 }

Modified: roller/trunk/apps/planet/src/java/org/apache/roller/planet/ui/core/PlanetContext.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/src/java/org/apache/roller/planet/ui/core/PlanetContext.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/apps/planet/src/java/org/apache/roller/planet/ui/core/PlanetContext.java
(original)
+++ roller/trunk/apps/planet/src/java/org/apache/roller/planet/ui/core/PlanetContext.java
Mon Apr  9 18:40:53 2007
@@ -84,7 +84,6 @@
             
             setupRuntimeProperties();
             setupURLStrategy();
-            setupFeedFetcher();
             
             planet.flush();
             planet.release();
@@ -129,28 +128,7 @@
         
         // plug it in
         PlanetFactory.getPlanet().setURLStrategy(urlStrategy);
-    }
-    
-    
-    /**
-     * Lookup configured FeedFetcher from config and plug it in.
-     *
-     * If no FeedFetcher can be configured then we bail and spew errors.
-     */
-    private void setupFeedFetcher() throws Exception {
-        
-        String feedFetchClass = PlanetConfig.getProperty("feedfetcher.classname");
-        if(feedFetchClass == null || feedFetchClass.trim().length() < 1) {
-            throw new Exception("No FeedFetcher configured!!!");
-        }
-        
-        Class fetchClass = Class.forName(feedFetchClass);
-        FeedFetcher feedFetcher = (FeedFetcher) fetchClass.newInstance();
-        
-        // plug it in
-        PlanetFactory.getPlanet().setFeedFetcher(feedFetcher);
-    }
-    
+    }        
     
     private void upgradeDatabaseIfNeeded() throws RollerException {
         

Modified: roller/trunk/apps/planet/test/java/org/apache/roller/planet/business/RomeFeedFetcherTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/test/java/org/apache/roller/planet/business/RomeFeedFetcherTest.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/apps/planet/test/java/org/apache/roller/planet/business/RomeFeedFetcherTest.java
(original)
+++ roller/trunk/apps/planet/test/java/org/apache/roller/planet/business/RomeFeedFetcherTest.java
Mon Apr  9 18:40:53 2007
@@ -51,9 +51,6 @@
         testSub.setFeedURL(feed_url);
         mgr.saveSubscription(testSub);
         PlanetFactory.getPlanet().flush();
-        
-        // use RomeFeedFetcher
-        PlanetFactory.getPlanet().setFeedFetcher(new RomeFeedFetcher());
     }
     
     

Modified: roller/trunk/apps/planet/testdata/planet.properties
URL: http://svn.apache.org/viewvc/roller/trunk/apps/planet/testdata/planet.properties?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/apps/planet/testdata/planet.properties (original)
+++ roller/trunk/apps/planet/testdata/planet.properties Mon Apr  9 18:40:53 2007
@@ -55,6 +55,9 @@
 # Number of Technorati queries allowed per day
 planet.aggregator.technorati.limit=500
 
+# choose a feed fetcher
+feedfetcher.classname=\
+org.apache.roller.planet.business.RomeFeedFetcher
 
 # The set of default Roller renderer factories.
 rendering.rollerRendererFactories=\

Modified: roller/trunk/metadata/database/tmpls/3xx-to-400-migration.vm
URL: http://svn.apache.org/viewvc/roller/trunk/metadata/database/tmpls/3xx-to-400-migration.vm?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/metadata/database/tmpls/3xx-to-400-migration.vm (original)
+++ roller/trunk/metadata/database/tmpls/3xx-to-400-migration.vm Mon Apr  9 18:40:53 2007
@@ -12,8 +12,8 @@
 );
 alter table rag_planet add constraint ragp_handle_uq unique ( handle );
 
-insert into rag_planet (id,title,handle) values ('default_planet','default_planet','default_planet');
-update rag_group set planet_id='default_planet';
+insert into rag_planet (id,title,handle) values ('zzz_default_planet_zzz','Default Planet','zzz_default_planet_zzz');
+update rag_group set planet_id='zzz_default_planet_zzz';
 
 -- new column to support account activation by email
 #addColumnNull("rolleruser" "activationcode" "varchar(48)")

Modified: roller/trunk/metadata/database/tmpls/createdb.vm
URL: http://svn.apache.org/viewvc/roller/trunk/metadata/database/tmpls/createdb.vm?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/metadata/database/tmpls/createdb.vm (original)
+++ roller/trunk/metadata/database/tmpls/createdb.vm Mon Apr  9 18:40:53 2007
@@ -422,6 +422,8 @@
 create index ea_entryid_idx on entryattribute( entryid );
 alter table entryattribute add constraint ea_name_uq unique ( entryid, name$!db.INDEXSIZE
);
 
+
+
 create table rag_group_subscription (
     group_id         varchar(48) not null,
     subscription_id  varchar(48) not null
@@ -484,6 +486,17 @@
     updated          $db.TIMESTAMP_SQL_TYPE    
 );
 create index rage_sid_idx on rag_entry(subscription_id); 
+
+create table rag_planet (
+    id              varchar(48) not null primary key,
+    handle          varchar(32) not null,
+    title           varchar(255) not null,
+    description     varchar(255)
+);
+alter table rag_planet add constraint ragp_handle_uq unique ( handle );
+
+insert into rag_planet (id,title,handle) values ('zzz_default_planet_zzz','Default Planet','zzz_default_planet_zzz');
+update rag_group set planet_id='zzz_default_planet_zzz';
 
 
 -- *****************************************************

Modified: roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java (original)
+++ roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java Mon Apr
 9 18:40:53 2007
@@ -135,9 +135,7 @@
                         WeblogEntryData rollerEntry =
                                 (WeblogEntryData)entryIter.next();
                         
-                        PlanetEntryData entry = new PlanetEntryData();
-                        entry.setSubscription(sub);
-                        
+                        PlanetEntryData entry = new PlanetEntryData();                  
     
                         String content = "";
                         if (!StringUtils.isEmpty(rollerEntry.getText())) {
                             content = rollerEntry.getText();
@@ -151,10 +149,8 @@
                         entry.setPubTime(rollerEntry.getPubTime());
                         entry.setText(content);
                         entry.setPermalink(rollerEntry.getPermalink());
-                        entry.setCategoriesString(rollerEntry.getCategory().getPath());
-        
-                        planetManager.saveEntry(entry);
-                        PlanetFactory.getPlanet().flush();
+                        entry.setCategoriesString(rollerEntry.getCategory().getPath()); 
                      
+                        
                         newEntries.add(entry);
                         
                     } catch (Exception e) {

Added: roller/trunk/src/org/apache/roller/planet/tasks/RefreshRollerPlanetTask.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/planet/tasks/RefreshRollerPlanetTask.java?view=auto&rev=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/planet/tasks/RefreshRollerPlanetTask.java (added)
+++ roller/trunk/src/org/apache/roller/planet/tasks/RefreshRollerPlanetTask.java Mon Apr 
9 18:40:53 2007
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+package org.apache.roller.planet.tasks;
+
+import java.util.Date;
+import java.util.Properties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.roller.RollerException;
+import org.apache.roller.business.runnable.RollerTaskWithLeasing;
+import org.apache.roller.planet.config.PlanetConfig;
+import org.apache.roller.planet.business.Planet;
+import org.apache.roller.planet.business.PlanetFactory;
+
+
+/**
+ * Updates Planet aggregator's database of feed entries.
+ * <pre>
+ * - Designed to be run outside of Roller via the TaskRunner class
+ * - Calls Planet business layer to refresh entries
+ * </pre>
+ */
+public class RefreshRollerPlanetTask extends RollerTaskWithLeasing {
+    
+    private static Log log = LogFactory.getLog(RefreshRollerPlanetTask.class);
+    
+    // a unique id for this specific task instance
+    // this is meant to be unique for each client in a clustered environment
+    private String clientId = "unspecifiedClientId";
+    
+    // a String description of when to start this task
+    private String startTimeDesc = "immediate";
+    
+    // interval at which the task is run, default is 60 minutes
+    private int interval = 60;
+    
+    // lease time given to task, default is 10 minutes
+    private int leaseTime = 10;
+    
+    
+    public String getName() {
+        return "RefreshPlanetTask";
+    }
+    
+    public String getClientId() {
+        return clientId;
+    }
+    
+    public Date getStartTime(Date currentTime) {
+        return getAdjustedTime(currentTime, startTimeDesc);
+    }
+    
+    public int getInterval() {
+        return this.interval;
+    }
+    
+    public int getLeaseTime() {
+        return this.leaseTime;
+    }
+    
+    public void init() throws RollerException {
+        
+        // get relevant props
+        Properties props = this.getTaskProperties();
+        
+        // extract clientId
+        String client = props.getProperty("clientId");
+        if(client != null) {
+            this.clientId = client;
+        }
+        
+        // extract start time
+        String startTimeStr = props.getProperty("startTime");
+        if(startTimeStr != null) {
+            this.startTimeDesc = startTimeStr;
+        }
+        
+        // extract interval
+        String intervalStr = props.getProperty("interval");
+        if(intervalStr != null) {
+            try {
+                this.interval = Integer.parseInt(intervalStr);
+            } catch (NumberFormatException ex) {
+                log.warn("Invalid interval: "+intervalStr);
+            }
+        }
+        
+        // extract lease time
+        String leaseTimeStr = props.getProperty("leaseTime");
+        if(leaseTimeStr != null) {
+            try {
+                this.leaseTime = Integer.parseInt(leaseTimeStr);
+            } catch (NumberFormatException ex) {
+                log.warn("Invalid leaseTime: "+leaseTimeStr);
+            }
+        }
+    }
+    
+    public void runTask() {
+        try {            
+            // Update all feeds in planet
+            log.info("Refreshing Planet entries");
+            Planet planet = PlanetFactory.getPlanet();
+            planet.getFeedFetcher().refreshEntries(
+                PlanetConfig.getProperty("cache.dir"));                        
+            planet.flush();
+            planet.release();
+            
+        } catch (RollerException e) {
+            log.error("ERROR refreshing planet", e);
+        }
+    }
+        
+    public static void main(String[] args) throws Exception{
+        RefreshRollerPlanetTask task = new RefreshRollerPlanetTask();
+        task.init();
+        task.run();
+    }
+    
+}

Modified: roller/trunk/src/org/apache/roller/planet/tasks/SyncWebsitesTask.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/planet/tasks/SyncWebsitesTask.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/planet/tasks/SyncWebsitesTask.java (original)
+++ roller/trunk/src/org/apache/roller/planet/tasks/SyncWebsitesTask.java Mon Apr  9 18:40:53
2007
@@ -140,10 +140,11 @@
             UserManager userManager = RollerFactory.getRoller().getUserManager();
             
             // first, make sure there is an "all" planet group
-            PlanetData planetObject = planet.getPlanet("all");
+            PlanetData planetObject = planet.getPlanet("zzz_default_planet_zzz");
             PlanetGroupData group = planet.getGroup(planetObject, "all");
             if(group == null) {
                 group = new PlanetGroupData();
+                group.setPlanet(planetObject);
                 group.setHandle("all");
                 group.setTitle("all");
                 planet.saveGroup(group);

Modified: roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetGroupsAction.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetGroupsAction.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetGroupsAction.java
(original)
+++ roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetGroupsAction.java
Mon Apr  9 18:40:53 2007
@@ -76,7 +76,7 @@
                 if (request.getParameter("groupHandle") != null)
                 {
                     String handle = request.getParameter("groupHandle");
-                    PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+                    PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
                     PlanetGroupData group = pmgr.getGroup(defaultPlanet, handle);
                     form.copyFrom(group, request.getLocale());
                 }
@@ -144,7 +144,7 @@
                 PlanetGroupForm form = (PlanetGroupForm)actionForm;
                 if (form.getHandle() != null)
                 {
-                    PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+                    PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
                     PlanetGroupData group = pmgr.getGroup(defaultPlanet, form.getHandle());
                     pmgr.deleteGroup(group);
                     PlanetFactory.getPlanet().flush();
@@ -189,7 +189,7 @@
             {
                 PlanetGroupForm form = (PlanetGroupForm)actionForm;
                 PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();
-                PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+                PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
                 ActionErrors errors = validate(pmgr, form);
                 if (errors.isEmpty())
                 {
@@ -278,7 +278,7 @@
             super("planetGroups.pagetitle", request, response, mapping);
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             PlanetManager pmgr = PlanetFactory.getPlanet().getPlanetManager();          
 
-            PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+            PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
             PlanetGroupData externalGroup = pmgr.getGroup(defaultPlanet, "external");
             Iterator allgroups = defaultPlanet.getGroups().iterator();
             while (allgroups.hasNext()) 

Modified: roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetSubscriptionsAction.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetSubscriptionsAction.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetSubscriptionsAction.java
(original)
+++ roller/trunk/src/org/apache/roller/planet/ui/admin/struts/actions/PlanetSubscriptionsAction.java
Mon Apr  9 18:40:53 2007
@@ -87,7 +87,7 @@
                 groupHandle = (groupHandle == null) ? form.getGroupHandle() : groupHandle;
                 groupHandle = (groupHandle == null) ? "external" : groupHandle;
                 
-                PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+                PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
                 PlanetGroupData targetGroup = pmgr.getGroup(defaultPlanet, groupHandle);
                 form.setGroupHandle(groupHandle);
                 request.setAttribute("model",
@@ -119,7 +119,7 @@
                 groupHandle = (groupHandle == null) ? form.getGroupHandle() : groupHandle;
                 groupHandle = (groupHandle == null) ? "external" : groupHandle;
                 
-                PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+                PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
                 PlanetGroupData targetGroup = pmgr.getGroup(defaultPlanet, groupHandle);
                 form.setGroupHandle(groupHandle);
                 request.setAttribute("model",
@@ -153,7 +153,7 @@
                     groupHandle = (groupHandle == null) ? form.getGroupHandle() : groupHandle;
                     groupHandle = (groupHandle == null) ? "external" : groupHandle;
                     
-                    PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+                    PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
                     PlanetGroupData targetGroup = pmgr.getGroup(defaultPlanet, groupHandle);
                     
                     targetGroup.getSubscriptions().remove(sub);
@@ -198,7 +198,7 @@
             groupHandle = (groupHandle == null) ? form.getGroupHandle() : groupHandle;
             groupHandle = (groupHandle == null) ? "external" : groupHandle;
             
-            PlanetData defaultPlanet = pmgr.getPlanet("default_planet");
+            PlanetData defaultPlanet = pmgr.getPlanet("zzz_default_planet_zzz");
             PlanetGroupData targetGroup = pmgr.getGroup(defaultPlanet, groupHandle);
             
             if (RollerSession.getRollerSession(request).isGlobalAdminUser()) {

Modified: roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java (original)
+++ roller/trunk/src/org/apache/roller/ui/rendering/model/PlanetModel.java Mon Apr  9 18:40:53
2007
@@ -166,7 +166,7 @@
         List list = new ArrayList();
         try {
             PlanetManager planetManager = PlanetFactory.getPlanet().getPlanetManager();
-            PlanetData defaultPlanet = planetManager.getPlanet("default");
+            PlanetData defaultPlanet = planetManager.getPlanet("zzz_default_planet_zzz");
             PlanetGroupData planetGroup = planetManager.getGroup(defaultPlanet, groupHandle);
             List subs = planetManager.getTopSubscriptions(planetGroup, 0, length);
             for (Iterator it = subs.iterator(); it.hasNext();) {

Modified: roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java (original)
+++ roller/trunk/src/org/apache/roller/ui/rendering/pagers/PlanetEntriesPager.java Mon Apr
 9 18:40:53 2007
@@ -99,11 +99,11 @@
                     PlanetSubscriptionData sub = planetManager.getSubscription(feedURL);
                     rawEntries = planetManager.getEntries(sub, offset, length+1);
                 } else if (groupHandle != null) {
-                    PlanetData planet = planetManager.getPlanet("default");
+                    PlanetData planet = planetManager.getPlanet("zzz_default_planet_zzz");
                     PlanetGroupData group = planetManager.getGroup(planet, groupHandle);
                     rawEntries = planetManager.getEntries(Collections.singletonList(group),
startDate, null, offset, length+1);
                 } else {
-                    PlanetData planet = planetManager.getPlanet("default");
+                    PlanetData planet = planetManager.getPlanet("zzz_default_planet_zzz");
                     PlanetGroupData groupAll = planetManager.getGroup(planet, "all");
                     PlanetGroupData groupDefault = planetManager.getGroup(planet, "default");
                     List groups = new ArrayList();

Modified: roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java (original)
+++ roller/trunk/src/org/apache/roller/ui/rendering/servlets/PlanetFeedServlet.java Mon Apr
 9 18:40:53 2007
@@ -131,7 +131,7 @@
         try {
             // populate the rendering model
             if (request.getParameter("group") != null) {
-                PlanetData planetObject = planet.getPlanet("default");
+                PlanetData planetObject = planet.getPlanet("zzz_default_planet_zzz");
                 model.put("group", planet.getGroup(planetObject, request.getParameter("group")));
             }
             model.put("planet", planet);

Modified: roller/trunk/tests/org/apache/roller/business/PlanetManagerLocalTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/tests/org/apache/roller/business/PlanetManagerLocalTest.java?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/tests/org/apache/roller/business/PlanetManagerLocalTest.java (original)
+++ roller/trunk/tests/org/apache/roller/business/PlanetManagerLocalTest.java Mon Apr  9 18:40:53
2007
@@ -32,7 +32,7 @@
 import org.apache.roller.pojos.UserData;
 import org.apache.roller.pojos.WeblogEntryData;
 import org.apache.roller.pojos.WebsiteData;
-import org.apache.roller.planet.tasks.RefreshPlanetTask;
+import org.apache.roller.planet.tasks.RefreshRollerPlanetTask;
 import org.apache.roller.planet.tasks.SyncWebsitesTask;
 
 
@@ -125,7 +125,7 @@
             syncTask.init();
             syncTask.run();           
             
-            RefreshPlanetTask refreshTask = new RefreshPlanetTask();
+            RefreshRollerPlanetTask refreshTask = new RefreshRollerPlanetTask();
             refreshTask.run();
             
             PlanetData planetObject = planet.getPlanet("default");

Modified: roller/trunk/tools/roller-planet/roller-planet-business.jar
URL: http://svn.apache.org/viewvc/roller/trunk/tools/roller-planet/roller-planet-business.jar?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
Binary files - no diff available.

Modified: roller/trunk/web/WEB-INF/classes/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/classes/ApplicationResources.properties?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/web/WEB-INF/classes/ApplicationResources.properties (original)
+++ roller/trunk/web/WEB-INF/classes/ApplicationResources.properties Mon Apr  9 18:40:53 2007
@@ -373,6 +373,7 @@
 
 configForm.saved=Configuration settings saved
 
+
 # ---------------------------------------------------------------- Create weblog
 
 createWebsite.title=Create Weblog
@@ -1054,18 +1055,20 @@
 planet.title.unconfigured=Planet Aggregator (unconfigured)
 planet.description.unconfigured=Planet aggregator is enabled but has not yet been configured.
 
-planetConfig.pageTitle=Planet Configuration
+planetConfig.title=Planet Configuration
 planetConfig.subtitle=Configure Roller's built-in newsfeed aggregator.
 planetConfig.prompt=Set the title, description, email address and site URL \
 to be included in newsfeeds produced by the aggregator. You can also setup a \
 proxy if one is required required by your network.
-planetConfig.description=Description
-planetConfig.title=Planet Configuration
-planetConfig.adminEmail=Admin E-mail
-planetConfig.cacheDir=Cache Directory
-planetConfig.siteUrl=Site URL
-planetConfig.proxyHost=Proxy Host URL
-planetConfig.proxyPort=Proxy Host Port
+
+ConfigForm.siteSettings=Planet Settings
+ConfigForm.title=Planet title	
+ConfigForm.description=Planet description		
+ConfigForm.adminName=Name of Planet administrator 		
+ConfigForm.adminEmail=Email of Planet administrator
+ConfigForm.absoluteUrl=Absolute URL to Planet page
+ConfigForm.proxyHost=Proxy host for feed fetcher
+ConfigForm.proxyPort=Proxy port for feed fetcher
 
 planetConfig.title.control=Experimental Planet Control
 planetConfig.prompt.control=Launch background tasks (for testing purposes only)
@@ -1084,13 +1087,7 @@
 planetConfig.error.cacheDirNotWritable=Cache directory not writable
 planetConfig.error.badProxyPort=Proxy port is invalid
 
-planetConfig.tip.title=Title to be used in newsfeed header
-planetConfig.tip.description=Description to be used in newsfeed header
-planetConfig.tip.adminEmail=E-mail address to be used in newsfeed header
-planetConfig.tip.cacheDir=Directory where newsfeed data will be cached
-planetConfig.tip.siteUrl=URL to be used in newsfeed header
-planetConfig.tip.proxyHost=URL of proxy host (if required)
-planetConfig.tip.proxyPort=Port of proxy host (if required)
+
 
 # ----------------------------------------------------- PlanetSubscriptions.jsp
 

Modified: roller/trunk/web/WEB-INF/classes/planet.properties
URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/classes/planet.properties?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/web/WEB-INF/classes/planet.properties (original)
+++ roller/trunk/web/WEB-INF/classes/planet.properties Mon Apr  9 18:40:53 2007
@@ -42,14 +42,17 @@
 
 persistence.planet.classname=org.apache.roller.planet.business.hibernate.HibernatePlanetImpl
 
-# Absolute URL to site
-site.absoluteurl=http://localhost:8080/planet
+# You MUST override and set these three properties correctly:
+cache.dir=/var/planet/cache
+output.dir=/usr/local/planet/webapp
+template.dir=/usr/local/planet/webapp/WEB-INF/templates
 
-# Planet cache must exist and must be writable by Roller process
-planet.aggregator.cache.dir=/var/roller/planetcache
-
-# Number of queries allowed per day
+# Number of Technorati queries allowed per day
 planet.aggregator.technorati.limit=500
+
+# choose a feed fetcher
+feedfetcher.classname=\
+org.apache.roller.planet.business.RollerRomeFeedFetcher
 
 # How the hibernate config is built
 hibernate.dialect=org.hibernate.dialect.MySQLDialect

Modified: roller/trunk/web/WEB-INF/classes/roller.properties
URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/classes/roller.properties?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/web/WEB-INF/classes/roller.properties (original)
+++ roller/trunk/web/WEB-INF/classes/roller.properties Mon Apr  9 18:40:53 2007
@@ -310,10 +310,10 @@
 tasks.SyncWebsitesTask.leaseTime=30
 
 # Refresh entries for planet feeds
-tasks.RefreshEntriesTask.class=org.apache.roller.planet.tasks.RefreshEntriesTask
-tasks.RefreshEntriesTask.startTime=startOfHour
-tasks.RefreshEntriesTask.interval=60
-tasks.RefreshEntriesTask.leaseTime=30
+tasks.RefreshRollerPlanetTask.class=org.apache.roller.planet.tasks.RefreshRollerPlanetTask
+tasks.RefreshRollerPlanetTask.startTime=startOfHour
+tasks.RefreshRollerPlanetTask.interval=60
+tasks.RefreshRollerPlanetTask.leaseTime=30
 
 # Technorati rankings for planet feeds
 tasks.TechnoratiRankingsTask.class=org.apache.roller.planet.tasks.TechnoratiRankingsTask

Modified: roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp?view=diff&rev=526991&r1=526990&r2=526991
==============================================================================
--- roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp (original)
+++ roller/trunk/web/WEB-INF/jsps/admin/PlanetConfig.jsp Mon Apr  9 18:40:53 2007
@@ -30,7 +30,7 @@
 <roller:StatusMessage/>
 
 <p class="subtitle"><fmt:message key="planetConfig.subtitle" /></a>
-<p><fmt:message key="configForm.prompt" /></a>
+<p><fmt:message key="planetConfig.prompt" /></a>
 
 <form action="planetConfig.do" method="post">
 



Mime
View raw message