roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r395096 - in /incubator/roller/branches/roller-newbackend: sandbox/atomprotocol/src/org/roller/presentation/atomapi/ src/org/roller/business/hibernate/ src/org/roller/model/ src/org/roller/pojos/ src/org/roller/presentation/ src/org/roller/...
Date Wed, 19 Apr 2006 01:00:41 GMT
Author: agilliland
Date: Tue Apr 18 18:00:39 2006
New Revision: 395096

URL: http://svn.apache.org/viewcvs?rev=395096&view=rev
Log:
manager method name refactorings for WeblogManager.

storeXXX() -> saveXXX()
retrieveXXX() -> getXXX()
createXXX() -> addXXX() (or is removed)

plus:
added removeComment(comment)
removed removeComment(id)
removed removeComments(ids[])
removed removeCommentsForEntry(id)


Modified:
    incubator/roller/branches/roller-newbackend/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java
    incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java
    incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java
    incubator/roller/branches/roller-newbackend/src/org/roller/model/WeblogManager.java
    incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogCategoryData.java
    incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogEntryData.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/RollerRequest.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/search/SearchResultsPageModel.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/velocity/PageModel.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoriesAction.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryEditAction.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategorySaveAction.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryManagementAction.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/website/formbeans/WebsiteFormEx.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java
    incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java
    incubator/roller/branches/roller-newbackend/tests/org/roller/RollerTestBase.java
    incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java
    incubator/roller/branches/roller-newbackend/tests/org/roller/business/CommentTest.java
    incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogCategoryTest.java
    incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogEntryTest.java

Modified: incubator/roller/branches/roller-newbackend/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java (original)
+++ incubator/roller/branches/roller-newbackend/sandbox/atomprotocol/src/org/roller/presentation/atomapi/RollerAtomHandler.java Tue Apr 18 18:00:39 2006
@@ -302,7 +302,7 @@
             WeblogManager mgr = mRoller.getWeblogManager();
             WeblogEntryData rollerEntry = createRollerEntry(website, entry);
             rollerEntry.setCreator(this.user);
-            mgr.storeWeblogEntry(rollerEntry);
+            mgr.saveWeblogEntry(rollerEntry);
             
             // Throttle one entry per second
             // (MySQL timestamp has 1 sec resolution, damnit)
