roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r230810 [2/6] - in /incubator/roller/branches/roller_2.0: ./ contrib/plugins/src/org/roller/presentation/velocity/plugins/acronyms/ contrib/plugins/src/org/roller/presentation/velocity/plugins/convertbreaks/ contrib/plugins/src/org/roller/p...
Date Mon, 08 Aug 2005 14:43:03 GMT
Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernatePlanetManagerImpl.java Mon Aug  8 07:41:04 2005
@@ -47,7 +47,7 @@
  */
 public class HibernatePlanetManagerImpl extends PlanetManagerImpl
 {
-    private List topSubscriptions;
+    private static final String NO_GROUP = "zzz_nogroup_zzz"; 
     
     private static Log logger = 
         LogFactory.getFactory().getInstance(HibernatePlanetManagerImpl.class);
@@ -194,20 +194,14 @@
     public synchronized List getAggregation(PlanetGroupData group, int maxEntries) 
         throws RollerException
     {
-        long startTime = System.currentTimeMillis();
         List ret = null;
         try
         {
-            if (group != null) 
-            {
-                ret = (List)aggregationsByGroup.get(group);
-            }
-            else 
-            {
-                ret = aggregation;
-            }
+            String groupHandle = (group == null) ? NO_GROUP : group.getHandle();
+            ret = (List)aggregationsByGroup.get(groupHandle);
             if (ret == null) 
             {
+                long startTime = System.currentTimeMillis();
                 Session session = 
                     ((HibernateStrategy)strategy).getSession();
                 if (group != null)
@@ -241,16 +235,12 @@
                 {
                     retLastUpdated = new Date();
                 }
-                if (group != null)
-                {
-                    aggregationsByGroup.put(group, ret);
-                    lastUpdatedByGroup.put(group, retLastUpdated);
-                }
-                else
-                {
-                    aggregation = ret;
-                    lastUpdated = retLastUpdated;
-                }
+                aggregationsByGroup.put(groupHandle, ret);
+                lastUpdatedByGroup.put(groupHandle, retLastUpdated);
+
+                long endTime = System.currentTimeMillis();
+                logger.info("Generated aggregation in "
+                                    +((endTime-startTime)/1000.0)+" seconds");
             }
         }
         catch (Exception e)
@@ -258,9 +248,6 @@
             logger.error("ERROR: building aggregation for: "+group, e);
             throw new RollerException(e);
         }
-        long endTime = System.currentTimeMillis();
-        logger.info("Generated aggregation in "
-                                    +((endTime-startTime)/1000.0)+" seconds");
         return ret; 
     }
 
@@ -316,7 +303,9 @@
 
     public synchronized List getTopSubscriptions(int max) throws RollerException
     {
-        if (topSubscriptions == null)
+        String groupHandle = NO_GROUP;
+        List ret = (List)topSubscriptionsByGroup.get(groupHandle);
+        if (ret == null)
         {
             try
             {
@@ -325,20 +314,23 @@
                         session.createCriteria(PlanetSubscriptionData.class);
                 criteria.setMaxResults(max);
                 criteria.addOrder(Order.desc("inboundblogs"));
-                topSubscriptions = criteria.list();
+                ret = criteria.list();
             }
             catch (HibernateException e)
             {
                 throw new RollerException(e);
             }
+            topSubscriptionsByGroup.put(groupHandle, ret);
         }
-        return topSubscriptions;
+        return ret;
     }
 
     public synchronized List getTopSubscriptions(
             PlanetGroupData group, int max) throws RollerException
     {
-        if (topSubscriptions == null)
+        String groupHandle = (group == null) ? NO_GROUP : group.getHandle();
+        List ret = (List)topSubscriptionsByGroup.get(groupHandle);
+        if (ret == null)
         {
             try
             {
@@ -351,21 +343,15 @@
                    +"order by sub.inboundblogs desc");
                 query.setString("groupHandle", group.getHandle());
                 query.setMaxResults(max);
-                topSubscriptions = query.list();
+                ret = query.list();
             }
             catch (HibernateException e)
             {
                 throw new RollerException(e);
             }
+            topSubscriptionsByGroup.put(groupHandle, ret);
         }
-        return topSubscriptions;
+        return ret;
     }
-
-    public synchronized void clearCachedAggregations() 
-    {
-        super.clearCachedAggregations();
-        topSubscriptions = null;
-    }
-
 }
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateRefererManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateRefererManagerImpl.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateRefererManagerImpl.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateRefererManagerImpl.java Mon Aug  8 07:41:04 2005
@@ -108,6 +108,8 @@
             
             String[] ignoreWords = StringUtils.split(
                 StringUtils.deleteWhitespace(website.getIgnoreWords()),",");
