roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r576585 [3/3] - in /roller/branches/roller_4.1_dev: apps/planet/ apps/planet/nbproject/ apps/planet/src/java/org/apache/roller/planet/business/jpa/ apps/planet/src/java/org/apache/roller/planet/pojos/ apps/weblogger/ apps/weblogger/docs/use...
Date Mon, 17 Sep 2007 21:05:29 GMT
Modified: roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/src/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
Mon Sep 17 14:05:21 2007
@@ -178,19 +178,18 @@
         } catch (WebloggerException re) {
             throw new AtomException("Getting user's weblogs", re);
         }
-        String accept = null;
-        try {
-            accept = getAcceptedContentTypeRange();
+        List uploadAccepts = new ArrayList();
+        try {           
+            uploadAccepts = getAcceptedContentTypeRange();
         } catch (WebloggerException re) {
             throw new AtomException("Getting site's accept range", re);
         }
         if (perms != null) {
             for (Iterator iter=perms.iterator(); iter.hasNext();) {
                 WeblogPermission perm = (WeblogPermission)iter.next();
-                Workspace workspace = null;
                 Weblog weblog = null;
+                Workspace workspace = null;
                 try {  
-                    String handle = perm.getWeblog().getHandle();
 
                     // Create workspace to represent weblog
                     workspace = new Workspace(
@@ -199,8 +198,8 @@
 
                     // Create collection for entries within that workspace
                     Collection entryCol = new Collection("Weblog Entries", "text", 
-                        atomURL+"/"+handle+"/entries");
-                    entryCol.setAccept("application/atom+xml;type=entry");
+                        atomURL+"/"+weblog.getHandle()+"/entries");
+                    entryCol.addAccept("application/atom+xml;type=entry");
                     
                     // Add fixed categories using scheme that points to 
                     // weblog because categories are weblog specific
@@ -225,17 +224,17 @@
                     entryCol.addCategories(tags);
                     
                     workspace.addCollection(entryCol);
-
-                    // Add media collection for upload dir
-                    Collection uploadCol = new Collection("Media Files", "text", 
-                        atomURL+"/"+handle+"/resources/");
-                    uploadCol.setAccept(accept);
-                    workspace.addCollection(uploadCol);
                     
                 } catch (Exception e) {
                     throw new AtomException("Fetching weblog categories");
                 }                               
 
+                // Add media collection for upload dir
+                Collection uploadCol = new Collection("Media Files", "text", 
+                    atomURL+"/"+weblog.getHandle()+"/resources/");
+                uploadCol.setAccepts(uploadAccepts);
+                workspace.addCollection(uploadCol);
+
                 // And add one media collection for each of weblog's upload sub-directories
                 ThemeResource[] dirs;
                 try {
@@ -244,7 +243,7 @@
                         Collection uploadSubCol = new Collection(
                             "Media Files: " + dirs[i].getPath(), "text",
                             atomURL+"/"+weblog.getHandle()+"/resources/" + dirs[i].getPath());
-                        uploadSubCol.setAccept(accept);
+                        uploadSubCol.setAccepts(uploadAccepts);
                         workspace.addCollection(uploadSubCol);
                     }
                 } catch (FilePathException fpe) {
@@ -263,20 +262,17 @@
      * Build accept range by taking things that appear to be content-type rules 
      * from site's file-upload allowed extensions.
      */
-    private String getAcceptedContentTypeRange() throws WebloggerException {
-        StringBuffer sb = new StringBuffer();
+    private List getAcceptedContentTypeRange() throws WebloggerException {
+        List accepts = new ArrayList();
         Weblogger roller = WebloggerFactory.getWeblogger();
         Map config = roller.getPropertiesManager().getProperties();        
         String allows = ((RuntimeConfigProperty)config.get("uploads.types.allowed")).getValue();
         String[] rules = StringUtils.split(StringUtils.deleteWhitespace(allows), ",");
         for (int i=0; i<rules.length; i++) {
             if (rules[i].indexOf("/") == -1) continue;
-            if (sb.length() != 0) {
-                sb.append(",");
-            }
-            sb.append(rules[i]);
+            accepts.add(rules[i]);
         }
-        return sb.toString();              
+        return accepts;             
     }   
     
     //----------------------------------------------------------------- collections
@@ -631,6 +627,7 @@
                     
                     WeblogEntryManager mgr = roller.getWeblogEntryManager();
                     copyToRollerEntry(entry, rollerEntry);
+                    rollerEntry.setUpdateTime(new Timestamp(new Date().getTime()));
                     mgr.saveWeblogEntry(rollerEntry);
                     roller.flush();
                     
@@ -1195,7 +1192,7 @@
     /**
      * Copy fields from ROME entry to Weblogger entry.
      */
-    private void copyToRollerEntry(Entry entry,WeblogEntry rollerEntry) throws WebloggerException
{
+    private void copyToRollerEntry(Entry entry, WeblogEntry rollerEntry) throws WebloggerException
{
         
         Timestamp current = new Timestamp(System.currentTimeMillis());
         Timestamp pubTime = current;

Modified: roller/branches/roller_4.1_dev/apps/weblogger/src/sql/310-to-400-migration.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/src/sql/310-to-400-migration.vm?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/src/sql/310-to-400-migration.vm (original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/src/sql/310-to-400-migration.vm Mon Sep
17 14:05:21 2007
@@ -18,11 +18,20 @@
 alter table rag_planet add constraint ragp_handle_uq unique ( handle );
 
 -- ensure that every weblog entry has a valid locale
+
+#if ($db.DBTYPE != "POSTGRESQL")
 update weblogentry e set 
    e.pubtime=pubtime, 
    e.updatetime=updatetime, 
    e.locale=(select locale from website where website.id=e.websiteid) 
    where e.locale is null or length(e.locale)=0;
+#else
+update weblogentry set 
+   pubtime=pubtime, 
+   updatetime=updatetime, 
+   locale=(select locale from website where website.id=websiteid) 
+   where locale is null or length(locale)=0;
+#end
 
 -- add new planet_id column to planet group table
 #addColumnNull("rag_group" "planet_id" "varchar(48)")
@@ -30,15 +39,9 @@
 -- upgrade old planet users to work with the new Roller Planet code
 -- all groups must have a planet now, so provide a default planet and
 -- put all existing groups in the new default planet
-insert into rag_planet (id,title,handle) values ('zzz_default_planet_zzz','Default Planet','zzz_default_planet_zzz');
+insert into rag_planet (id,title,handle) values ('zzz_default_planet_zzz','Default Planet','default');
 update rag_group set planet_id='zzz_default_planet_zzz';
 
--- remove old id column of group subscription table
-alter table rag_group_subscription drop column id;
-
--- drop old planet config table
-drop table if exists rag_config;
-
 
 -- upgrade the way hierarchical objects are modeled
 
@@ -75,16 +78,18 @@
 create index co_status_idx on roller_comment(status);
 
 -- update existing data to use new status column
-update roller_comment set status = 'APPROVED', posttime=posttime where approved=1;
-update roller_comment set status = 'PENDING', posttime=posttime where pending=1;
-update roller_comment set status = 'SPAM', posttime=posttime where spam=1;
-update roller_comment set status = 'DISAPPROVED', posttime=posttime where approved=0 and
spam=0 and pending=0;
+update roller_comment set status = 'APPROVED', posttime=posttime where approved=$db.BOOLEAN_TRUE;
+update roller_comment set status = 'PENDING', posttime=posttime where pending=$db.BOOLEAN_TRUE;
+update roller_comment set status = 'SPAM', posttime=posttime where spam=$db.BOOLEAN_TRUE;
+
+update roller_comment set status = 'DISAPPROVED', posttime=posttime 
+   where approved=$db.BOOLEAN_FALSE and spam=$db.BOOLEAN_FALSE and pending=$db.BOOLEAN_FALSE;
 
 
 -- better support for doing scheduled entries
 
 -- add new status option 'SCHEDULED' for future published entries
-update weblogentry set status = 'SCHEDULED', pubtime=pubtime, updatetime=updatetime where
pubtime > now();
+update weblogentry set status = 'SCHEDULED', pubtime=pubtime, updatetime=updatetime where
pubtime > current_timestamp;
 
 -- add new client column to roller_tasklock table
 #addColumnNull("roller_tasklock" "client" "varchar(255)")
@@ -113,7 +118,7 @@
 #addColumnNull("website" "customstylesheet" "varchar(128)")
 
 -- fix blogs which have unchecked showalllangs but did not check enablemultilang
-update website set enablemultilang = 1 where showalllangs = 0;
+update website set enablemultilang=$db.BOOLEAN_TRUE where showalllangs=$db.BOOLEAN_FALSE;
 
 
 -- some missing foreign key constraints
@@ -130,42 +135,47 @@
 create index we_combo2_idx on weblogentry(websiteid, pubtime, status);
 create index co_combo1_idx on roller_comment(status, posttime);
 
+
 -- remove old indexes that are no longer of value
-drop index we_pubtime_idx on weblogentry;
-drop index we_pubentry_idx on weblogentry;
--- drop index co_pending_idx on roller_comment;
--- drop index co_approved_idx on roller_comment;
+#dropIndex('we_pubentry_idx' 'weblogentry')
+
 
 -- fix wacky indexs which ended up with a size constraint
-drop index rage_sid_idx on rag_entry;
+#dropIndex('rage_sid_idx' 'rag_entry')
 create index rage_sid_idx on rag_entry(subscription_id);
-drop index raggs_gid_idx on rag_group_subscription;
+
+#dropIndex('raggs_gid_idx' 'rag_group_subscription')
 create index raggs_gid_idx on rag_group_subscription(group_id);
-drop index raggs_sid_idx on rag_group_subscription;
-create index raggs_sid_idx on rag_group_subscription(subscription_id);
 
+#dropIndex('raggs_sid_idx' 'rag_group_subscription')
+create index raggs_sid_idx on rag_group_subscription(subscription_id);
 
--- remove old usercookie table which has been unused since 0.x?
-drop table if exists usercookie;
 
--- remove old assoc tables which were EOLed in 3.2
-drop table if exists folderassoc;
-drop table if exists weblogcategoryassoc;
+-- remove no-longer-used needed tables
 
 -- remove old rollerconfig table which has been deprecated since 1.2
 -- NOTE: since this breaks the pre-1.2 -> 4.0+ direct upgrade path then
---       maybe we want to attempt to fix that by doing that upgrade via sql?
-drop table if exists rollerconfig;
+-- maybe we want to attempt to fix that by doing that upgrade via sql?
+#dropTableIfExists('rollerconfig')
+
+--- remove old id column of group subscription table
+#dropColumn('rag_group_subscription' 'id')
 
 -- remove old approved, spam, pending columns from comment table
-alter table roller_comment drop column approved;
-alter table roller_comment drop column spam;
-alter table roller_comment drop column pending;
-
--- remove bastard columns from various tables
--- NOTE: these are only here as options, we don't *have* to do them
---alter table website drop column userid;
---alter table website drop column weblogdayid;
---alter table weblogentry drop column publishentry;
---alter table weblogentry drop column link;
+#dropColumn('roller_comment' 'approved')
+#dropColumn('roller_comment' 'spam')
+#dropColumn('roller_comment' 'pending')
+
+-- remove bastard columns and indexes (optional)
+-- #dropIndex('index_we_pubtime_idx' 'weblogentry')
+-- #dropIndex('co_pending_idx' 'roller_comment')
+-- #dropIndex('co_approved_idx' 'roller_comment')
+-- #dropColumn('website' 'userid')
+-- #dropColumn('website' 'weblogdayid')
+-- #dropColumn('weblogentry' 'publishentry')
+-- #dropColumn('weblogentry' 'link')
+-- #dropTableIfExists('usercookie')
+-- #dropTableIfExists('rag_config')
+-- #dropTableIfExists('folderassoc')
+-- #dropTableIfExists('weblogcategoryassoc')
 

Modified: roller/branches/roller_4.1_dev/apps/weblogger/src/sql/createdb.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/src/sql/createdb.vm?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/src/sql/createdb.vm (original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/src/sql/createdb.vm Mon Sep 17 14:05:21
2007
@@ -94,7 +94,7 @@
     templatelang    varchar(20) not null,
     decorator       varchar(255) default null,
     outputtype      varchar(48) default null,
-    action          varchar(16) not null default 'custom'
+    #columnNotNullWithDefault('action' 'varchar(16)' 'custom')
 );
 create index wp_name_idx on webpage( name$!db.INDEXSIZE );
 create index wp_link_idx on webpage( link$!db.INDEXSIZE );
@@ -136,7 +136,6 @@
     customstylesheet  varchar(128),
     about             varchar(255),
     icon              varchar(255)
-
 );
 create index ws_userid_idx    on website(userid);
 create index ws_isenabled_idx on website(isenabled);
@@ -418,7 +417,9 @@
     client          varchar(255)
 );
 alter table roller_tasklock add constraint rtl_name_uq unique ( name$!db.INDEXSIZE );
+#if($db.DBTYPE != "ORACLE")
 create index rtl_taskname_idx on roller_tasklock( name );
+#end
 
 create table roller_hitcounts (
     id              varchar(48) not null primary key,

Modified: roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/AappTest.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/AappTest.java?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/AappTest.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/AappTest.java
Mon Sep 17 14:05:21 2007
@@ -30,9 +30,9 @@
 
 public abstract class AappTest extends TestCase {
     private static final Date sampleDate = new Date();
-    private static final String DEFAULT_ENDPOINT_URL = "http://localhost:8080/roller/roller-services/aapp";
-    private static final String DEFAULT_USER = "jtb";
-    private static final String DEFAULT_PASSWORD = "iplanet";
+    private static final String DEFAULT_ENDPOINT_URL = "http://localhost:8080/roller/roller-services/rap";
+    private static final String DEFAULT_USER = "admin";
+    private static final String DEFAULT_PASSWORD = "admin";
         
     protected static String getEndpointUrl() {
         String endpoint = System.getProperty("aapp.endpoint");
@@ -68,6 +68,7 @@
         UserEntry ue = new UserEntry("foo", getEndpointUrl());
         ue.setEmailAddress("foo@bar.org");
         ue.setFullName("Foo Bar");
+        ue.setScreenName("foobar");
         ue.setLocale(Locale.getDefault());
         ue.setTimezone(TimeZone.getDefault());
         ue.setPassword("foo");
@@ -86,6 +87,7 @@
         UserEntry ueUpdate = new UserEntry(ue.getName(), getEndpointUrl());
         ueUpdate.setEmailAddress("billy@bob.org");
         ueUpdate.setFullName("Billy Bob");
+        ueUpdate.setScreenName("billybob");
         ueUpdate.setLocale(new Locale("ms", "MY"));
         ueUpdate.setTimezone(TimeZone.getTimeZone("Asia/Kuala_Lumpur"));
         ueUpdate.setPassword("billy");

Modified: roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/MemberHandlerTest.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/MemberHandlerTest.java?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/MemberHandlerTest.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/MemberHandlerTest.java
Mon Sep 17 14:05:21 2007
@@ -28,6 +28,11 @@
             createSampleUser();
             createSampleWeblog();
             
+            // delete user-weblog permission
+            MemberEntrySet mesDelete = deleteSampleMember(true);
+            assertNotNull(mesDelete);
+            assertEquals(0, mesDelete.getEntries().length);            
+            
             //create
             MemberEntrySet mesCreate = createSampleMember();
             assertNotNull(mesCreate);
@@ -50,11 +55,12 @@
             assertEquals(mesUpdate, updateSampleMemberEntrySet(getSampleMemberEntrySet()));
             
             //delete
-            MemberEntrySet mesDelete = deleteSampleMember(true);
+            mesDelete = deleteSampleMember(true);
             assertNotNull(mesDelete);
             assertNotNull(mesCreate.getEntries());
             assertEquals(mesCreate.getEntries().length, 1);
-            assertEquals(mesDelete, mesUpdate);
+            assertEquals(0, mesDelete.getEntries().length);
+            
         } catch (IOException ioe) {
             ioe.printStackTrace();            
             fail(ioe.getMessage());

Modified: roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/UserHandlerTest.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/UserHandlerTest.java?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/UserHandlerTest.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/UserHandlerTest.java
Mon Sep 17 14:05:21 2007
@@ -56,7 +56,8 @@
             assertNotNull(uesDelete);
             assertNotNull(uesCreate.getEntries());
             assertEquals(uesCreate.getEntries().length, 1);
-            assertEquals(uesDelete, uesUpdate);
+            assertEquals(0, uesDelete.getEntries().length);
+            
         } catch (IOException ioe) {
             ioe.printStackTrace();
             fail(ioe.getMessage());
@@ -82,6 +83,7 @@
             ues = fetchSampleUser();
             ue = (UserEntry)ues.getEntries()[0];
             assertEquals(Boolean.FALSE, ue.getEnabled());
+            
         } catch (IOException ioe) {
             fail(ioe.getMessage());
             ioe.printStackTrace();

Modified: roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/WeblogHandlerTest.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/WeblogHandlerTest.java?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/WeblogHandlerTest.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/WeblogHandlerTest.java
Mon Sep 17 14:05:21 2007
@@ -54,7 +54,8 @@
             assertNotNull(wesDelete);
             assertNotNull(wesCreate.getEntries());
             assertEquals(wesCreate.getEntries().length, 1);
-            assertEquals(wesDelete, wesUpdate);
+            assertEquals(0, wesDelete.getEntries().length);
+            
         } catch (IOException ioe) {
             fail(ioe.getMessage());
             ioe.printStackTrace();

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/ApplicationResources.properties
Mon Sep 17 14:05:21 2007
@@ -88,6 +88,7 @@
 bookmarksForm.delete.confirm=Delete selected bookmarks?
 bookmarksForm.description=Description
 bookmarksForm.folder=Bookmark Folder
+bookmarksForm.priority=Priority
 bookmarksForm.edit=Edit
 bookmarksForm.edit.tip=Click to edit this folder or bookmark
 bookmarksForm.move=Move selected
@@ -1200,6 +1201,9 @@
 ConfigForm.proxyHost=Proxy host for feed fetcher
 ConfigForm.proxyPort=Proxy port for feed fetcher
 
+ConfigForm.message.saveSucceeded=Saved Planet configuration
+ConfigForm.error.saveFailed=Error saving Planet configuration
+
 planetConfig.title.control=Experimental Planet Control
 planetConfig.prompt.control=Launch background tasks (for testing purposes only)
 
@@ -1965,8 +1969,8 @@
 # --- Weblog API
 
 websiteSettings.bloggerApi=Weblog Client API
-websiteSettings.enableBloggerApi=Enable Blogger and MetaWeblog APIs for your weblog?
-websiteSettings.bloggerApiCategory=Category for posts received via Blogger API 
+websiteSettings.enableBloggerApi=Enable weblog client support?
+websiteSettings.bloggerApiCategory=Category for posts received via clients
 
 # --- Formatting
 

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/dbscripts/mysql/130-to-200-migration.sql
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/dbscripts/mysql/130-to-200-migration.sql?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/dbscripts/mysql/130-to-200-migration.sql
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/classes/dbscripts/mysql/130-to-200-migration.sql
Mon Sep 17 14:05:21 2007
@@ -137,6 +137,16 @@
 
 -- -----------------------------------------------------
 
+-- See ROL-1538
+alter table website add column isenabled tinyint(1) default 1;
+update website set isenabled=1;
+alter table website modify isenabled tinyint(1) default 1 not null; 
+
+-- See ROL-1536
+update folder set name='root' where name='top'; 
+
+-- -----------------------------------------------------
+
 -- Removing all indexes, foreign key with long names to support DB2
 
 alter table website drop foreign key website_userid_fk;
@@ -163,12 +173,12 @@
 alter table userrole drop index userrole_username_index;
 alter table usercookie drop index usercookie_username_index;
 alter table usercookie drop index usercookie_cookieid_index;
-alter table webpage drop index webpage_name_index;
-alter table webpage drop index webpage_link_index;
+-- See ROL-1538 -- alter table webpage drop index webpage_name_index;
+-- See ROL-1538 -- alter table webpage drop index webpage_link_index;
 alter table webpage drop index webpage_id_index;
 alter table website drop index website_id_index;
 alter table website drop index website_userid_index;
-alter table website drop index website_isenabled_index;
+-- See ROL-1538 -- alter table website drop index website_isenabled_index;
 alter table folder drop index folder_websiteid_index;
 alter table folderassoc drop index folderassoc_folderid_index;
 alter table folderassoc drop index folderassoc_ancestorid_index;

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/admin/PlanetConfig.jsp
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/admin/PlanetConfig.jsp?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/admin/PlanetConfig.jsp
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/admin/PlanetConfig.jsp
Mon Sep 17 14:05:21 2007
@@ -18,24 +18,6 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
 
-<%--
-  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.
---%>
-<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
 
 <p class="subtitle"><s:text name="planetConfig.subtitle" /></a>
 <p><s:text name="planetConfig.prompt" /></a>

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Bookmarks.jsp
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Bookmarks.jsp?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Bookmarks.jsp (original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Bookmarks.jsp Mon
Sep 17 14:05:21 2007
@@ -104,7 +104,8 @@
             <th class="rollertable" width="5%">&nbsp;</th>
             <th class="rollertable" width="5%">&nbsp;</th>
             <th class="rollertable" width="30%"><s:text name="bookmarksForm.name"
/></th>
-            <th class="rollertable" width="50%"><s:text name="bookmarksForm.description"
/></th>
+            <th class="rollertable" width="45%"><s:text name="bookmarksForm.description"
/></th>
+            <th class="rollertable" width="5%"><s:text name="bookmarksForm.priority"
/></th>
             <th class="rollertable" width="5%"><s:text name="bookmarksForm.edit"
/></th>
             <th class="rollertable" width="5%"><s:text name="bookmarksForm.visitLink"
/></th>
         </tr>
@@ -136,6 +137,8 @@
                     <str:truncateNicely lower="30" upper="35" ><s:property value="#folder.description"
/></str:truncateNicely>
                 </td>
                 
+                <td class="rollertable"></td>
+                
                 <td class="rollertable" align="center">
                     <s:url id="editUrl" action="folderEdit">
                         <s:param name="weblog" value="%{actionWeblog.handle}" />
@@ -170,6 +173,10 @@
                 
                 <td class="rollertable">
                     <str:truncateNicely lower="30" upper="35" ><s:property value="#bookmark.description"
/></str:truncateNicely>
+                </td>
+                
+                <td class="rollertable">
+                    &nbsp;<s:property value="#bookmark.priority" />
                 </td>
                 
                 <td class="rollertable" align="center">

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Resources.jsp
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Resources.jsp?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Resources.jsp (original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/jsps/editor/Resources.jsp Mon
Sep 17 14:05:21 2007
@@ -72,7 +72,7 @@
         
         <br />
         
-        <s:submit type="button" key="uploadFiles.upload" onclick="validate()" />
+        <s:submit type="button" key="uploadFiles.upload" />
         <br />
         <br />
         
@@ -151,8 +151,8 @@
                 </s:if>
                 <s:else>
                     <img src='<s:url value="/images/image.png"/>' style="padding:0px"
/>
-                    <a href='<c:out value="${model.resourcesBaseURL}" /><s:property
value="getResourceURL(#f.path)" />'>
-                        <s:property value="#f.name" />
+                        <a href='<s:property value="getResourceURL(#f.path)" />'>
+                            <s:property value="#f.name" />
                     </a>
                 </s:else>
             </td>

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/tiles.xml
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/tiles.xml?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/tiles.xml (original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/tiles.xml Mon Sep 17 14:05:21
2007
@@ -71,7 +71,7 @@
     
     <!-- error pages -->
     <definition name=".denied" extends=".tiles-errorpage" >
-        <put-attribute name="content" value="/WEB-INF/jsps/errors/denied.jsp" />
+        <put-attribute name="content" value="/errors/denied.jsp" />
     </definition>
     
         

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/velocity/templates/planet/planetrss.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/velocity/templates/planet/planetrss.vm?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/velocity/templates/planet/planetrss.vm
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/velocity/templates/planet/planetrss.vm
Mon Sep 17 14:05:21 2007
@@ -22,16 +22,17 @@
   <title>$utils.escapeXML($group.title)</title>
   <description>Aggregated feed for group [$utils.escapeXML($group.title)]</description>
   #else
-  <title>$utils.escapeXML($planet.configuration.title)</title>
-  <description>$utils.escapeXML($planet.configuration.title)</description>
+  <title>$utils.escapeXML($siteName)</title>
+  <description>$utils.escapeXML($siteDescription)</description>
   #end
-  <link>$utils.escapeXML($planet.configuration.siteURL)</link>
-  <lastBuildDate>$utils.formatRfc822Date($planet.lastUpdated)</lastBuildDate>
+  <link>$utils.escapeXML($absoluteSite)</link>
+  <lastBuildDate>$utils.formatRfc822Date($lastModified)</lastBuildDate>
   <generator>Roller</generator>
   #if($group)
-     #set($entries = $planet.getAggregation($group, 0, $entryCount))
+     #set($entries = $planet.getEntries($group, 0, $entryCount))
   #else
-     #set($entries = $planet.getAggregation(0, $entryCount))
+     #set($all = $planet.getGroup($planet.getPlanet("default"), "all"))
+     #set($entries = $planet.getEntries($all, 0, $entryCount))
   #end
   #foreach( $entry in $entries )
   <item>
@@ -46,7 +47,14 @@
      	   <category>$utils.escapeXML($cat.name)</category>
      	#end
     #end
-    #if($entry.permalink)<link>$utils.escapeXML($entry.permalink)</link> #end
+    #if($entry.permalink)
+        <link>$utils.escapeXML($entry.permalink)</link>
+    #end
+    #if($entry.guid)
+        <guid>$utils.escapeXML($entry.guid)</guid>
+    #elseif ($entry.permalink)
+        <guid isPermaLink="true">$utils.escapeXML($entry.permalink)</guid>
+    #end
     <pubDate>$utils.formatRfc822Date($entry.pubTime)</pubDate>
     #if(!$utils.isEmpty($entry.author))
        <dc:creator>$utils.escapeXML($entry.author)</dc:creator>

Modified: roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/web.xml?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/web.xml (original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/web/WEB-INF/web.xml Mon Sep 17 14:05:21
2007
@@ -49,11 +49,15 @@
         <filter-class>org.apache.roller.weblogger.ui.core.filters.BootstrapFilter</filter-class>
     </filter>
     
+    <!-- 
+    Most app servers support compression, if yours doesn't then use this one,
+    but don't forget to uncomment the mapping below too.
     <filter>
         <filter-name>CompressionFilter</filter-name>
         <filter-class>org.apache.roller.weblogger.ui.core.filters.CompressionFilter</filter-class>
     </filter>
-    
+    -->
+
     <filter>
         <filter-name>RequestMappingFilter</filter-name>
         <filter-class>org.apache.roller.weblogger.ui.rendering.filters.RequestMappingFilter</filter-class>
@@ -156,7 +160,9 @@
         <dispatcher>REQUEST</dispatcher>
     </filter-mapping>
     
-    <!-- Compression Filter -->
+    <!-- 
+    Most app servers support compression, if yours doesn't then use this one,
+    but don't forget to uncomment the filter definition above too.
     <filter-mapping>
         <filter-name>CompressionFilter</filter-name>
         <url-pattern>/roller-ui/rendering/page/*</url-pattern>
@@ -167,6 +173,7 @@
         <url-pattern>/roller-ui/rendering/feed/*</url-pattern>
         <dispatcher>FORWARD</dispatcher>
     </filter-mapping>
+    -->
     
     <!-- Struts2 -->
     <filter-mapping>
@@ -504,12 +511,17 @@
     
     <error-page>
         <exception-type>java.lang.Exception</exception-type>
-        <location>/WEB-INF/jsps/errors/error.jsp</location>
+        <location>/roller-ui/errors/error.jsp</location>
+    </error-page>
+    
+    <error-page>
+        <error-code>403</error-code>
+        <location>/roller-ui/errors/403.jsp</location>
     </error-page>
     
     <error-page>
         <error-code>404</error-code>
-        <location>/WEB-INF/jsps/errors/404.jsp</location>
+        <location>/roller-ui/errors/404.jsp</location>
     </error-page>
     
 

Modified: roller/branches/roller_4.1_dev/metadata/database/macros.vm
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/metadata/database/macros.vm?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
Binary files /tmp/tmpsXv5pD and /tmp/tmpjKESib differ

Modified: roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/README.txt
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/README.txt?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/README.txt
(original)
+++ roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/README.txt
Mon Sep 17 14:05:21 2007
@@ -8,17 +8,16 @@
 
 1) Have Groovy 1.0 installed on your system
 
-2) Put the RAP SDK, JDOM and Commons Codec jars in your classpath.
-   For example:
+2) Put the RAP SDK, JDOM and Commons Codec jars in your classpath. For example:
 
   $ export CLASSPATH=./lib/jdom.jar:./lib/roller-rap-sdk.jar:./lib/commons-codec-1.3.jar
 
 
 Once you've done that you can run the scripts like so:
 
-  $ groovy rap.gy <username> <password> <endpoint-url>
+  $ groovy <script> <username> <password> <endpoint-url>
 
 For example:
 
-  $ groovy rap.gy admin admin http://localhost:8080/roller/roller-services/rap
+  $ groovy listusers.gy admin admin http://localhost:8080/roller/roller-services/rap
 

Modified: roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/createuser.gy
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/createuser.gy?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/createuser.gy
(original)
+++ roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/createuser.gy
Mon Sep 17 14:05:21 2007
@@ -3,7 +3,7 @@
 import java.net.*;
 import org.jdom.output.*;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.roller.webservices.adminprotocol.sdk.*;
+import org.apache.roller.weblogger.webservices.adminprotocol.sdk.*;
 
 if (args.length < 6) {
     println "USAGE: groovy createuser.gy <admin-username> <admin-password> <new-username>
<new-password> <email> <rap-endpoint>"; 
@@ -13,9 +13,9 @@
 admin_username = args[0];
 admin_password = args[1];
 username = args[2];
-password = args[3]
+password = args[3];
 email    = args[4];
-rapuri   = args[5]
+rapuri   = args[5];
 
 fullName = username;
 locale   = "en_US";
@@ -50,6 +50,7 @@
 
 user = new UserEntry(username, baseURI);
 
+user.setScreenName(  username);
 user.setPassword(    password);
 user.setFullName(    fullName);
 user.setEmailAddress(email);

Modified: roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/lib/roller-rap-sdk.jar
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/lib/roller-rap-sdk.jar?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
Binary files - no diff available.

Modified: roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listcollections.gy
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listcollections.gy?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listcollections.gy
(original)
+++ roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listcollections.gy
Mon Sep 17 14:05:21 2007
@@ -2,7 +2,7 @@
 import java.io.*;
 import java.net.*;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.roller.webservices.adminprotocol.sdk.*;
+import org.apache.roller.weblogger.webservices.adminprotocol.sdk.*;
 
 if (args.length < 3) {
     println "USAGE: groovy listcollections.gy <username> <password> <rap-endpoint-uri>";

Modified: roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listusers.gy
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listusers.gy?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listusers.gy
(original)
+++ roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/adminprotocol/listusers.gy
Mon Sep 17 14:05:21 2007
@@ -2,10 +2,10 @@
 import java.io.*;
 import java.net.*;
 import org.apache.commons.codec.binary.Base64;
-import org.apache.roller.webservices.adminprotocol.sdk.*;
+import org.apache.roller.weblogger.webservices.adminprotocol.sdk.*;
 
 if (args.length < 3) {
-    println "USAGE: groovy listcollections.gy <username> <password> <rap-endpoint-uri>";
+    println "USAGE: groovy listusers.gy <username> <password> <rap-endpoint-uri>";
     return;
 }
 username = args[0];

Modified: roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/rollerapi/createtestdata.gy
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/rollerapi/createtestdata.gy?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/rollerapi/createtestdata.gy
(original)
+++ roller/branches/roller_4.1_dev/sandbox/scripting/groovy/examples/rollerapi/createtestdata.gy
Mon Sep 17 14:05:21 2007
@@ -15,10 +15,10 @@
 
     def roller = null;
 
-    def userCount = 5
+    def userCount = 30 
     def blogCount = 2*userCount
-    def entryCount = 10
-    def commentCount = 3
+    def entryCount = 50 
+    def commentCount = 6
 
     def users = []
 
@@ -107,18 +107,18 @@
 
     def createUser(username, password, fullname, email) {
         println "Creating user: " + username
-        def locale   = "en_US";
-        def timeZone = "America/New_York";
-        def user = new org.apache.roller.weblogger.pojos.User();
-        user.setUserName(username);
-        user.setScreenName(username);
-        user.setPassword(password);
-        user.setFullName(fullname);
-        user.setEmailAddress(email);
-        user.setLocale(locale);
-        user.setTimeZone(timeZone);
-        user.setDateCreated(new java.util.Date());
         try {
+            def locale   = "en_US";
+            def timeZone = "America/New_York";
+            def user = new org.apache.roller.weblogger.pojos.User();
+            user.setUserName(username);
+            user.setScreenName(username);
+            user.setPassword(password);
+            user.setFullName(fullname);
+            user.setEmailAddress(email);
+            user.setLocale(locale);
+            user.setTimeZone(timeZone);
+            user.setDateCreated(new java.util.Date());
             roller.getUserManager().addUser(user);
             roller.flush();
             users.add(user)
@@ -130,19 +130,19 @@
 
     def createBlog(user, handle, name, desc, theme) {
         println "Creating blog: " + handle
-        def website = new org.apache.roller.weblogger.pojos.Weblog(
-            handle, 
-            user,
-            name,
-            desc,
-            user.getEmailAddress(),
-            user.getEmailAddress(),
-            theme,
-            user.getLocale(),
-            user.getTimeZone());
+        try {
+            def website = new org.apache.roller.weblogger.pojos.Weblog(
+                handle, 
+                user,
+                name,
+                desc,
+                user.getEmailAddress(),
+                user.getEmailAddress(),
+                theme,
+                user.getLocale(),
+                user.getTimeZone());
             def cat = new org.apache.roller.weblogger.pojos.WeblogCategory(
                 website, null, "cat1", "cat1", null);
-        try {
             roller.getWeblogManager().saveWeblogCategory(cat);
             website.setDefaultCategory(cat);
             roller.getUserManager().addWebsite(website);
@@ -155,19 +155,19 @@
 
     def createEntry(blog, title, text, pubTime) {
         println "Creating entry title: " + title
-        def entry = new org.apache.roller.weblogger.pojos.WeblogEntry();
-        entry.setWebsite(blog);
-        entry.setCreator(blog.getCreator());
-        def catName = categories.get((int)(Math.random() * categories.size()))
-        def category = roller.getWeblogManager().getWeblogCategoryByPath(blog,catName)
-        entry.setCategory(category);
-        entry.setPubTime(new java.sql.Timestamp(pubTime.getTime()));
-        entry.setUpdateTime(new java.sql.Timestamp(pubTime.getTime()));
-        entry.setStatus(org.apache.roller.weblogger.pojos.WeblogEntry.PUBLISHED);
-        entry.setText(text);
-        entry.setTitle(title);
-        entry.setLocale("en_US");
         try {
+            def entry = new org.apache.roller.weblogger.pojos.WeblogEntry();
+            entry.setWebsite(blog);
+            entry.setCreator(blog.getCreator());
+            def catName = categories.get((int)(Math.random() * categories.size()))
+            def category = roller.getWeblogManager().getWeblogCategoryByPath(blog,catName)
+            entry.setCategory(category);
+            entry.setPubTime(new java.sql.Timestamp(pubTime.getTime()));
+            entry.setUpdateTime(new java.sql.Timestamp(pubTime.getTime()));
+            entry.setStatus(org.apache.roller.weblogger.pojos.WeblogEntry.PUBLISHED);
+            entry.setText(text);
+            entry.setTitle(title);
+            entry.setLocale("en_US");
             roller.getWeblogManager().saveWeblogEntry(entry);
             roller.flush();
             return entry
@@ -178,14 +178,14 @@
 
     def createComment(entry, commentername, content) { 
         println "Creating comment from user: " + commentername
-        def comment = new org.apache.roller.weblogger.pojos.WeblogEntryComment();
-        comment.setWeblogEntry(entry);
-        comment.setName(commentername);
-        comment.setPostTime(new java.sql.Timestamp(new java.util.Date().getTime()));
-        comment.setContent(content);
-        comment.setNotify(Boolean.FALSE);
-        comment.setStatus(org.apache.roller.weblogger.pojos.WeblogEntryComment.APPROVED);
         try {
+            def comment = new org.apache.roller.weblogger.pojos.WeblogEntryComment();
+            comment.setWeblogEntry(entry);
+            comment.setName(commentername);
+            comment.setPostTime(new java.sql.Timestamp(new java.util.Date().getTime()));
+            comment.setContent(content);
+            comment.setNotify(Boolean.FALSE);
+            comment.setStatus(org.apache.roller.weblogger.pojos.WeblogEntryComment.APPROVED);
             roller.getWeblogManager().saveComment(comment);
             roller.flush();
         } catch (Exception e) {
@@ -279,7 +279,7 @@
                 0.upto(paraCount) {
                     text += "<p>" + blogText[(int)(Math.random() * blogText.size())]
+ "</p>"
                 }
-                def title = text.substring(4,25)
+                def title = text.substring(3,25)
                 def pubTime = new Date();
                 pubTime = pubTime - (int)(Math.random() * 60)
                 def entry = createEntry(blog, title, text, pubTime)

Modified: roller/branches/roller_4.1_dev/tools/roller-core/roller-core.jar
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/tools/roller-core/roller-core.jar?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
Binary files - no diff available.

Modified: roller/branches/roller_4.1_dev/tools/roller-planet/roller-planet-business.jar
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/tools/roller-planet/roller-planet-business.jar?rev=576585&r1=576584&r2=576585&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message