@@ -324,7 +324,7 @@
         if (pathInfo.length == 3) // URI is /blogname/entries/entryid
         {
             WeblogEntryData entry =
-                mRoller.getWeblogManager().retrieveWeblogEntry(pathInfo[2]);
+                mRoller.getWeblogManager().getWeblogEntry(pathInfo[2]);
             if (entry != null && !canView(entry)) {
                 throw new Exception("ERROR not authorized to view entry");
             } else if (entry != null) {
@@ -342,7 +342,7 @@
         if (pathInfo.length == 3) // URI is /blogname/entries/entryid
         {
             WeblogEntryData rollerEntry =
-                    mRoller.getWeblogManager().retrieveWeblogEntry(pathInfo[2]);
+                    mRoller.getWeblogManager().getWeblogEntry(pathInfo[2]);
             if (canEdit(rollerEntry)) {
                 WeblogManager mgr = mRoller.getWeblogManager();
                 
@@ -354,7 +354,7 @@
                 rollerEntry.setCategory(rawUpdate.getCategory());
                 rollerEntry.setTitle(rawUpdate.getTitle());
                 
-                mgr.storeWeblogEntry(rollerEntry);
+                mgr.saveWeblogEntry(rollerEntry);
                 
                 CacheManager.invalidate(rollerEntry.getWebsite());
                 if (rollerEntry.isPublished()) {
@@ -374,7 +374,7 @@
         if (pathInfo.length == 3) // URI is /blogname/entries/entryid
         {
             WeblogEntryData rollerEntry =
-                    mRoller.getWeblogManager().retrieveWeblogEntry(pathInfo[2]);
+                    mRoller.getWeblogManager().getWeblogEntry(pathInfo[2]);
             if (canEdit(rollerEntry)) {
                 WeblogManager mgr = mRoller.getWeblogManager();
                 mgr.removeWeblogEntry(rollerEntry);

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateUserManagerImpl.java Tue Apr 18 18:00:39 2006
@@ -260,7 +260,8 @@
         this.strategy.store(perms);
         
         // add default categories
-        WeblogCategoryData rootCat = wmgr.createWeblogCategory(
+        WeblogCategoryData rootCat = new WeblogCategoryData(
+                null, // id
                 newWeblog, // newWeblog
                 null,   // parent
                 "root",  // name
@@ -272,7 +273,8 @@
         if (cats != null) {
             String[] splitcats = cats.split(",");
             for (int i=0; i<splitcats.length; i++) {
-                WeblogCategoryData c = wmgr.createWeblogCategory(
+                WeblogCategoryData c = new WeblogCategoryData(
+                        null,            // id
                         newWeblog,         // newWeblog
                         rootCat,         // parent
                         splitcats[i],    // name

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java Tue Apr 18 18:00:39 2006
@@ -63,23 +63,7 @@
     }
     
     
-    public WeblogCategoryData createWeblogCategory() {
-        return new WeblogCategoryData();
-    }
-    
-    
-    public WeblogCategoryData createWeblogCategory(
-            WebsiteData website,
-            WeblogCategoryData parent,
-            String name,
-            String description,
-            String image) throws RollerException {
-        return new WeblogCategoryData(
-                null, website, parent, name, description, image);
-    }
-    
-    
-    public void storeWeblogCategory(WeblogCategoryData cat) throws RollerException {
+    public void saveWeblogCategory(WeblogCategoryData cat) throws RollerException {
         
         if(this.isDuplicateWeblogCategoryName(cat)) {
             throw new RollerException("Duplicate category name");
@@ -113,19 +97,6 @@
     }
     
     
-    public WeblogCategoryAssoc createWeblogCategoryAssoc() {
-        return new WeblogCategoryAssoc();
-    }
-    
-    
-    public WeblogCategoryAssoc createWeblogCategoryAssoc(
-            WeblogCategoryData category,
-            WeblogCategoryData ancestor,
-            String relation) throws RollerException {
-        return new WeblogCategoryAssoc(null, category, ancestor, relation);
-    }
-    
-    
     public void moveWeblogCategoryContents(String srcId, String destId)
             throws RollerException {
         
@@ -144,7 +115,7 @@
         }
         
         // get all entries in category and subcats
-        List results = retrieveWeblogEntries(srcCd, true);
+        List results = getWeblogEntries(srcCd, true);
         
         // Loop through entries in src cat, assign them to dest cat
         Iterator iter = results.iterator();
@@ -173,73 +144,18 @@
     }
     
     
-    // TODO BACKEND: rename to storeComment() for consistency
     public void saveComment(CommentData comment) throws RollerException {
         this.strategy.store(comment);
     }
     
     
-    public void removeComment(String id) throws RollerException {
-        this.strategy.remove(id, CommentData.class);
+    public void removeComment(CommentData comment) throws RollerException {
+        this.strategy.remove(comment);
     }
     
     
-    // TODO BACKEND: refactor to use a Collection rather than array[]
-    public void removeComments(String[] ids) throws RollerException {
-        
-        if(ids.length < 1) {
-            // nothing to be done
-            return;
-        }
-        
-        // just go through the list and remove each id
-        for(int i=0; i < ids.length; i++) {
-            this.strategy.remove(ids[i], CommentData.class);
-        }
-    }
-    
-    
-    public void removeCommentsForEntry(String entryId) throws RollerException {
-        
-        if(entryId == null) {
-            throw new RollerException("cannot remove null entry");
-        }
-        
-        WeblogEntryData entry = retrieveWeblogEntry(entryId);
-        List comments = getComments(
-                null,  // website
-                entry,
-                null,  // search String
-                null,  // startDate
-                null,  // endDate
-                null,  // pending
-                null,  // approved
-                null,  // spam
-                true,  // reverse chrono order (not that it matters)
-                0,     // offset
-                -1);   // no limit
-        
-        this.removeComments(comments);
-    }
-    
-    
-    // convenience method for removing a list of comments
-    private void removeComments(List comments) throws RollerException {
-        
-        if(comments.size() < 1) {
-            // nothing to be done
-            return;
-        }
-        
-        // just go through the list and remove each commentsIT
-        Iterator commentsIT = comments.iterator();
-        while (commentsIT.hasNext()) {
-            this.strategy.remove((CommentData) commentsIT.next());
-        }
-    }
-    
     // TODO: perhaps the createAnchor() and queuePings() items should go outside this method?
-    public void storeWeblogEntry(WeblogEntryData entry) throws RollerException {
+    public void saveWeblogEntry(WeblogEntryData entry) throws RollerException {
         
         if (entry.getAnchor() == null || entry.getAnchor().trim().equals("")) {
             entry.setAnchor(this.createAnchor(entry));
@@ -573,7 +489,7 @@
     
     
     
-    public List retrieveWeblogEntries(WeblogCategoryData cat, boolean subcats)
+    public List getWeblogEntries(WeblogCategoryData cat, boolean subcats)
     throws RollerException {
         try {
             Session session = ((HibernatePersistenceStrategy)this.strategy).getSession();
@@ -860,7 +776,7 @@
     }
     
     
-    public WeblogCategoryData retrieveWeblogCategory(String id)
+    public WeblogCategoryData getWeblogCategory(String id)
     throws RollerException {
         return (WeblogCategoryData) this.strategy.load(
                 id,
@@ -921,21 +837,13 @@
         return null;
     }
     
-    //----------------------------------------------- WeblogCategoryAssoc CRUD
-    
-    
-    public WeblogCategoryAssoc retrieveWeblogCategoryAssoc(String id) throws RollerException {
-        return (WeblogCategoryAssoc)this.strategy.load(id, WeblogCategoryAssoc.class);
-    }
-    
     
-    public CommentData retrieveComment(String id) throws RollerException {
+    public CommentData getComment(String id) throws RollerException {
         return (CommentData) this.strategy.load(id, CommentData.class);
     }
     
-    //--------------------------------------------------- WeblogEntryData CRUD
     
-    public WeblogEntryData retrieveWeblogEntry(String id)
+    public WeblogEntryData getWeblogEntry(String id)
     throws RollerException {
         return (WeblogEntryData) this.strategy.load(
                 id, WeblogEntryData.class);

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/model/WeblogManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/model/WeblogManager.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/model/WeblogManager.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/model/WeblogManager.java Tue Apr 18 18:00:39 2006
@@ -17,12 +17,12 @@
 /**
  * Interface to weblog entry, category and comment management.
  */
-public interface WeblogManager extends Serializable {
+public interface WeblogManager {
     
     public static final String CATEGORY_ATT = "category.att";
     
     
-    public void storeWeblogEntry(WeblogEntryData entry) throws RollerException;
+    public void saveWeblogEntry(WeblogEntryData entry) throws RollerException;
     
     
     public void removeWeblogEntry(WeblogEntryData entry) throws RollerException;
@@ -31,7 +31,7 @@
     /**
      * Get weblog entry by ID
      */
-    public WeblogEntryData retrieveWeblogEntry(String id) throws RollerException;
+    public WeblogEntryData getWeblogEntry(String id) throws RollerException;
     
     
     /** 
@@ -145,7 +145,7 @@
      * @param subcats True if sub-categories are to be fetched.
      * @return        List of weblog entries in category.
      */
-    public List retrieveWeblogEntries(WeblogCategoryData cat, boolean subcats) 
+    public List getWeblogEntries(WeblogCategoryData cat, boolean subcats) 
             throws RollerException;
     
     
@@ -216,19 +216,7 @@
             throws RollerException;
     
     
-    /** Create new weblog category, NOT a persistent instance. */
-    public WeblogCategoryData createWeblogCategory();
-    
-    /** Create new weblog category, NOT a persistent instance. */
-    public WeblogCategoryData createWeblogCategory(
-            WebsiteData website,
-            WeblogCategoryData parent,
-            String name,
-            String description,
-            String image) throws RollerException;
-    
-    
-    public void storeWeblogCategory(WeblogCategoryData cat) throws RollerException;
+    public void saveWeblogCategory(WeblogCategoryData cat) throws RollerException;
     
     
     /**
@@ -247,7 +235,7 @@
     /**
      * Get category by ID
      */
-    public WeblogCategoryData retrieveWeblogCategory(String id) throws RollerException;
+    public WeblogCategoryData getWeblogCategory(String id) throws RollerException;
     
     
     /**
@@ -293,23 +281,6 @@
     public String getPath(WeblogCategoryData category) throws RollerException;
     
     
-    /** Create new weblog category assoc, NOT a persistent instance. */
-    public WeblogCategoryAssoc createWeblogCategoryAssoc();
-    
-    
-    /** Create new weblog category assoc, NOT a persistent instance. */
-    public WeblogCategoryAssoc createWeblogCategoryAssoc(
-            WeblogCategoryData category,
-            WeblogCategoryData ancestor,
-            String relation) throws RollerException;
-    
-    /**
-     * Get category assoc. by ID
-     */
-    public WeblogCategoryAssoc retrieveWeblogCategoryAssoc(String id)
-            throws RollerException;
-    
-    
     public Assoc getWeblogCategoryParentAssoc(WeblogCategoryData data) throws RollerException;
     
     public List getWeblogCategoryChildAssocs(WeblogCategoryData data) throws RollerException;
@@ -322,29 +293,13 @@
     public void saveComment(CommentData comment) 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;
+    public void removeComment(CommentData comment) throws RollerException;
     
     
     /**
      * Get comment by ID
      */
-    public CommentData retrieveComment(String id) throws RollerException;
+    public CommentData getComment(String id) throws RollerException;
     
     
     /**

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogCategoryData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogCategoryData.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogCategoryData.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogCategoryData.java Tue Apr 18 18:00:39 2006
@@ -304,11 +304,10 @@
         HierarchicalPersistentObject associatedObject, 
         String relation) throws RollerException
     {
-        WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
-        return wmgr.createWeblogCategoryAssoc(
-            (WeblogCategoryData)object, 
-            (WeblogCategoryData)associatedObject, 
-            relation);
+        return new WeblogCategoryAssoc(null,
+                (WeblogCategoryData)object,
+                (WeblogCategoryData)associatedObject,
+                relation);
     }
     
     
@@ -326,7 +325,7 @@
         throws RollerException
     {
         WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
-        return wmgr.retrieveWeblogEntries(this, subcats);
+        return wmgr.getWeblogEntries(this, subcats);
     }
 
     //-------------------------------------------------------- Good citizenship

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogEntryData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogEntryData.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogEntryData.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/pojos/WeblogEntryData.java Tue Apr 18 18:00:39 2006
@@ -182,7 +182,7 @@
     public void setCategoryId(String id) throws RollerException
     {
         WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
-        setCategory(wmgr.retrieveWeblogCategory(id));
+        setCategory(wmgr.getWeblogCategory(id));
     }
 
     /** 

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/RollerRequest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/RollerRequest.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/RollerRequest.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/RollerRequest.java Tue Apr 18 18:00:39 2006
@@ -637,7 +637,7 @@
                 {
                     mWeblogCategory = 
                         RollerFactory.getRoller()
-                            .getWeblogManager().retrieveWeblogCategory(id);
+                            .getWeblogManager().getWeblogCategory(id);
                 }
                 catch (RollerException e)
                 {
@@ -789,7 +789,7 @@
                 if ( entryid != null )
                 {
                     WeblogManager weblogMgr = RollerFactory.getRoller().getWeblogManager();
-                    mWeblogEntry = weblogMgr.retrieveWeblogEntry(entryid);                
+                    mWeblogEntry = weblogMgr.getWeblogEntry(entryid);                
                 
                     // We can use entry to find the website, if we don't have one
                     if ( mWeblogEntry != null && mWebsite == null )

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/search/SearchResultsPageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/search/SearchResultsPageModel.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/search/SearchResultsPageModel.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/search/SearchResultsPageModel.java Tue Apr 18 18:00:39 2006
@@ -180,13 +180,13 @@
                 // "wrong user" results have been reported
                 if (handle.equals(rreq.getWebsite().getHandle())) {
                     // get real entry for display on user's site
-                    entry = weblogMgr.retrieveWeblogEntry(
+                    entry = weblogMgr.getWeblogEntry(
                             doc.getField(FieldConstants.ID).stringValue() );
                 }
             } else {
                 // if user is not enabled, website will be null
                 //entry = buildSearchEntry(website, doc);
-                entry = weblogMgr.retrieveWeblogEntry(
+                entry = weblogMgr.getWeblogEntry(
                         doc.getField(FieldConstants.ID).stringValue() );
                 if (doc.getField(FieldConstants.CATEGORY) != null) {
                     categories.add(

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/velocity/PageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/velocity/PageModel.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/velocity/PageModel.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/velocity/PageModel.java Tue Apr 18 18:00:39 2006
@@ -166,7 +166,7 @@
     /** Get number of approved non-spam comments for entry */
     public int getCommentCount(String entryId, boolean noSpam, boolean approvedOnly) {
         try {
-            WeblogEntryData entry = mWeblogMgr.retrieveWeblogEntry(entryId);
+            WeblogEntryData entry = mWeblogMgr.getWeblogEntry(entryId);
             return entry.getComments(noSpam, approvedOnly).size();
         } catch (RollerException alreadyLogged) {}
         return 0;

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoriesAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoriesAction.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoriesAction.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoriesAction.java Tue Apr 18 18:00:39 2006
@@ -115,20 +115,20 @@
                 // Move subCategories to new category.
                 String Categories[] = form.getSelectedCategories();
                 WeblogCategoryData parent = 
-                    wmgr.retrieveWeblogCategory(form.getMoveToCategoryId());
+                    wmgr.getWeblogCategory(form.getMoveToCategoryId());
                 if (null != Categories)
                 {
                     for (int i = 0; i < Categories.length; i++)
                     {
                         WeblogCategoryData cd = 
-                            wmgr.retrieveWeblogCategory(Categories[i]); 
+                            wmgr.getWeblogCategory(Categories[i]); 
                         
                         // Don't move category into itself.                  
                         if (    !cd.getId().equals(parent.getId()) 
                              && !parent.descendentOf(cd))
                         {
                             cd.setParent(parent);
-                            wmgr.storeWeblogCategory(cd);
+                            wmgr.saveWeblogCategory(cd);
                         }
                         else 
                         {
@@ -209,7 +209,7 @@
             }
             else 
             {
-                cat = wmgr.retrieveWeblogCategory(catId);  
+                cat = wmgr.getWeblogCategory(catId);  
                 website = cat.getWebsite();
             }
             form.setId(cat.getId());

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java Tue Apr 18 18:00:39 2006
@@ -44,7 +44,7 @@
 
         String catid = request.getParameter(RollerRequest.WEBLOGCATEGORYID_KEY);
         WeblogCategoryData catToDelete = 
-                wmgr.retrieveWeblogCategory(catid);
+                wmgr.getWeblogCategory(catid);
         RollerSession rses = RollerSession.getRollerSession(request);
         if (rses.isUserAuthorizedToAuthor(catToDelete.getWebsite()))
         {
@@ -57,7 +57,7 @@
             {
                 // Present CategoryDeleteOK? page to user
                 RollerRequest rreq = RollerRequest.getRollerRequest(request);
-                WeblogCategoryData theCat = wmgr.retrieveWeblogCategory(catid);
+                WeblogCategoryData theCat = wmgr.getWeblogCategory(catid);
                 Iterator allCats = 
                     wmgr.getWeblogCategories(theCat.getWebsite()).iterator();
                 List destCats = new LinkedList();

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryEditAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryEditAction.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryEditAction.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategoryEditAction.java Tue Apr 18 18:00:39 2006
@@ -62,7 +62,7 @@
             WeblogCategoryData cd = rreq.getWeblogCategory();
             request.setAttribute("state","correcting");    
             
-            parentCat = wmgr.retrieveWeblogCategory(cd.getId());          
+            parentCat = wmgr.getWeblogCategory(cd.getId());          
             pageModel = new BasePageModel(
                 "categoryForm.correct.title", request, response, mapping);
             pageModel.setWebsite(cd.getWebsite());
@@ -73,7 +73,7 @@
             request.setAttribute("state","add");
             
             String pid = request.getParameter(RollerRequest.PARENTID_KEY);
-            parentCat = wmgr.retrieveWeblogCategory(pid);             
+            parentCat = wmgr.getWeblogCategory(pid);             
             form.setParentId(parentCat.getId()); 
             
             pageModel = new BasePageModel(

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategorySaveAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategorySaveAction.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategorySaveAction.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CategorySaveAction.java Tue Apr 18 18:00:39 2006
@@ -44,13 +44,13 @@
         WeblogCategoryData cd = null;
         if (null != form.getId() && !form.getId().trim().equals("")) 
         {
-            cd = wmgr.retrieveWeblogCategory(form.getId());
+            cd = wmgr.getWeblogCategory(form.getId());
         }
         else 
         {
-            cd = wmgr.createWeblogCategory();
+            cd = new WeblogCategoryData();
             String pid = form.getParentId();
-            WeblogCategoryData parentCat = wmgr.retrieveWeblogCategory(pid);
+            WeblogCategoryData parentCat = wmgr.getWeblogCategory(pid);
             cd.setWebsite(parentCat.getWebsite());
             cd.setParent(parentCat);
         }
@@ -60,7 +60,7 @@
             rses.getAuthenticatedUser(), PermissionsData.AUTHOR))
         {
             form.copyTo(cd, request.getLocale());
-            wmgr.storeWeblogCategory(cd);
+            wmgr.saveWeblogCategory(cd);
             RollerFactory.getRoller().flush();
             
             // notify caches of object invalidation

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CommentManagementAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CommentManagementAction.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CommentManagementAction.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/CommentManagementAction.java Tue Apr 18 18:00:39 2006
@@ -118,10 +118,15 @@
                 WeblogManager mgr= RollerFactory.getRoller().getWeblogManager();
                 
                 // delete all comments with delete box checked
+                CommentData deleteComment = null;
                 String[] deleteIds = queryForm.getDeleteComments();
-                List deletedList = Arrays.asList(deleteIds); 
+                List deletedList = Arrays.asList(deleteIds);
                 if (deleteIds != null && deleteIds.length > 0) {
-                    mgr.removeComments(deleteIds);
+                    for(int j=0; j < deleteIds.length; j++) {
+                        deleteComment = mgr.getComment(deleteIds[j]);
+                        
+                        mgr.removeComment(deleteComment);
+                    }
                 }
                 
                 // Collect comments approved for first time, so we can send
@@ -133,7 +138,7 @@
                 List flushList = new ArrayList();
                 for (int i=0; i<ids.length; i++) {                    
                     if (deletedList.contains(ids[i])) continue;                    
-                    CommentData comment = mgr.retrieveComment(ids[i]);
+                    CommentData comment = mgr.getComment(ids[i]);
                     
                     // apply spam checkbox 
                     List spamIds = Arrays.asList(queryForm.getSpamComments());

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java Tue Apr 18 18:00:39 2006
@@ -136,7 +136,7 @@
             WeblogEntryData entry = rreq.getWeblogEntry();
             WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm;
             if (entry == null && form.getId() != null) {
-                entry = wmgr.retrieveWeblogEntry(form.getId());
+                entry = wmgr.getWeblogEntry(form.getId());
             }
             if (entry == null) {
                 ResourceBundle resources = ResourceBundle.getBundle(
@@ -260,7 +260,7 @@
                     entry.setCreator(ud);
                     entry.setWebsite( site );
                 } else {
-                    entry = weblogMgr.retrieveWeblogEntry(form.getId());
+                    entry = weblogMgr.getWeblogEntry(form.getId());
                 }
                 
                 mLogger.debug("setting update time now");
@@ -301,7 +301,7 @@
                 }
 
                 mLogger.debug("Saving entry");
-                weblogMgr.storeWeblogEntry(entry);
+                weblogMgr.saveWeblogEntry(entry);
                 RollerFactory.getRoller().flush();
                 
                 mLogger.debug("Populating form");
@@ -526,7 +526,7 @@
             Roller roller = RollerFactory.getRoller();
             WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm;
             WeblogEntryData wd =
-                    roller.getWeblogManager().retrieveWeblogEntry(wf.getId());
+                    roller.getWeblogManager().getWeblogEntry(wf.getId());
             RollerSession rses =
                     RollerSession.getRollerSession(request);
             if (     rses.isUserAuthorizedToAuthor(wd.getWebsite())
@@ -562,7 +562,7 @@
         try {
             WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
             WeblogEntryData wd =
-                    mgr.retrieveWeblogEntry(request.getParameter("id"));
+                    mgr.getWeblogEntry(request.getParameter("id"));
             RollerSession rses =
                     RollerSession.getRollerSession(request);
             if (     rses.isUserAuthorizedToAuthor(wd.getWebsite())
@@ -718,7 +718,7 @@
             Roller roller = RollerFactory.getRoller();
             RollerContext rctx= RollerContext.getRollerContext();
             WeblogManager wmgr= roller.getWeblogManager();
-            entry = wmgr.retrieveWeblogEntry(entryid);
+            entry = wmgr.getWeblogEntry(entryid);
             
             RollerSession rses = RollerSession.getRollerSession(request);
             if (rses.isUserAuthorizedToAuthor(entry.getWebsite())) {

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryManagementAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryManagementAction.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryManagementAction.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/WeblogEntryManagementAction.java Tue Apr 18 18:00:39 2006
@@ -103,7 +103,7 @@
 
             if (null != queryForm.getCategoryId() && !queryForm.getCategoryId().equals("")) {
                 WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
-                WeblogCategoryData cd = wmgr.retrieveWeblogCategory(queryForm.getCategoryId());
+                WeblogCategoryData cd = wmgr.getWeblogCategory(queryForm.getCategoryId());
                 category = cd.getPath();
             }
 

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/website/formbeans/WebsiteFormEx.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/website/formbeans/WebsiteFormEx.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/website/formbeans/WebsiteFormEx.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/website/formbeans/WebsiteFormEx.java Tue Apr 18 18:00:39 2006
@@ -168,14 +168,14 @@
         if (getDefaultCategoryId() != null) 
         {
             WeblogCategoryData defaultCat = 
-                wmgr.retrieveWeblogCategory(getDefaultCategoryId());
+                wmgr.getWeblogCategory(getDefaultCategoryId());
             dataHolder.setDefaultCategory(defaultCat);
         }
 
         if (getBloggerCategoryId() != null) 
         {
             WeblogCategoryData bloggerCat = 
-                wmgr.retrieveWeblogCategory(getBloggerCategoryId());
+                wmgr.getWeblogCategory(getBloggerCategoryId());
             dataHolder.setBloggerCategory(bloggerCat);
         }
     }

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java Tue Apr 18 18:00:39 2006
@@ -68,7 +68,7 @@
         
         Roller roller = RollerFactory.getRoller();
         WeblogManager weblogMgr = roller.getWeblogManager();
-        WeblogEntryData entry = weblogMgr.retrieveWeblogEntry(postid);
+        WeblogEntryData entry = weblogMgr.getWeblogEntry(postid);
         
         validate(entry.getWebsite().getHandle(), userid, password);
         
@@ -316,7 +316,7 @@
                 
                 Roller roller = RollerFactory.getRoller();
                 WeblogManager weblogMgr = roller.getWeblogManager();
-                WeblogEntryData entry = weblogMgr.retrieveWeblogEntry(postid);
+                WeblogEntryData entry = weblogMgr.getWeblogEntry(postid);
                 entry.setText(content);
                 entry.setUpdateTime(current);
                 if (Boolean.valueOf(publish).booleanValue()) {
@@ -326,7 +326,7 @@
                 }
                 
                 // save the entry
-                weblogMgr.storeWeblogEntry(entry);
+                weblogMgr.saveWeblogEntry(entry);
                 roller.flush();
                 
                 // notify cache
@@ -401,7 +401,7 @@
             }
             
             // save the entry
-            weblogMgr.storeWeblogEntry(entry);
+            weblogMgr.saveWeblogEntry(entry);
             roller.flush();
             
             // notify cache

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java (original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java Tue Apr 18 18:00:39 2006
@@ -113,7 +113,7 @@
         
         Roller roller = RollerFactory.getRoller();
         WeblogManager weblogMgr = roller.getWeblogManager();
-        WeblogEntryData entry = weblogMgr.retrieveWeblogEntry(postid);
+        WeblogEntryData entry = weblogMgr.getWeblogEntry(postid);
         
         validate(entry.getWebsite().getHandle(), userid,password);
         
@@ -158,7 +158,7 @@
             }
             
             // save the entry
-            weblogMgr.storeWeblogEntry(entry);
+            weblogMgr.saveWeblogEntry(entry);
             roller.flush();
             
             // notify cache
@@ -257,7 +257,7 @@
             }
             
             // save the entry
-            weblogMgr.storeWeblogEntry(entry);
+            weblogMgr.saveWeblogEntry(entry);
             roller.flush();
             
             // notify cache
@@ -293,7 +293,7 @@
         
         Roller roller = RollerFactory.getRoller();
         WeblogManager weblogMgr = roller.getWeblogManager();
-        WeblogEntryData entry = weblogMgr.retrieveWeblogEntry(postid);
+        WeblogEntryData entry = weblogMgr.getWeblogEntry(postid);
         
         validate(entry.getWebsite().getHandle(), userid,password);
         

Modified: incubator/roller/branches/roller-newbackend/tests/org/roller/RollerTestBase.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/tests/org/roller/RollerTestBase.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/tests/org/roller/RollerTestBase.java (original)
+++ incubator/roller/branches/roller-newbackend/tests/org/roller/RollerTestBase.java Tue Apr 18 18:00:39 2006
@@ -257,7 +257,7 @@
                     day,        // pubTime
                     day,        // updateTime
                     WeblogEntryData.PUBLISHED ); // publishEntry
-            wmgr.storeWeblogEntry(wd);
+            wmgr.saveWeblogEntry(wd);
             
             // roll calendar back to today
             mCalendar.roll(Calendar.DATE, false);
@@ -284,7 +284,7 @@
                     day,        // pubTime
                     day,        // updateTime
                     status ); // publishEntry
-            wmgr.storeWeblogEntry(wd);
+            wmgr.saveWeblogEntry(wd);
             
             // add at beginning of list
             mEntriesCreated.add(0, wd);
@@ -317,13 +317,14 @@
         
         // create categories under the category passed in
         for ( int j=0; j<mCatCount; j++ ) {
-            WeblogCategoryData cat = wmgr.createWeblogCategory(
+            WeblogCategoryData cat = new WeblogCategoryData(
+                    null,                           // id
                     website,                       // website
                     rootCat,                       // parent
                     rootCat.getName()+"-cat"+j,    // name
                     "desc",                        // description
                     null );                       // image
-            wmgr.storeWeblogCategory(cat);
+            wmgr.saveWeblogCategory(cat);
             mCategoriesCreated.add(cat);
             mLogger.debug("   Created cat ["+cat.getId()+"]"+cat.getName());
             

Modified: incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java (original)
+++ incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java Tue Apr 18 18:00:39 2006
@@ -157,10 +157,10 @@
         
         // store entry
         WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
-        mgr.storeWeblogEntry(testEntry);
+        mgr.saveWeblogEntry(testEntry);
         
         // query for object
-        WeblogEntryData entry = mgr.retrieveWeblogEntry(testEntry.getId());
+        WeblogEntryData entry = mgr.getWeblogEntry(testEntry.getId());
         
         if(entry == null)
             throw new RollerException("error setting up weblog entry");
@@ -176,7 +176,7 @@
         
         // lookup the entry
         WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
-        WeblogEntryData entry = mgr.retrieveWeblogEntry(id);
+        WeblogEntryData entry = mgr.getWeblogEntry(id);
         
         // remove the entry
         mgr.removeWeblogEntry(entry);
@@ -205,7 +205,7 @@
         mgr.saveComment(testComment);
         
         // query for object
-        CommentData comment = mgr.retrieveComment(testComment.getId());
+        CommentData comment = mgr.getComment(testComment.getId());
         
         if(comment == null)
             throw new RollerException("error setting up comment");
@@ -219,9 +219,12 @@
      */
     public static void teardownComment(String id) throws Exception {
         
-        // remove the comment
+        // lookup the comment
         WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
-        mgr.removeComment(id);
+        CommentData comment = mgr.getComment(id);
+        
+        // remove the comment
+        mgr.removeComment(comment);
     }
     
     

Modified: incubator/roller/branches/roller-newbackend/tests/org/roller/business/CommentTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/tests/org/roller/business/CommentTest.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/tests/org/roller/business/CommentTest.java (original)
+++ incubator/roller/branches/roller-newbackend/tests/org/roller/business/CommentTest.java Tue Apr 18 18:00:39 2006
@@ -100,7 +100,7 @@
         
         // make sure comment was created
         comment = null;
-        comment = mgr.retrieveComment(id);
+        comment = mgr.getComment(id);
         assertNotNull(comment);
         assertEquals("this is a test comment", comment.getContent());
         
@@ -111,17 +111,17 @@
         
         // make sure comment was updated
         comment = null;
-        comment = mgr.retrieveComment(id);
+        comment = mgr.getComment(id);
         assertNotNull(comment);
         assertEquals("testtest", comment.getContent());
         
         // delete a comment
-        mgr.removeComment(id);
+        mgr.removeComment(comment);
         TestUtils.endSession(true);
         
         // make sure comment was deleted
         comment = null;
-        comment = mgr.retrieveComment(id);
+        comment = mgr.getComment(id);
         assertNull(comment);
     }
     
@@ -186,40 +186,40 @@
     /**
      * Test extra CRUD methods ... removeComments(ids), removeCommentsForEntry
      */
-    public void testAdvancedCommentCRUD() throws Exception {
-        
-        WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
-        List comments = null;
-        
-        // we need some comments to play with
-        CommentData comment1 = TestUtils.setupComment("comment1", testEntry);
-        CommentData comment2 = TestUtils.setupComment("comment2", testEntry);
-        CommentData comment3 = TestUtils.setupComment("comment3", testEntry);
-        CommentData comment4 = TestUtils.setupComment("comment4", testEntry);
-        TestUtils.endSession(true);
-        
-        // remove a collection of comments
-        String[] delComments = new String[2];
-        delComments[0] = comment1.getId();
-        delComments[1] = comment2.getId();
-        mgr.removeComments(delComments);
-        TestUtils.endSession(true);
-        
-        // make sure comments were deleted
-        comments = null;
-        comments = mgr.getComments(null, null, null, null, null, null, null, null, false, 0, -1);
-        assertNotNull(comments);
-        assertEquals(2, comments.size());
-        
-        // remove all comments for entry
-        mgr.removeCommentsForEntry(testEntry.getId());
-        TestUtils.endSession(true);
-        
-        // make sure comments were deleted
-        comments = null;
-        comments = mgr.getComments(null, null, null, null, null, null, null, null, false, 0, -1);
-        assertNotNull(comments);
-        assertEquals(0, comments.size());
-    }
+//    public void testAdvancedCommentCRUD() throws Exception {
+//        
+//        WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
+//        List comments = null;
+//        
+//        // we need some comments to play with
+//        CommentData comment1 = TestUtils.setupComment("comment1", testEntry);
+//        CommentData comment2 = TestUtils.setupComment("comment2", testEntry);
+//        CommentData comment3 = TestUtils.setupComment("comment3", testEntry);
+//        CommentData comment4 = TestUtils.setupComment("comment4", testEntry);
+//        TestUtils.endSession(true);
+//        
+//        // remove a collection of comments
+//        String[] delComments = new String[2];
+//        delComments[0] = comment1.getId();
+//        delComments[1] = comment2.getId();
+//        mgr.removeComments(delComments);
+//        TestUtils.endSession(true);
+//        
+//        // make sure comments were deleted
+//        comments = null;
+//        comments = mgr.getComments(null, null, null, null, null, null, null, null, false, 0, -1);
+//        assertNotNull(comments);
+//        assertEquals(2, comments.size());
+//        
+//        // remove all comments for entry
+//        mgr.removeCommentsForEntry(testEntry.getId());
+//        TestUtils.endSession(true);
+//        
+//        // make sure comments were deleted
+//        comments = null;
+//        comments = mgr.getComments(null, null, null, null, null, null, null, null, false, 0, -1);
+//        assertNotNull(comments);
+//        assertEquals(0, comments.size());
+//    }
     
 }

Modified: incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogCategoryTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogCategoryTest.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogCategoryTest.java (original)
+++ incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogCategoryTest.java Tue Apr 18 18:00:39 2006
@@ -91,13 +91,13 @@
         newCat.setName("catTestCategory");
         newCat.setParent(testWeblog.getDefaultCategory());
         newCat.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(newCat);
+        mgr.saveWeblogCategory(newCat);
         String id = newCat.getId();
         TestUtils.endSession(true);
         
         // make sure category was added
         cat = null;
-        cat = mgr.retrieveWeblogCategory(id);
+        cat = mgr.getWeblogCategory(id);
         assertNotNull(cat);
         assertEquals(newCat, cat);
         
@@ -107,12 +107,12 @@
         
         // update category
         cat.setName("testtest");
-        mgr.storeWeblogCategory(cat);
+        mgr.saveWeblogCategory(cat);
         TestUtils.endSession(true);
         
         // verify category was updated
         cat = null;
-        cat = mgr.retrieveWeblogCategory(id);
+        cat = mgr.getWeblogCategory(id);
         assertNotNull(cat);
         assertEquals("testtest", cat.getName());
         
@@ -122,7 +122,7 @@
         
         // make sure category was removed
         cat = null;
-        mgr.retrieveWeblogCategory(id);
+        mgr.getWeblogCategory(id);
         assertNull(cat);
         
         // make sure category count decreased
@@ -146,36 +146,36 @@
         
         root = mgr.getRootWeblogCategory(testWeblog);
         
-        WeblogCategoryData f1 = mgr.createWeblogCategory();
+        WeblogCategoryData f1 = new WeblogCategoryData();
         f1.setName("f1");
         f1.setParent(root);
         f1.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(f1);
+        mgr.saveWeblogCategory(f1);
         
-        WeblogCategoryData f2 = mgr.createWeblogCategory();
+        WeblogCategoryData f2 = new WeblogCategoryData();
         f2.setName("f2");
         f2.setParent(f1);
         f2.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(f2);
+        mgr.saveWeblogCategory(f2);
         
-        WeblogCategoryData f3 = mgr.createWeblogCategory();
+        WeblogCategoryData f3 = new WeblogCategoryData();
         f3.setName("f3");
         f3.setParent(f2);
         f3.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(f3);
+        mgr.saveWeblogCategory(f3);
         
         TestUtils.endSession(true);
         
         // check count of descendents and ancestors
-        f1 = mgr.retrieveWeblogCategory(f1.getId());
+        f1 = mgr.getWeblogCategory(f1.getId());
         assertEquals(2, f1.getAllDescendentAssocs().size());
         assertEquals(1, f1.getAncestorAssocs().size());
         
-        f2 = mgr.retrieveWeblogCategory(f2.getId());
+        f2 = mgr.getWeblogCategory(f2.getId());
         assertEquals(1, f2.getAllDescendentAssocs().size());
         assertEquals(2, f2.getAncestorAssocs().size());
         
-        f3 = mgr.retrieveWeblogCategory(f3.getId());
+        f3 = mgr.getWeblogCategory(f3.getId());
         assertEquals(0, f3.getAllDescendentAssocs().size());
         assertEquals(3, f3.getAncestorAssocs().size());
         
@@ -207,36 +207,36 @@
         WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
         
         // add some categories and entries to test with
-        WeblogCategoryData dest = mgr.createWeblogCategory();
+        WeblogCategoryData dest = new WeblogCategoryData();
         dest.setName("c0");
         dest.setParent(mgr.getRootWeblogCategory(testWeblog));
         dest.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(dest);
+        mgr.saveWeblogCategory(dest);
         
-        WeblogCategoryData c1 = mgr.createWeblogCategory();
+        WeblogCategoryData c1 = new WeblogCategoryData();
         c1.setName("c1");
         c1.setParent(mgr.getRootWeblogCategory(testWeblog));
         c1.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(c1);
+        mgr.saveWeblogCategory(c1);
         
-        WeblogCategoryData c2 = mgr.createWeblogCategory();
+        WeblogCategoryData c2 = new WeblogCategoryData();
         c2.setName("c2");
         c2.setParent(c1);
         c2.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(c2);
+        mgr.saveWeblogCategory(c2);
         
-        WeblogCategoryData c3 = mgr.createWeblogCategory();
+        WeblogCategoryData c3 = new WeblogCategoryData();
         c3.setName("c3");
         c3.setParent(c2);
         c3.setWebsite(testWeblog);
-        mgr.storeWeblogCategory(c3);
+        mgr.saveWeblogCategory(c3);
         
         TestUtils.endSession(true);
         
-        c1 = mgr.retrieveWeblogCategory(c1.getId());
-        c2 = mgr.retrieveWeblogCategory(c2.getId());
-        c3 = mgr.retrieveWeblogCategory(c3.getId());
-        dest = mgr.retrieveWeblogCategory(dest.getId());
+        c1 = mgr.getWeblogCategory(c1.getId());
+        c2 = mgr.getWeblogCategory(c2.getId());
+        c3 = mgr.getWeblogCategory(c3.getId());
+        dest = mgr.getWeblogCategory(dest.getId());
         
         WeblogEntryData e1 = TestUtils.setupWeblogEntry("e1", c1, testWeblog, testUser);
         WeblogEntryData e2 = TestUtils.setupWeblogEntry("e2", c2, testWeblog, testUser);
@@ -252,14 +252,14 @@
         
         // move contents of source category c1 to destination catetory dest
         c1.setParent(dest);
-        mgr.storeWeblogCategory(c1);
+        mgr.saveWeblogCategory(c1);
         TestUtils.endSession(true);
         
         // after move, verify number of entries in each category
-        dest = mgr.retrieveWeblogCategory(dest.getId());
-        c1 = mgr.retrieveWeblogCategory(c1.getId());
-        c2 = mgr.retrieveWeblogCategory(c2.getId());
-        c3 = mgr.retrieveWeblogCategory(c3.getId());
+        dest = mgr.getWeblogCategory(dest.getId());
+        c1 = mgr.getWeblogCategory(c1.getId());
+        c2 = mgr.getWeblogCategory(c2.getId());
+        c3 = mgr.getWeblogCategory(c3.getId());
         
         assertEquals(3, dest.retrieveWeblogEntries(true).size());
         assertEquals(0, dest.retrieveWeblogEntries(false).size());

Modified: incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogEntryTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogEntryTest.java?rev=395096&r1=395095&r2=395096&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogEntryTest.java (original)
+++ incubator/roller/branches/roller-newbackend/tests/org/roller/business/WeblogEntryTest.java Tue Apr 18 18:00:39 2006
@@ -90,23 +90,23 @@
         testEntry.setCategory(testWeblog.getDefaultCategory());
         
         // create a weblog entry
-        mgr.storeWeblogEntry(testEntry);
+        mgr.saveWeblogEntry(testEntry);
         String id = testEntry.getId();
         TestUtils.endSession(true);
         
         // make sure entry was created
-        entry = mgr.retrieveWeblogEntry(id);
+        entry = mgr.getWeblogEntry(id);
         assertNotNull(entry);
         assertEquals(testEntry, entry);
         
         // update a weblog entry
         entry.setTitle("testtest");
-        mgr.storeWeblogEntry(entry);
+        mgr.saveWeblogEntry(entry);
         TestUtils.endSession(true);
         
         // make sure entry was updated
         entry = null;
-        entry = mgr.retrieveWeblogEntry(id);
+        entry = mgr.getWeblogEntry(id);
         assertNotNull(entry);
         assertEquals("testtest", entry.getTitle());
         
@@ -116,7 +116,7 @@
         
         // make sure entry was deleted
         entry = null;
-        entry = mgr.retrieveWeblogEntry(id);
+        entry = mgr.getWeblogEntry(id);
         assertNull(entry);
     }
     
@@ -140,11 +140,11 @@
         entry2.setPinnedToMain(Boolean.TRUE);
         entry2.setUpdateTime(new java.sql.Timestamp(entry2.getUpdateTime().getTime()+8822384));
         entry2.setPubTime(entry2.getUpdateTime());
-        mgr.storeWeblogEntry(entry2);
+        mgr.saveWeblogEntry(entry2);
         entry3.setStatus(WeblogEntryData.DRAFT);
         entry3.setUpdateTime(new java.sql.Timestamp(entry3.getUpdateTime().getTime()+348829384));
         entry3.setPubTime(entry3.getUpdateTime());
-        mgr.storeWeblogEntry(entry3);
+        mgr.saveWeblogEntry(entry3);
         
         TestUtils.endSession(true);
         
@@ -154,7 +154,7 @@
         
         // get entry by id
         entry = null;
-        entry = mgr.retrieveWeblogEntry(entry1.getId());
+        entry = mgr.getWeblogEntry(entry1.getId());
         assertNotNull(entry);
         assertEquals(entry1.getAnchor(), entry.getAnchor());
         
@@ -173,7 +173,7 @@
         
         // get all entries in category
         entries = null;
-        entries = mgr.retrieveWeblogEntries(testWeblog.getDefaultCategory(), false);
+        entries = mgr.getWeblogEntries(testWeblog.getDefaultCategory(), false);
         assertNotNull(entries);
         assertEquals(3, entries.size());
         



Mime
View raw message