Return-Path: Delivered-To: apmail-incubator-roller-commits-archive@www.apache.org Received: (qmail 52025 invoked from network); 19 Apr 2006 19:33:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 19:33:06 -0000 Received: (qmail 80672 invoked by uid 500); 19 Apr 2006 19:33:05 -0000 Delivered-To: apmail-incubator-roller-commits-archive@incubator.apache.org Received: (qmail 80635 invoked by uid 500); 19 Apr 2006 19:33:05 -0000 Mailing-List: contact roller-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: roller-dev@incubator.apache.org Delivered-To: mailing list roller-commits@incubator.apache.org Received: (qmail 80623 invoked by uid 99); 19 Apr 2006 19:33:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 12:33:05 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 19 Apr 2006 12:33:04 -0700 Received: (qmail 51815 invoked by uid 65534); 19 Apr 2006 19:32:44 -0000 Message-ID: <20060419193244.51814.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r395366 - in /incubator/roller/branches/roller-newbackend: src/org/roller/business/hibernate/ src/org/roller/model/ src/org/roller/presentation/weblog/actions/ tests/org/roller/ tests/org/roller/business/ Date: Wed, 19 Apr 2006 19:32:43 -0000 To: roller-commits@incubator.apache.org From: agilliland@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: agilliland Date: Wed Apr 19 12:32:41 2006 New Revision: 395366 URL: http://svn.apache.org/viewcvs?rev=395366&view=rev Log: manager method name refactorings for AutoPingManager. storeXXX() -> saveXXX() retrieveXXX() -> getXXX() createXXX() -> addXXX() (or is removed) Modified: incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java incubator/roller/branches/roller-newbackend/src/org/roller/model/AutoPingManager.java incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/PingSetupAction.java incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java incubator/roller/branches/roller-newbackend/tests/org/roller/business/PingsTest.java Modified: incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java?rev=395366&r1=395365&r2=395366&view=diff ============================================================================== --- incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java (original) +++ incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernateAutoPingManagerImpl.java Wed Apr 19 12:32:41 2006 @@ -46,18 +46,12 @@ } - public AutoPingData createAutoPing(PingTargetData pingTarget, WebsiteData website) - throws RollerException { - return new AutoPingData(null, pingTarget, website); - } - - - public AutoPingData retrieveAutoPing(String id) throws RollerException { + public AutoPingData getAutoPing(String id) throws RollerException { return (AutoPingData) strategy.load(id, AutoPingData.class); } - public void storeAutoPing(AutoPingData autoPing) throws RollerException { + public void saveAutoPing(AutoPingData autoPing) throws RollerException { strategy.store(autoPing); } Modified: incubator/roller/branches/roller-newbackend/src/org/roller/model/AutoPingManager.java URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/model/AutoPingManager.java?rev=395366&r1=395365&r2=395366&view=diff ============================================================================== --- incubator/roller/branches/roller-newbackend/src/org/roller/model/AutoPingManager.java (original) +++ incubator/roller/branches/roller-newbackend/src/org/roller/model/AutoPingManager.java Wed Apr 19 12:32:41 2006 @@ -8,7 +8,6 @@ package org.roller.model; -import java.io.Serializable; import java.util.Collection; import java.util.List; import org.roller.RollerException; @@ -21,19 +20,7 @@ /** * Manages autoping storage/retrieval, queries and queue. */ -public interface AutoPingManager extends Serializable { - - - /** - * 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 - * @return new auto ping configuration - * @throws RollerException - */ - public AutoPingData createAutoPing(PingTargetData pingTarget, WebsiteData website) - throws RollerException; +public interface AutoPingManager { /** @@ -42,7 +29,8 @@ * @param autoPing the auto ping configuration * @throws RollerException */ - public void storeAutoPing(AutoPingData autoPing) throws RollerException; + public void saveAutoPing(AutoPingData autoPing) throws RollerException; + /** * Remove the auto ping configuration with given id. @@ -88,7 +76,7 @@ * @return the auto ping configuration with specified id or null if not found * @throws RollerException */ - public AutoPingData retrieveAutoPing(String id) throws RollerException; + public AutoPingData getAutoPing(String id) throws RollerException; /** Modified: incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/PingSetupAction.java URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/PingSetupAction.java?rev=395366&r1=395365&r2=395366&view=diff ============================================================================== --- incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/PingSetupAction.java (original) +++ incubator/roller/branches/roller-newbackend/src/org/roller/presentation/weblog/actions/PingSetupAction.java Wed Apr 19 12:32:41 2006 @@ -181,9 +181,8 @@ { return mapping.findForward("access-denied"); } - AutoPingData autoPing = autoPingMgr.createAutoPing(pingTarget, - rreq.getWebsite()); - autoPingMgr.storeAutoPing(autoPing); + AutoPingData autoPing = new AutoPingData(null, pingTarget, rreq.getWebsite()); + autoPingMgr.saveAutoPing(autoPing); RollerFactory.getRoller().flush(); return view(mapping, form, req, res); 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=395366&r1=395365&r2=395366&view=diff ============================================================================== --- incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java (original) +++ incubator/roller/branches/roller-newbackend/tests/org/roller/TestUtils.java Wed Apr 19 12:32:41 2006 @@ -275,11 +275,11 @@ AutoPingManager mgr = RollerFactory.getRoller().getAutopingManager(); // store auto ping - AutoPingData autoPing = mgr.createAutoPing(ping, weblog); - mgr.storeAutoPing(autoPing); + AutoPingData autoPing = new AutoPingData(null, ping, weblog); + mgr.saveAutoPing(autoPing); // query for it - autoPing = mgr.retrieveAutoPing(autoPing.getId()); + autoPing = mgr.getAutoPing(autoPing.getId()); if(autoPing == null) throw new RollerException("error setting up auto ping"); @@ -295,7 +295,7 @@ // query for it AutoPingManager mgr = RollerFactory.getRoller().getAutopingManager(); - AutoPingData autoPing = mgr.retrieveAutoPing(id); + AutoPingData autoPing = mgr.getAutoPing(id); // remove the auto ping mgr.removeAutoPing(autoPing); Modified: incubator/roller/branches/roller-newbackend/tests/org/roller/business/PingsTest.java URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/tests/org/roller/business/PingsTest.java?rev=395366&r1=395365&r2=395366&view=diff ============================================================================== --- incubator/roller/branches/roller-newbackend/tests/org/roller/business/PingsTest.java (original) +++ incubator/roller/branches/roller-newbackend/tests/org/roller/business/PingsTest.java Wed Apr 19 12:32:41 2006 @@ -229,25 +229,25 @@ TestUtils.endSession(true); // create autoPing - autoPing = mgr.createAutoPing(pingTarget, testWeblog); - mgr.storeAutoPing(autoPing); + autoPing = new AutoPingData(null, pingTarget, testWeblog); + mgr.saveAutoPing(autoPing); String id = autoPing.getId(); TestUtils.endSession(true); // make sure autoPing was stored autoPing = null; - autoPing = mgr.retrieveAutoPing(id); + autoPing = mgr.getAutoPing(id); assertNotNull(autoPing); assertEquals(pingTarget, autoPing.getPingTarget()); // update autoPing autoPing.setPingTarget(pingTarget2); - mgr.storeAutoPing(autoPing); + mgr.saveAutoPing(autoPing); TestUtils.endSession(true); // make sure autoPing was updated autoPing = null; - autoPing = mgr.retrieveAutoPing(id); + autoPing = mgr.getAutoPing(id); assertNotNull(autoPing); assertEquals(pingTarget2, autoPing.getPingTarget()); @@ -257,7 +257,7 @@ // make sure common autoPing was deleted autoPing = null; - autoPing = mgr.retrieveAutoPing(id); + autoPing = mgr.getAutoPing(id); assertNull(autoPing); // teardown test ping target @@ -292,7 +292,7 @@ // make sure remove succeeded testAutoPing = null; - testAutoPing = mgr.retrieveAutoPing(autoPing.getId()); + testAutoPing = mgr.getAutoPing(autoPing.getId()); assertNull(testAutoPing); // remove a collection @@ -342,14 +342,14 @@ TestUtils.endSession(true); // create autoPing - autoPing = mgr.createAutoPing(pingTarget, testWeblog); - mgr.storeAutoPing(autoPing); + autoPing = new AutoPingData(null, pingTarget, testWeblog); + mgr.saveAutoPing(autoPing); String id = autoPing.getId(); TestUtils.endSession(true); // lookup by id autoPing = null; - autoPing = mgr.retrieveAutoPing(id); + autoPing = mgr.getAutoPing(id); assertNotNull(autoPing); assertEquals(pingTarget, autoPing.getPingTarget());