+            if (ignoreWords.length == 0) return;
+            
             Junction or = Expression.disjunction();          
             for (int i=0; i<ignoreWords.length; i++) 
             {

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateUserManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateUserManagerImpl.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateUserManagerImpl.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateUserManagerImpl.java Mon Aug  8 07:41:04 2005
@@ -28,7 +28,7 @@
 import org.roller.model.RollerFactory;
 import org.roller.model.WeblogManager;
 import org.roller.pojos.FolderData;
-import org.roller.pojos.PageData;
+import org.roller.pojos.WeblogTemplate;
 import org.roller.pojos.PermissionsData;
 import org.roller.pojos.RefererData;
 import org.roller.pojos.RoleData;
@@ -117,7 +117,7 @@
     /** 
      * Use Hibernate directly because Roller's Query API does too much allocation.
      */
-    public PageData getPageByLink(WebsiteData website, String pagelink)
+    public WeblogTemplate getPageByLink(WebsiteData website, String pagelink)
         throws RollerException
     {
         if (website == null)
@@ -127,14 +127,14 @@
             throw new RollerException("Pagelink is null");
                                                                       
         Session session = ((HibernateStrategy)mStrategy).getSession();
-        Criteria criteria = session.createCriteria(PageData.class);
+        Criteria criteria = session.createCriteria(WeblogTemplate.class);
         criteria.add(Expression.eq("website",website));
         criteria.add(Expression.eq("link",pagelink));        
         criteria.setMaxResults(1);
         try
         {
             List list = criteria.list();
-            return list.size()!=0 ? (PageData)list.get(0) : null;
+            return list.size()!=0 ? (WeblogTemplate)list.get(0) : null;
         }
         catch (HibernateException e)
         {
@@ -299,7 +299,7 @@
             throw new RollerException("website is null");
                                                                       
         Session session = ((HibernateStrategy)mStrategy).getSession();
-        Criteria criteria = session.createCriteria(PageData.class);
+        Criteria criteria = session.createCriteria(WeblogTemplate.class);
         criteria.add(Expression.eq("website",website)); 
         criteria.addOrder(Order.asc("name"));
         try
@@ -315,7 +315,7 @@
     /** 
      * @see org.roller.model.UserManager#getPageByName(WebsiteData, java.lang.String)
      */
-    public PageData getPageByName(WebsiteData website, String pagename) 
+    public WeblogTemplate getPageByName(WebsiteData website, String pagename) 
         throws RollerException
     {
         if (website == null)
@@ -325,14 +325,14 @@
             throw new RollerException("Page name is null");
                                    
         Session session = ((HibernateStrategy)mStrategy).getSession();
-        Criteria criteria = session.createCriteria(PageData.class);
+        Criteria criteria = session.createCriteria(WeblogTemplate.class);
         criteria.add(Expression.eq("website", website));
         criteria.add(Expression.eq("name", pagename));
         criteria.setMaxResults(1);
         try
         {
             List list = criteria.list();
-            return list.size()!=0 ? (PageData)list.get(0) : null;
+            return list.size()!=0 ? (WeblogTemplate)list.get(0) : null;
         }
         catch (HibernateException e)
         {
@@ -439,12 +439,12 @@
             }
             
             // remove associated pages
-            Criteria pageQuery = session.createCriteria(PageData.class);
+            Criteria pageQuery = session.createCriteria(WeblogTemplate.class);
             pageQuery.add(Expression.eq("website", website));
             List pages = pageQuery.list();
             for (Iterator iter = pages.iterator(); iter.hasNext();) 
             {
-                PageData page = (PageData) iter.next();
+                WeblogTemplate page = (WeblogTemplate) iter.next();
                 page.remove();
             }
             

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/package.html?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/package.html (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/package.html Mon Aug  8 07:41:04 2005
@@ -4,6 +4,6 @@
   <title></title>
 </head>
 <body>
-Hibernate implementation of the Roller backend.
+Concrete and Hibernate-based implementaitons of business layer interfaces.
 </body>
 </html>

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/package.html?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/package.html (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/package.html Mon Aug  8 07:41:04 2005
@@ -4,8 +4,24 @@
   <title></title>
 </head>
 <body>
-Abstract implementation of the Roller backend interfaces defined in the
-org.roller.model package. The Roller presentation layer should not use
-any of the org.roller.business.* classes directly.
+Abstract implementation of the business layer interfaces.
+
+<p>At this level we avoid dependance on specific persistence engines 
+(e.g. Hibernate). We do this by using an interface named 
+{@link org.roller.business.PersistenceStrategy PersistenceStrategy} 
+to store, retrieve and remove 
+{@link org.roller.pojos.PersistentObject PersistentObjects}.</p>
+
+<img src="roller-persistence.png" 
+    alt="diagram of Roller persistence object and strategy" />
+
+<p>The diagram below illustrates the dependency relationships between the 
+{@link org.roller.pojos org.roller.pojos}, 
+{@link org.roller.model org.roller.model}, and 
+org.roller.business packages.</p>
+
+<img src="roller-services-impl.png" 
+    alt="diagram of Roller business and persistence layers" />
+
 </body>
 </html>

Propchange: incubator/roller/branches/roller_2.0/src/org/roller/business/roller-persistence.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Propchange: incubator/roller/branches/roller_2.0/src/org/roller/business/roller-services-impl.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/AddEntryOperation.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/AddEntryOperation.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/AddEntryOperation.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/AddEntryOperation.java Mon Aug  8 07:41:04 2005
@@ -11,6 +11,8 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.lucene.index.IndexWriter;
 import org.roller.business.IndexManagerImpl;
+import org.roller.model.Roller;
+import org.roller.model.RollerFactory;
 import org.roller.pojos.WeblogEntryData;
 
 
@@ -49,7 +51,7 @@
     public void doRun()
     {    	
         IndexWriter writer = beginWriting();
-
+        Roller roller = RollerFactory.getRoller();
         try
         {
             if (writer != null)
@@ -63,6 +65,7 @@
         }
         finally
         {
+            if (roller != null) roller.release();
             endWriting();
         }    	
     }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/ReIndexEntryOperation.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/ReIndexEntryOperation.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/ReIndexEntryOperation.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/ReIndexEntryOperation.java Mon Aug  8 07:41:04 2005
@@ -9,12 +9,14 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexReader;
-import org.roller.business.IndexManagerImpl;
-import org.roller.pojos.WeblogEntryData;
+import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.Term;
+import org.roller.business.IndexManagerImpl;
 import org.roller.business.search.FieldConstants;
+import org.roller.model.Roller;
+import org.roller.model.RollerFactory;
+import org.roller.pojos.WeblogEntryData;
 
 /**
  * @author aim4min
@@ -69,6 +71,7 @@
         }
         
         IndexWriter writer = beginWriting();
+        Roller roller = RollerFactory.getRoller();
         try
         {
             if (writer != null)
@@ -82,6 +85,7 @@
         }
         finally
         {
+            if (roller != null) roller.release();
             endWriting();
         }    	
     }    

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/package.html?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/package.html (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/package.html Mon Aug  8 07:41:04 2005
@@ -4,6 +4,6 @@
   <title></title>
 </head>
 <body>
-Weblog search operations using Lucene.<br>
+Lucene-based search operations to be executed by ThreadManager.<br>
 </body>
 </html>

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/search/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/search/package.html?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/search/package.html (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/search/package.html Mon Aug  8 07:41:04 2005
@@ -4,6 +4,6 @@
   <title></title>
 </head>
 <body>
-Weblog search implementation using Lucene.<br>
+Utilities needed by implementation of search interface.
 </body>
 </html>

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/utils/UpgradeDatabase.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/utils/UpgradeDatabase.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/utils/UpgradeDatabase.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/utils/UpgradeDatabase.java Mon Aug  8 07:41:04 2005
@@ -10,162 +10,179 @@
 import java.sql.SQLException;
 import java.sql.Statement;
 
+
 /**
- * Upgrade Roller database from 0.9.8 to 1.0.
- * 
- * Creates root Category for each Website and associations for each Category.
- * Sets each Website's default Category and default Blogger.com Category
- * Creates associations for each Folder.
+ * Upgrade Roller Database.
  */
-public class UpgradeDatabase
-{
-    private static Log mLogger = 
-        LogFactory.getFactory().getInstance(UpgradeDatabase.class);
-
-    public static void upgradeDatabase(Connection con) throws RollerException
-    {       
-        // get the db version first
-        try
-        {
-            Statement versionStatement = con.createStatement();
-            ResultSet versionResultSet = 
-              versionStatement.executeQuery("select dbversion from rollerconfig");
-            versionResultSet.next();
-            String dbversion = versionResultSet.getString(1);
-            if (dbversion != null) return;
+public class UpgradeDatabase {
+    
+    private static Log mLogger =
+            LogFactory.getFactory().getInstance(UpgradeDatabase.class);
+    
+    // the name of the property which holds the dbversion value
+    private static final String DBVERSION_PROP = "roller.database.version";
+    
+    // old version ... does nothing
+    public static void upgradeDatabase(Connection con) throws RollerException {}
+    
+    
+    /**
+     * Upgrade database if dbVersion is older than desiredVersion.
+     */
+    public static void upgradeDatabase(Connection con, String desiredVersion) 
+        throws RollerException {
+        
+        int myVersion = 0;
+        int dbversion = -1;
+        
+        // NOTE: this assumes a maximum of 3 digits for the version number
+        //       so if we get to 10.0 then we'll need to upgrade this
+        
+        // strip out non-digits
+        desiredVersion = desiredVersion.replaceAll("\\Q.\\E", "");
+        desiredVersion = desiredVersion.replaceAll("\\D", "");
+        if(desiredVersion.length() > 3)
+            desiredVersion = desiredVersion.substring(0, 3);
+        
+        // parse to an int
+        try {
+            int parsed = Integer.parseInt(desiredVersion);
+            
+            if(parsed < 100)
+                myVersion = parsed * 10;
+            else
+                myVersion = parsed;
+        } catch(Exception e) {}
+        
+        
+        // get the current db version
+        try {
+            Statement stmt = con.createStatement();
+            
+            // just check in the roller_properties table
+            ResultSet rs = stmt.executeQuery(
+                    "select value from roller_properties where name = '"+DBVERSION_PROP+"'");
+            
+            if(rs.next()) {
+                dbversion = rs.getInt(1);
+                
+            } else {
+                // tough to know if this is an upgrade with no db version :/
+                // however, if roller_properties is not empty then we at least
+                // we have someone upgrading from 1.2.x
+                rs = stmt.executeQuery("select count(*) from roller_properties");
+                if(rs.next()) {
+                    if(rs.getInt(1) > 0)
+                        dbversion = 120;
+                }
+            }
             
         } catch(Exception e) {
-            // assume this is a new db using the roller_properties table
+            // that's strange ... hopefully we didn't need to upgrade
+            mLogger.error("Couldn't lookup current database version", e);
             return;
         }
         
+        mLogger.debug("Database version = "+dbversion);
+        mLogger.debug("Desired version = "+myVersion);
+            
+        if(dbversion < 0) {
+            mLogger.info("New installation found, setting db version to "+myVersion);
+            UpgradeDatabase.setDatabaseVersion(con, myVersion);
+            return;
+        } else if(dbversion >= myVersion) {
+            mLogger.info("Database is current, no upgrade needed");
+            return;
+        }
         
-        try
-        {   
-            // Prepated statements for all queries in the loop
-            
-            PreparedStatement rootCatStatement = con.prepareStatement(
-               "select a.id from weblogcategoryassoc as a, weblogcategory as c "+
-               "where c.websiteid=? and a.categoryid=c.id and a.ancestorid is null and a.relation='PARENT'");                        
-            
-            PreparedStatement rootCatCreateStatement = con.prepareStatement(
-               "insert into weblogcategory (id,name,description,websiteid,image) "+
-               "values (?,'root','root',?,NULL)");                        
-            
-            PreparedStatement updateWebsiteStatement = con.prepareStatement(
-               "update website set bloggercatid=?, defaultcatid=? where id=?");                        
-            
-            PreparedStatement catsStatement = con.prepareStatement(
-               "select id from weblogcategory where websiteid=? and id<>?");                        
-            
-            PreparedStatement assocCreateStatement = con.prepareStatement(
-               "insert into weblogcategoryassoc (id,categoryid,ancestorid,relation) "+
-               "values (?,?,?,'PARENT')");                        
-
-            PreparedStatement rootFolderStatement = con.prepareStatement(
-                "select id from folder where websiteid=? and parentid is null");                        
-      
-            PreparedStatement foldersStatement = con.prepareStatement(
-                "select id,parentid from folder where websiteid=?");                        
-      
-            PreparedStatement folderAssocCreateStatement = con.prepareStatement(
-                "insert into folderassoc (id,folderid,ancestorid,relation) "+
-                "values (?,?,?,'PARENT')");                        
+        mLogger.info("Database is old, beginning upgrade to version "+myVersion);
+        
+        // iterate through each upgrade as needed
+        // to add to the upgrade sequence simply add a new "else if" statement
+        // for whatever version needed and then define a new method upgradeXXX()
+        if(dbversion < 130)
+            UpgradeDatabase.upgradeTo130(con);
+        
+        // make sure the database version is the exact version
+        // we are upgrading too.
+        UpgradeDatabase.updateDatabaseVersion(con, myVersion);
+    }
+    
+    
+    /**
+     * Upgrade database for Roller 1.3.0
+     */
+    private static void upgradeTo130(Connection con) throws RollerException {
+        try {
+            /*
+             * The new theme management code is going into place and it uses
+             * the old website.themeEditor attribute to store a users theme.
+             *
+             * In pre-1.3 Roller *all* websites are considered to be using a
+             * custom theme, so we need to make sure this is properly defined
+             * by setting the theme on all websites to custom.
+             *
+             * NOTE: If we don't do this then nothing would break, but some users
+             * would be suprised that their template customizations are no longer
+             * in effect because they are using a shared theme instead.
+             */
+            
+            mLogger.info("Doing upgrade to 130 ...");
+            mLogger.info("Ensuring that all website themes are set to custom");
+            
+            PreparedStatement setCustomThemeStmt = con.prepareStatement(
+                    "update website set editortheme = ?");
+            
+            setCustomThemeStmt.setString(1, org.roller.pojos.Theme.CUSTOM);
+            setCustomThemeStmt.executeUpdate();
+            
+            mLogger.info("Upgrade to 130 complete.");
+        } catch (SQLException e) {
+            mLogger.error("Problem upgrading database to version 130", e);
+            throw new RollerException("Problem upgrading database to version 130", e);
+        }
+        
+        // If someone is upgrading to 1.3.x then we are setting the db version
+        // for the first time.  Normally we would just updateDatabaseVersion()
+        UpgradeDatabase.setDatabaseVersion(con, 130);
+    }
 
-            // loop through all websites
-            Statement websitesStatement = con.createStatement();
-            ResultSet websitesResultSet = 
-                websitesStatement.executeQuery("select id from website");
-            while (websitesResultSet.next()) 
-            {
-                String websiteId = websitesResultSet.getString(1);
-                mLogger.info("Upgrading website id="+websiteId);
-                
-                rootCatStatement.clearParameters();
-                rootCatStatement.setString(1, websiteId);
-                ResultSet rootCatResultSet = rootCatStatement.executeQuery();
-                
-                
-                if (!rootCatResultSet.first()) // if website has no root cat
-                {
-                    // then create one
-                    rootCatCreateStatement.clearParameters();
-                    rootCatCreateStatement.setString(1, websiteId+"R");
-                    rootCatCreateStatement.setString(2, websiteId);
-                    rootCatCreateStatement.executeUpdate();
-                    
-                    // and make it the default one for the website
-                    updateWebsiteStatement.clearParameters();
-                    updateWebsiteStatement.setString(1, websiteId+"R");
-                    updateWebsiteStatement.setString(2, websiteId+"R");
-                    updateWebsiteStatement.setString(3, websiteId);
-                    updateWebsiteStatement.executeUpdate();
-                    
-                    // and create an association for it
-                    assocCreateStatement.clearParameters();
-                    assocCreateStatement.setString(1, websiteId+"A0");
-                    assocCreateStatement.setString(2, websiteId+"R");
-                    assocCreateStatement.setString(3, null);
-                    assocCreateStatement.executeUpdate();
 
-                    // and create associations for all of it's children
-                    catsStatement.clearParameters();
-                    catsStatement.setString(1, websiteId);
-                    catsStatement.setString(2, websiteId+"R");
-                    ResultSet cats = catsStatement.executeQuery();
-                    int count = 1;
-                    while (cats.next())
-                    {
-                        String catid = cats.getString(1);
-                        assocCreateStatement.clearParameters();
-                        assocCreateStatement.setString(1, websiteId+"A"+count++);
-                        assocCreateStatement.setString(2, catid);
-                        assocCreateStatement.setString(3, websiteId+"R");
-                        assocCreateStatement.executeUpdate();
-                    }
-                    mLogger.debug("   Created root categories and associations");
-                    
-                    // determine root bookmark folder of website
-                    rootFolderStatement.clearParameters();
-                    rootFolderStatement.setString(1, websiteId);
-                    ResultSet rootFolderResultSet = rootFolderStatement.executeQuery();
-                    rootFolderResultSet.next();
-                    String rootFolderId = rootFolderResultSet.getString(1);
-                    
-                    // create associations for all children fo root folder
-                    foldersStatement.clearParameters();
-                    foldersStatement.setString(1, websiteId);
-                    ResultSet folders = foldersStatement.executeQuery();
-                    while (folders.next())
-                    {
-                        String id = folders.getString(1);
-                        String parentId = folders.getString(2);
-                        folderAssocCreateStatement.clearParameters();
-                        folderAssocCreateStatement.setString(1, id+"R");
-                        folderAssocCreateStatement.setString(2, id);
-                        if (parentId == null)
-                        {
-                            folderAssocCreateStatement.setString(3, null);
-                        }
-                        else
-                        {
-                            folderAssocCreateStatement.setString(3, rootFolderId);
-                        }
-                        folderAssocCreateStatement.executeUpdate();
-                    }
-                    mLogger.debug("   Created folder associations");
-                }
-            }
-            
-            Statement versionUpdateStatement = con.createStatement();
-            versionUpdateStatement.executeUpdate(
-                "update rollerconfig set dbversion='995'");
-            mLogger.info("Database upgrade complete.");
+    /**
+     * Insert a new database.version property.
+     *
+     * This should only be called once for new installations
+     */
+    private static void setDatabaseVersion(Connection con, int version) 
+        throws RollerException {
+        
+        try {
+            Statement stmt = con.createStatement();
+            stmt.executeUpdate("insert into roller_properties "+
+                    "values('"+DBVERSION_PROP+"', '"+version+"')");
+            
+            mLogger.debug("Set database verstion to "+version);
+        } catch(SQLException se) {
+            throw new RollerException("Error setting database version.", se);
         }
-        catch (SQLException e)
-        {
-            mLogger.error("ERROR in database upgrade",e);
-            throw new RollerException("ERROR in database upgrade",e);
+    }
+    
+    
+    /**
+     * Update the existing database.version property
+     */
+    private static void updateDatabaseVersion(Connection con, int version) 
+        throws RollerException {
+        
+        try {
+            Statement stmt = con.createStatement();
+            stmt.executeUpdate("update roller_properties "+
+                    "set value = '"+version+"'"+
+                    "where name = '"+DBVERSION_PROP+"'");
+            
+            mLogger.debug("Updated database verstion to "+version);
+        } catch(SQLException se) {
+            throw new RollerException("Error setting database version.", se);
         }
     }
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/config/RollerConfig.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/config/RollerConfig.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/config/RollerConfig.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/config/RollerConfig.java Mon Aug  8 07:41:04 2005
@@ -156,4 +156,19 @@
             mConfig.setProperty("uploads.dir", path);
     }
     
+    
+    /**
+     * Set the "context.realpath" property at runtime.
+     *
+     * Properties are meant to be read-only, but we make this one exception
+     * for now because there are some classes which rely on having filesystem
+     * access to files in the roller webapp context.
+     *
+     * This property is *not* persisted in any way.
+     */
+    public static void setContextPath(String path) {
+        
+        mConfig.setProperty("context.realpath", path);
+    }
+    
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/AutoPingManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/AutoPingManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/AutoPingManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/AutoPingManager.java Mon Aug  8 07:41:04 2005
@@ -18,21 +18,23 @@
 import java.util.Collection;
 import java.util.List;
 
+/**
+ * Manages autoping storage/retrieval, queries and queue.
+ */
 public interface AutoPingManager extends Serializable
 {
     /**
-     * Release all resources.
+     * Release all resources associated with Roller session.
      */
     public void release();
 
     /**
      * Create an auto ping configuration specifying that the given ping target is to be pinged when the given website
      * changes.
-     *
      * @param pingTarget target to ping
-     * @param website    website whose changes should trigger the ping
+     * @param website website whose changes should trigger the ping
      * @return new auto ping configuration
-     * @throws RollerException
+     * @throws RollerException 
      */
     public AutoPingData createAutoPing(PingTargetData pingTarget, WebsiteData website)
         throws RollerException;

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/BookmarkManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/BookmarkManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/BookmarkManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/BookmarkManager.java Mon Aug  8 07:41:04 2005
@@ -94,6 +94,9 @@
 	public void moveFolderContents(FolderData src, FolderData dest) 
 		throws RollerException;
 
+    /**
+     * Delete contents of specified folder.
+     */
     public void deleteFolderContents(FolderData src) throws RollerException;
     
     //---------------------------------------------------------------- Queries 
@@ -173,8 +176,14 @@
      */
     public List getFolderAncestorAssocs(FolderData data) throws RollerException;
 
+    /**
+     * Release all resources associated with Roller session.
+     */
     public void release();
 
+    /**
+     * Determines if folder is descendent of folder.
+     */
     public boolean isDescendentOf(FolderData data, FolderData ancestor) throws RollerException;
 }
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/ConfigManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/ConfigManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/ConfigManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/ConfigManager.java Mon Aug  8 07:41:04 2005
@@ -1,2 +1,17 @@
 /*
- * Created on Feb 4, 2004
 */
package org.roller.model;

import org.roller.RollerException;
import org.roller.pojos.RollerConfigData;
import java.io.Serializable;

/**
 * @author lance.lavandowska
 */
public interface ConfigManager extends Serializable 
{
    /** Release any resources used */
    public void release();

    public void storeRollerConfig( RollerConfigData data ) throws RollerException;
    
    public RollerConfigData getRollerConfig() throws RollerException;
    
    public RollerConfigData readFromFile(String filePath) throws RollerException;
}
+ * Created on Feb 4, 2004
 */
package org.roller.model;

import org.roller.RollerException;
import org.roller.pojos.RollerConfigData;
import java.io.Serializable;

/**
+ * Manages Roller configuration
+ * @deprecated Replaced by {@link RollerProperties}.
+ */
public interface ConfigManager extends Serializable 
{
    /**
+     * Release all resources associated with Roller session.
+     */
    public void release();    /**
+     * Store
+     */
+

    public void storeRollerConfig( RollerConfigData data ) throws RollerException;
        /**
+     * Get single RollerConfig object in system.
+     * @deprecated 
+     */
+
    public RollerConfigData getRollerConfig() throws RollerException;
        /**
+     * Read RollerConfig from XML file.
+     */
+
    public RollerConfigData readFromFile(String filePath) throws RollerException;
}

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/FileManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/FileManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/FileManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/FileManager.java Mon Aug  8 07:41:04 2005
@@ -37,8 +37,17 @@
     public void saveFile(WebsiteData site, String name, long size, InputStream is) 
         throws RollerException;
 
+    /**
+     * Get directory in which uploaded files are stored
+     */
     public String getUploadDir();
+    /**
+     * Get base URL where uploaded files are made available.
+     */
     public String getUploadUrl();
     
+    /**
+     * Release all resources associated with Roller session.
+     */
     public void release();
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/IndexManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/IndexManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/IndexManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/IndexManager.java Mon Aug  8 07:41:04 2005
@@ -30,7 +30,9 @@
     /** Execute operation immediately */
     public abstract void executeIndexOperationNow(final IndexOperation op);
     
-    /** Release to be called at end of request processing */
+    /**
+     * Release all resources associated with Roller session.
+     */
     public abstract void release();
     
     /** Shutdown to be called on application shutdown */

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/PingQueueManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/PingQueueManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/PingQueueManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/PingQueueManager.java Mon Aug  8 07:41:04 2005
@@ -25,7 +25,7 @@
 public interface PingQueueManager extends Serializable
 {
     /**
-     * Release resources.
+     * Release all resources associated with Roller session.
      */
     public void release();
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/PingTargetManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/PingTargetManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/PingTargetManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/PingTargetManager.java Mon Aug  8 07:41:04 2005
@@ -15,10 +15,13 @@
 import java.io.Serializable;
 import java.util.List;
 
+/**
+ * Manages ping targets.
+ */
 public interface PingTargetManager extends Serializable
 {
     /**
-     * Release all resources used.
+     * Release all resources associated with Roller session.
      */
     public void release();
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/PropertiesManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/PropertiesManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/PropertiesManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/PropertiesManager.java Mon Aug  8 07:41:04 2005
@@ -18,7 +18,9 @@
 public interface PropertiesManager extends Serializable 
 {
     
-    /** Release any resources used */
+    /**
+     * Release all resources associated with Roller session.
+     */
     public void release();
 
     /** Save a single property */

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/RefererManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/RefererManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/RefererManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/RefererManager.java Mon Aug  8 07:41:04 2005
@@ -105,19 +105,34 @@
 
     //---------------------------------------------- Referer tracking turnover
 
+    /**
+     * Force refer of referer hit counts and deletes all referers that do nto have excerpts.
+     */
     public void forceTurnover(String websiteId) throws RollerException;
 
+    /**
+     * Check to see if it's time for turnover.
+     */
     public void checkForTurnover(boolean forceTurnover, String websiteId)
             throws RollerException;
 
     //----------------------------------------------- Standard manager methods
 
+    /**
+     * Retrieve referer specifie by ID.
+     */
     public RefererData retrieveReferer(String id)
         throws RollerException;
 
+    /**
+     * Remove referer specified by ID.
+     */
     public void removeReferer( String id )
         throws RollerException;
 
+    /**
+     * Release all resources associated with Roller session.
+     */
     public void release();
 }
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/Roller.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/Roller.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/Roller.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/Roller.java Mon Aug  8 07:41:04 2005
@@ -86,16 +86,29 @@
     public IndexManager getIndexManager() throws RollerException;
     
     /**
-     * Get PlanetManager associated with the Roller instance.
+     * Get PlanetManager associated with this Roller instance.
      */
     public PlanetManager getPlanetManager() throws RollerException;
 
-        
+    /**
+     * Get ThemeManager associated with this Roller instance.
+     */
+    public ThemeManager getThemeManager() throws RollerException;
+    
     /** Begin transaction for a thread.
      */ 
     public void begin() throws RollerException;
+    /**
+     * Start Roller session on behalf of specified user.
+     */
     public void begin(UserData user) throws RollerException;
+    /**
+     * Set user for Roller session.
+     */
     public void setUser(UserData user) throws RollerException;
+    /**
+     * Get user associated with Roller session.
+     */
     public UserData getUser() throws RollerException;
     
     /** Commit transaction for a thread.
@@ -107,7 +120,8 @@
      */ 
     public void rollback();
     
-    /** Rollback and release associated resources for a thread.
+    /**
+     * Release all resources associated with Roller session.
      */ 
     public void release();
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/RollerFactory.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/RollerFactory.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/RollerFactory.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/RollerFactory.java Mon Aug  8 07:41:04 2005
@@ -123,6 +123,9 @@
     }
     
 	
+	/**
+	 * Set Roller to be returned by factory.
+	 */
 	public static void setRoller(Roller roller)
 	{
 		if (roller != null) rollerInstance = roller;

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/ScheduledTask.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/ScheduledTask.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/ScheduledTask.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/ScheduledTask.java Mon Aug  8 07:41:04 2005
@@ -8,5 +8,8 @@
  */
 public interface ScheduledTask
 {
+    /**
+     * Initialized scheduled task with Roller instance and real-path to Roller context.
+     */
     public void init(Roller roller, String realPath) throws RollerException;
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/ThreadManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/ThreadManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/ThreadManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/ThreadManager.java Mon Aug  8 07:41:04 2005
@@ -4,25 +4,48 @@
 import java.sql.Date;
 
 /**
- * Index to thread management for executing scheduled and asynchronous tasks.
+ * Thread management for executing scheduled and asynchronous tasks.
  */
 public interface ThreadManager
 {
     public static final long MIN_RATE_INTERVAL_MINS = 1;
 
+    /**
+     * Execute runnable in background (asynchronously).
+     * @param runnable 
+     * @throws java.lang.InterruptedException 
+     */
     public void executeInBackground(Runnable runnable)
             throws InterruptedException;
 
+    /**
+     * Execute runnable in foreground (synchronously).
+     */
     public void executeInForeground(Runnable runnable)
             throws InterruptedException;
 
+    /**
+     * Schedule task to run once a day.
+     */
     public void scheduleDailyTimerTask(TimerTask task);
 
+    /**
+     * Schedule task to run once per hour.
+     */
     public void scheduleHourlyTimerTask(TimerTask task);
 
+    /**
+     * Schedule task to run at fixed rate.
+     */
     public void scheduleFixedRateTimerTask(TimerTask task, long delayMins, long periodMins);
 
+    /**
+     * Shutdown
+     */
     public void shutdown();
 
+    /**
+     * Release all resources associated with Roller session.
+     */
     public void release();
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/UserManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/UserManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/UserManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/UserManager.java Mon Aug  8 07:41:04 2005
@@ -6,7 +6,7 @@
 import java.util.Map;
 
 import org.roller.RollerException;
-import org.roller.pojos.PageData;
+import org.roller.pojos.WeblogTemplate;
 import org.roller.pojos.PermissionsData;
 import org.roller.pojos.RoleData;
 import org.roller.pojos.UserData;
@@ -159,11 +159,26 @@
             String timeZone) throws RollerException;
 
     public UserData retrieveUser(String id)throws RollerException;
+    /**
+     * Store user.
+     */
     public void storeUser( UserData data ) throws RollerException;
 
+    /**
+     * Get all user roles.
+     */
     public List getUserRoles(UserData user) throws RollerException;
+    /**
+     * Get role by ID
+     */
     public RoleData retrieveRole(String id) throws RollerException;
+    /**
+     * Store role.
+     */
     public void storeRole( RoleData data ) throws RollerException;
+    /**
+     * Remove role by ID.
+     */
     public void removeRole( String id ) throws RollerException;
 
     //------------------------------------------------------------ WebsiteData
@@ -183,24 +198,36 @@
         throws RollerException;
 
     public WebsiteData retrieveWebsite(String id) throws RollerException;
+    /**
+     * Store website
+     */
     public void storeWebsite(WebsiteData data) throws RollerException;
 
-    //--------------------------------------------------------------- PageData
+    //--------------------------------------------------------------- WeblogTemplate
     
     /** Get user's page by name */
-    public PageData getPageByName(WebsiteData w, String p) throws RollerException;
+    public WeblogTemplate getPageByName(WebsiteData w, String p) throws RollerException;
 
     /** Get user's page by link */
-    public PageData getPageByLink(WebsiteData w, String p) throws RollerException;
+    public WeblogTemplate getPageByLink(WebsiteData w, String p) throws RollerException;
 
     /** Fix page link using page name */
-    public String fixPageLink(PageData data) throws RollerException;
+    public String fixPageLink(WeblogTemplate data) throws RollerException;
 
     /** Get users pages */
     public List getPages(WebsiteData w) throws RollerException;
 
-    public PageData retrievePage(String id) throws RollerException;
-    public void storePage(PageData data) throws RollerException;
+    /**
+     * Get page by ID
+     */
+    public WeblogTemplate retrievePage(String id) throws RollerException;
+    /**
+     * Store page
+     */
+    public void storePage(WeblogTemplate data) throws RollerException;
+    /**
+     * Remove page by ID
+     */
     public void removePage(String id) throws RollerException;
 
 
@@ -218,7 +245,7 @@
 	/**
 	 * Retrieve the Page in read-only mode (does hibernate support this?).
 	 */
-	public PageData retrievePageReadOnly(String id) throws RollerException;
+	public WeblogTemplate retrievePageReadOnly(String id) throws RollerException;
     
     /**
      * Validates a user based on a cookie value.  If successful, it returns

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java Mon Aug  8 07:41:04 2005
@@ -22,6 +22,9 @@
 {
     public static final String CATEGORY_ATT = "category.att";
     
+    /**
+     * Release all resources associated with Roller session.
+     */
     public void release();
 
     //------------------------------------------------ WeblogCategoryData CRUD
@@ -37,9 +40,18 @@
         String description,
         String image) throws RollerException;
 
+    /**
+     * Get category by ID
+     */
     public WeblogCategoryData retrieveWeblogCategory(String id)
         throws RollerException;
 
+    /**
+     * Recategorize all entries with one category to another.
+     * @param srcId 
+     * @param destId 
+     * @throws org.roller.RollerException 
+     */
     public void moveWeblogCategoryContents(String srcId, String destId)
         throws RollerException;
 
@@ -98,37 +110,76 @@
         WeblogCategoryData ancestor,
         String relation) throws RollerException;
 
+    /**
+     * Get category assoc. by ID
+     */
     public WeblogCategoryAssoc retrieveWeblogCategoryAssoc(String id)
         throws RollerException;
 
     //------------------------------------------------------- CommentData CRUD
 
+    /**
+     * Get comment by ID
+     */
     public CommentData retrieveComment(String id)
         throws RollerException;
 
+    /**
+     * Get comments by entry ID
+     * @param entryId 
+     * @throws org.roller.RollerException 
+     * @return 
+     */
     public abstract List getComments( String entryId )
         throws RollerException;
 
+    /**
+     * Get comments by entry ID, optionally excluding spam
+     * @param entryId 
+     * @param nospam 
+     * @throws org.roller.RollerException 
+     * @return 
+     */
     public abstract List getComments( String entryId, boolean nospam )
         throws RollerException;
 
+    /**
+     * Remove comment by ID
+     */
     public void removeComment( String id )
         throws RollerException;
 
+    /**
+     * Remove comments specified by array of IDs
+     * @param ids 
+     * @throws org.roller.RollerException 
+     */
     public void removeComments( String[] ids )
         throws RollerException;
 
+    /**
+     * Remove all comments of entry specified by ID
+     */
     public void removeCommentsForEntry(String entryId)
     	throws RollerException;
     
+    /**
+     * Get most recent X comments in website.
+     */
     public List getRecentComments(WebsiteData website, int maxCount) 
         throws RollerException;
 
     //------------------------------------------------------- WeblogEntry CRUD
 
+    /**
+     * Get weblog entry by ID
+     */
     public WeblogEntryData retrieveWeblogEntry(String id)
         throws RollerException;
 
+    /**
+     * Remove weblog entry by ID
+     */
     public void removeWeblogEntry( String id )
         throws RollerException;
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/package.html?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/package.html (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/package.html Mon Aug  8 07:41:04 2005
@@ -4,22 +4,9 @@
   <title></title>
 </head>
 <body>
-
-<p>This package defines the Roller Business Tier interfaces.</p>
-
-<p>This package depends on only these packages:</p>
-<ul>
-<li>org.roller.pojos.*</li>
-<li>com.swabunga.spell.*</li>
-<li>org.apache.commons.logging.*</li>
-</ul>
-
-<p>These packages depend on this package:</p>
-<ul>
-<li>org.roller.presentation.*</li>
-<li>org.roller.business.*</li>
-<li>org.roller.pojos.*</li>
-</ul>
+Interfaces and classes that defne the Roller business layer.
+<p />
+<img src="roller-services.png" alt="diagram of Roller and service managers" />
 
 </body>
 </html>

Propchange: incubator/roller/branches/roller_2.0/src/org/roller/model/roller-services.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/roller/branches/roller_2.0/src/org/roller/package.html
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/package.html?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/package.html (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/package.html Mon Aug  8 07:41:04 2005
@@ -4,29 +4,7 @@
   <title></title>
 </head>
 <body>
-<p>Roller is split into a number of top level packages and these packages can 
-be grouped as follows:</p>
-
-<b>Business Layer</b>
-<ul>
-<li>org.roller.model - Interfaces that define various Roller manager classes.</li>
-<li>org.roller.pojos - Domain objects and other persistent objects.</li>
-<li>org.roller.business - Impementations of the Roller org.roller.model interfaces.</li>
-</ul>
-
-<b>Presentation Layer</b>
-<ul>
-<li>org.roller.presentation - Roller's Web UI and Web Services implementations.</li>
-</ul>
-
-
-<b>Other...</b>
-<ul>
-<li>org.roller.util - General purpose utility classes, mostly independent of Roller.</li>
-<li>org.roller.persistence - Persistence abstraction allows Roller to use either 
-Castor or Hibernate.</li>
-<li></li>
-</ul>
+Exceptions thrown by Roller business layer.
 
 </body>
 </html>

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/BookmarkData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/BookmarkData.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/BookmarkData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/BookmarkData.java Mon Aug  8 07:41:04 2005
@@ -74,6 +74,8 @@
     //------------------------------------------------------------- Attributes
     
     /** 
+     * @roller.wrapPojoMethod type="simple"
+     *
      * @ejb:persistent-field 
      * 
      * @hibernate.id column="id" type="string"
@@ -93,6 +95,8 @@
     /** 
      * Name of bookmark.
      * 
+     * @roller.wrapPojoMethod type="simple"
+     *
      * @struts.validator type="required" msgkey="errors.required"
      * @struts.validator-args arg0resource="bookmarkForm.name"
      * 
@@ -113,6 +117,8 @@
 
     /** 
      * Description of bookmark.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * 
      * @ejb:persistent-field 
      * 
@@ -131,6 +137,8 @@
 
     /** 
      * URL of bookmark.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * 
      * @ejb:persistent-field 
      * 
@@ -149,6 +157,8 @@
 
     /** 
      * Weight indicates prominence of link
+     *
+     * @roller.wrapPojoMethod type="simple"
      * 
      * @struts.validator type="required" msgkey="errors.required"
      * @struts.validator type="integer" msgkey="errors.integer"
@@ -171,6 +181,8 @@
 
     /** 
      * Priority determines order of display 
+     *
+     * @roller.wrapPojoMethod type="simple"
      * 
      * @struts.validator type="required" msgkey="errors.required"
      * @struts.validator type="integer" msgkey="errors.integer"
@@ -193,6 +205,8 @@
 
     /** 
      * @ejb:persistent-field 
+     *
+     * @roller.wrapPojoMethod type="simple"
      * 
      * @hibernate.property column="image" non-null="true" unique="false"
      */
@@ -209,6 +223,8 @@
 
     /** 
      * @ejb:persistent-field 
+     *
+     * @roller.wrapPojoMethod type="simple"
      * 
      * @hibernate.property column="feedurl" non-null="true" unique="false"
      */
@@ -226,6 +242,7 @@
     //---------------------------------------------------------- Relationships
     
     /** 
+     * @roller.wrapPojoMethod type="pojo"
      * @ejb:persistent-field 
      * @hibernate.many-to-one column="folderid" cascade="none" not-null="true"
      */

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/CommentData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/CommentData.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/CommentData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/CommentData.java Mon Aug  8 07:41:04 2005
@@ -65,6 +65,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.id column="id" type="string"
      *  generator-class="uuid.hex" unsaved-value="null"
@@ -81,6 +82,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="pojo"
      * @ejb:persistent-field 
      * @hibernate.many-to-one column="entryid" cascade="none" not-null="true"
      */
@@ -96,6 +98,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="name" non-null="true" unique="false"
      */
@@ -112,6 +115,8 @@
 
     /** 
      * Email
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="email" non-null="true" unique="false"
      */
@@ -127,6 +132,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="url" non-null="true" unique="false"
      */
@@ -142,6 +148,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="content" non-null="true" unique="false"
      */
@@ -157,6 +164,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="posttime" non-null="true" unique="false"
      */
@@ -172,6 +180,7 @@
     }
 
     /**
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field
      * @hibernate.property column="spam" non-null="false" unique="false"
      */
@@ -187,6 +196,7 @@
     }
 
     /**
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field
      * @hibernate.property column="notify" non-null="false" unique="false"
      */
@@ -209,6 +219,7 @@
     }
 	
 	/**
+         * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="remotehost" non-null="true" unique="false"
 	 */

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/EntryAttributeData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/EntryAttributeData.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/EntryAttributeData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/EntryAttributeData.java Mon Aug  8 07:41:04 2005
@@ -36,6 +36,7 @@
     }
 
     /**
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.id column="id" type="string" 
      *    generator-class="uuid.hex" unsaved-value="null"
@@ -51,7 +52,7 @@
     }
 
     /**
-    	* Setter is needed in RollerImpl.storePersistentObject()
+     * Setter is needed in RollerImpl.storePersistentObject()
      */
     public void setData(org.roller.pojos.PersistentObject otherData)
     {
@@ -62,6 +63,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="pojo"
      * @ejb:persistent-field 
      * @hibernate.many-to-one column="entryid" cascade="none" not-null="true"
      */
@@ -76,6 +78,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="name" non-null="true" unique="false"
      */
@@ -90,6 +93,7 @@
     }
     
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="value" non-null="true" unique="false"
      */

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/FolderData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/FolderData.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/FolderData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/FolderData.java Mon Aug  8 07:41:04 2005
@@ -88,6 +88,8 @@
 
     /** 
      * @see org.roller.pojos.HierarchicalPersistentObject#getObjectPropertyName()
+     *
+     * @roller.wrapPojoMethod type="simple"
      */
     public String getObjectPropertyName()
     {
@@ -96,12 +98,17 @@
 
     /** 
      * @see org.roller.pojos.HierarchicalPersistentObject#getAncestorPropertyName()
+     *
+     * @roller.wrapPojoMethod type="simple"
      */
     public String getAncestorPropertyName()
     {
         return "ancestorFolder";
     }
 
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
     public boolean isInUse()
     {
         try
@@ -114,6 +121,9 @@
         }
     }
     
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
     public boolean descendentOf(FolderData ancestor) 
         throws RollerException
     {
@@ -123,6 +133,8 @@
     //------------------------------------------------------------- Attributes
     
     /** 
+     * @roller.wrapPojoMethod type="simple"
+     * 
      * @ejb:persistent-field 
      * 
      * @hibernate.id column="id" type="string"
@@ -140,6 +152,8 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
+     *
      * @struts.validator type="required" msgkey="errors.required"
      * @struts.validator type="mask" msgkey="errors.noslashes"
      * @struts.validator-var name="mask" value="${noslashes}"
@@ -162,6 +176,8 @@
 
     /** 
      * Description
+     *
+     * @roller.wrapPojoMethod type="simple"
      * 
      * @ejb:persistent-field 
      * 
@@ -180,7 +196,11 @@
 
     //---------------------------------------------------------- Relationships
     
-    /** Get path to this bookmark folder. */
+    /**
+     * Get path to this bookmark folder.
+     *
+     * @roller.wrapPojoMethod type="simple"
+     */
     public String getPath() throws RollerException
     {
         if (mNewParent != null) 
@@ -197,6 +217,8 @@
     }
         
     /** 
+     * @roller.wrapPojoMethod type="pojo"
+     *
      * @ejb:persistent-field 
      * 
      * @hibernate.many-to-one column="websiteid" cascade="none" not-null="true"
@@ -212,7 +234,11 @@
         this.website = website;
     }
 
-    /** Return parent category, or null if category is root of hierarchy. */
+    /**
+     * Return parent category, or null if category is root of hierarchy.
+     *
+     * @roller.wrapPojoMethod type="pojo"
+     */
     public FolderData getParent() throws RollerException
     {
         if (mNewParent != null)
@@ -237,7 +263,11 @@
         mNewParent = parent;
     }
 
-    /** Query to get child categories of this category. */
+    /**
+     * Query to get child categories of this category.
+     *
+     * @roller.wrapPojoMethod type="pojo-collection" class="org.roller.pojos.FolderData"
+     */
     public List getFolders() throws RollerException
     {
         if (folders == null)
@@ -258,7 +288,9 @@
     //------------------------------------------------------ Bookmark children
     
     /** 
-      * @ejb:persistent-field
+     * @roller.wrapPojoMethod type="pojo-collection" class="org.roller.pojos.BookmarkData"
+     *
+     * @ejb:persistent-field
      * 
      * @hibernate.set lazy="true" order-by="name" inverse="true" cascade="delete" 
      * @hibernate.collection-key column="folderid" 
@@ -291,6 +323,8 @@
     }
 
     /**
+     * @roller.wrapPojoMethod type="pojo-collection" class="org.roller.pojos.BookmarkData"
+     *
      * @param subfolders
      */
     public List retrieveBookmarks(boolean subfolders) throws RollerException

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/PersistentObject.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/PersistentObject.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/PersistentObject.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/PersistentObject.java Mon Aug  8 07:41:04 2005
@@ -44,9 +44,19 @@
             RollerFactory.getRoller().getPersistenceStrategy();
         pstrategy.remove(this);
     }
-    public String toString() {
-        return ToStringBuilder.reflectionToString(this,
-                ToStringStyle.MULTI_LINE_STYLE);
+    public String toString() 
+    {
+        try 
+        {
+            // this may throw an exception if called by a thread that
+            return ToStringBuilder.reflectionToString(
+                this, ToStringStyle.MULTI_LINE_STYLE);
+        }
+        catch (Throwable e)
+        {
+            // alternative toString() implementation used in case of exception
+            return getClass().getName() + ":" + getId();
+        }
     }
     public boolean equals(Object o) {
         return EqualsBuilder.reflectionEquals(this, o);

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/RefererData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/RefererData.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/RefererData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/RefererData.java Mon Aug  8 07:41:04 2005
@@ -83,6 +83,8 @@
 
     /** 
      * Unique ID and primary key of this Referer.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.id column="id" type="string"
      *  generator-class="uuid.hex" unsaved-value="null"
      */
@@ -98,6 +100,8 @@
 
     /** 
      * ID of website that this referer refers to.
+     *
+     * @roller.wrapPojoMethod type="pojo"
      * @hibernate.many-to-one column="websiteid" cascade="none" not-null="true"
      */
     public org.roller.pojos.WebsiteData getWebsite()
@@ -111,6 +115,7 @@
     }
 
     /**
+     * @roller.wrapPojoMethod type="pojo"
      * @hibernate.many-to-one column="entryid" cascade="none"
      */
     public org.roller.pojos.WeblogEntryData getWeblogEntry()
@@ -128,6 +133,8 @@
 
     /** 
      * Date string in YYYYMMDD format.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="datestr" non-null="true" unique="false"
      */
     public java.lang.String getDateString()
@@ -142,6 +149,8 @@
 
     /** 
      * URL of the refering page.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="refurl" non-null="true" unique="false"
      */
     public java.lang.String getRefererUrl()
@@ -156,6 +165,8 @@
 
     /** 
      * Requested URL, the URL linked to by the refering page.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="refpermalink" non-null="true" unique="false"
      */
     public java.lang.String getRefererPermalink()
@@ -170,6 +181,8 @@
 
     /** 
      * Requested URL, the URL linked to by the refering page.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="requrl" non-null="true" unique="false"
      */
     public java.lang.String getRequestUrl()
@@ -183,7 +196,9 @@
     }
 
     /** 
-     * The text on the refering page that surrounds the refering link.  
+     * The text on the refering page that surrounds the refering link. 
+     *
+     * @roller.wrapPojoMethod type="simple" 
      * @hibernate.property column="title" non-null="true" unique="false"
      */
     public java.lang.String getTitle()
@@ -198,6 +213,8 @@
 
     /** 
      * The text on the refering page that surrounds the refering link.  
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="excerpt" non-null="true" unique="false"
      */
     public java.lang.String getExcerpt()
@@ -212,6 +229,8 @@
 
     /** 
      * Should this referer be displayed?
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="visible" non-null="true" unique="false"
      */
     public java.lang.Boolean getVisible()
@@ -226,6 +245,8 @@
 
     /** 
      * Is this referer a duplicate?
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="duplicate" non-null="true" unique="false"
      */
     public java.lang.Boolean getDuplicate()
@@ -240,6 +261,8 @@
 
     /** 
      * Hits received today from this referer.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="dayhits" non-null="true" unique="false"
      */
     public java.lang.Integer getDayHits()
@@ -254,6 +277,8 @@
 
     /** 
      * Total hits received from this referer.
+     *
+     * @roller.wrapPojoMethod type="simple"
      * @hibernate.property column="totalhits" non-null="true" unique="false"
      */
     public java.lang.Integer getTotalHits()
@@ -267,6 +292,10 @@
     }
 
     //-------------------------------------------------------------------------
+    
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
     public String getDisplayUrl(int maxWidth, boolean includeHits)
     {
         StringBuffer sb = new StringBuffer();
@@ -323,6 +352,10 @@
     }
 
     //-------------------------------------------------------------------------
+    
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
     public String getUrl()
     {
         if (getRefererPermalink() != null)
@@ -336,6 +369,10 @@
     }
 
     //-------------------------------------------------------------------------
+    
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
     public String getDisplayUrl()
     {
         return getDisplayUrl(50, false);

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/UserData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/UserData.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/UserData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/UserData.java Mon Aug  8 07:41:04 2005
@@ -127,6 +127,7 @@
    {
       return this.id;
    }
+
    /** @ejb:persistent-field */ 
    public void setId( String id )
    {
@@ -150,6 +151,8 @@
    /** 
     * Get password.
     * If password encryption is enabled, will return encrypted password.
+    *
+    * @roller.wrapPojoMethod type="simple"
     * @ejb:persistent-field 
     * @hibernate.property column="passphrase" non-null="true"
     */
@@ -167,10 +170,13 @@
       this.password = password;
    }
 
-   /** Full name of the user.
-     * @ejb:persistent-field 
-     * @hibernate.property column="fullname" non-null="true" unique="true"
-     */
+   /** 
+    * Full name of the user.
+    *
+    * @roller.wrapPojoMethod type="simple"
+    * @ejb:persistent-field
+    * @hibernate.property column="fullname" non-null="true" unique="true"
+    */
    public String getFullName()
    {
       return this.fullName;
@@ -181,10 +187,13 @@
       this.fullName = fullName;
    }
 
-   /** E-mail address of the user.
-     * @ejb:persistent-field 
-     * @hibernate.property column="emailaddress" non-null="true" unique="true"
-     */
+   /**
+    * E-mail address of the user.
+    *
+    * @roller.wrapPojoMethod type="simple"
+    * @ejb:persistent-field
+    * @hibernate.property column="emailaddress" non-null="true" unique="true"
+    */
    public String getEmailAddress()
    {
       return this.emailAddress;
@@ -196,9 +205,10 @@
    }
 
    /** 
-	* @ejb:persistent-field 
-	* @hibernate.property column="datecreated" non-null="true" unique="false"
-	*/
+    * @roller.wrapPojoMethod type="simple"
+    * @ejb:persistent-field
+    * @hibernate.property column="datecreated" non-null="true" unique="false"
+    */
    public Date getDateCreated()
    {
        if (dateCreated == null) 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogCategoryData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogCategoryData.java?rev=230810&r1=230809&r2=230810&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogCategoryData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogCategoryData.java Mon Aug  8 07:41:04 2005
@@ -125,6 +125,8 @@
 
     /** 
      * @see org.roller.pojos.HierarchicalPersistentObject#getObjectPropertyName()
+     *
+     * @roller.wrapPojoMethod type="simple"
      */
     public String getObjectPropertyName()
     {
@@ -133,6 +135,8 @@
 
     /** 
      * @see org.roller.pojos.HierarchicalPersistentObject#getAncestorPropertyName()
+     *
+     * @roller.wrapPojoMethod type="simple"
      */
     public String getAncestorPropertyName()
     {
@@ -142,9 +146,10 @@
     //------------------------------------------------------- Simple properties
 
     /**
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
-      * @hibernate.id column="id" type="string"
-      *  generator-class="uuid.hex" unsaved-value="null"
+     * @hibernate.id column="id" type="string"
+     *  generator-class="uuid.hex" unsaved-value="null"
      */
     public java.lang.String getId()
     {
@@ -157,6 +162,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="name" non-null="true" unique="false"
      */
@@ -172,6 +178,8 @@
 
     /** 
      * Description
+     * 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="description" non-null="true" unique="false"
      */
@@ -186,6 +194,7 @@
     }
 
     /** 
+     * @roller.wrapPojoMethod type="simple"
      * @ejb:persistent-field 
      * @hibernate.property column="image" non-null="true" unique="false"
      */
@@ -201,6 +210,8 @@
 
     /**
      * Get path in category hierarhcy.
+     *
+     * @roller.wrapPojoMethod type="simple"
      */
     public String getPath()
     {
@@ -221,6 +232,7 @@
     //------------------------------------------------------------ Associations
 
     /** 
+     * @roller.wrapPojoMethod type="pojo"
      * @ejb:persistent-field
      *  
      * @hibernate.many-to-one column="websiteid" cascade="none" not-null="true"
@@ -250,7 +262,11 @@
 //        WeblogCategoryAssoc = weblogCategoryAssoc;
 //    }
 
-    /** Return parent category, or null if category is root of hierarchy. */
+    /** 
+     * Return parent category, or null if category is root of hierarchy.
+     *
+     * @roller.wrapPojoMethod type="pojo"
+     */
     public WeblogCategoryData getParent() throws RollerException
     {
         if (mNewParent != null)
@@ -275,7 +291,11 @@
         mNewParent = parent;
     }
 
-    /** Query to get child categories of this category. */
+    /**
+     * Query to get child categories of this category.
+     *
+     * @roller.wrapPojoMethod type="pojo-collection" class="org.roller.pojos.WeblogCategoryData"
+     */
     public List getWeblogCategories() throws RollerException
     {
         if (mWeblogCategories == null)
@@ -293,6 +313,9 @@
         return mWeblogCategories;
     }
 
+    /**
+     * @roller.wrapPojoMethod type="simple"
+     */
     public boolean descendentOf(WeblogCategoryData ancestor) 
         throws RollerException
     {
@@ -302,6 +325,8 @@
     /** 
      * Determine if category is in use. Returns true if any weblog entries 
      * use this category or any of it's subcategories.
+     *
+     * @roller.wrapPojoMethod type="simple"
      */
     public boolean isInUse() 
     {
@@ -357,6 +382,9 @@
     /** 
      * Retrieve all weblog entries in this category and, optionally, include
      * weblog entries all sub-categories.
+     *
+     * @roller.wrapPojoMethod type="pojo-collection" class="org.roller.pojos.WeblogEntryData"
+     *
      * @param subcats True if entries from sub-categories are to be returned.
      * @return List of WeblogEntryData objects.
      * @throws RollerException



Mime
View raw message