Return-Path: Delivered-To: apmail-incubator-roller-commits-archive@www.apache.org Received: (qmail 748 invoked from network); 19 Apr 2006 18:26:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 18:26:23 -0000 Received: (qmail 47207 invoked by uid 500); 19 Apr 2006 18:26:20 -0000 Delivered-To: apmail-incubator-roller-commits-archive@incubator.apache.org Received: (qmail 47180 invoked by uid 500); 19 Apr 2006 18:26:20 -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 47169 invoked by uid 99); 19 Apr 2006 18:26:20 -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 11:26:20 -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 11:26:19 -0700 Received: (qmail 426 invoked by uid 65534); 19 Apr 2006 18:25:58 -0000 Message-ID: <20060419182558.425.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r395340 - in /incubator/roller/branches/roller-newbackend/src/org/roller: business/hibernate/HibernatePingTargetManagerImpl.java model/PingTargetManager.java Date: Wed, 19 Apr 2006 18:25:57 -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 11:25:54 2006 New Revision: 395340 URL: http://svn.apache.org/viewcvs?rev=395340&view=rev Log: code reformatting. Modified: incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernatePingTargetManagerImpl.java incubator/roller/branches/roller-newbackend/src/org/roller/model/PingTargetManager.java Modified: incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernatePingTargetManagerImpl.java URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernatePingTargetManagerImpl.java?rev=395340&r1=395339&r2=395340&view=diff ============================================================================== --- incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernatePingTargetManagerImpl.java (original) +++ incubator/roller/branches/roller-newbackend/src/org/roller/business/hibernate/HibernatePingTargetManagerImpl.java Wed Apr 19 11:25:54 2006 @@ -49,27 +49,6 @@ } - public PingTargetData createCommonPingTarget(String name, String pingUrl) throws RollerException { - return new PingTargetData(null, name, pingUrl, null); - } - - - public PingTargetData createCustomPingTarget(String name, String pingUrl, WebsiteData website) throws RollerException { - if (website == null) throw new RollerException(new IllegalArgumentException("website == null")); - return new PingTargetData(null, name, pingUrl, website); - } - - - public void storePingTarget(PingTargetData pingTarget) throws RollerException { - strategy.store(pingTarget); - } - - - public PingTargetData retrievePingTarget(String id) throws RollerException { - return (PingTargetData) strategy.load(id, PingTargetData.class); - } - - public void removePingTarget(String id) throws RollerException { PingTargetData pingTarget = retrievePingTarget(id); @@ -138,6 +117,27 @@ while (targets.hasNext()) { this.strategy.remove((PingTargetData) targets.next()); } + } + + + public PingTargetData createCommonPingTarget(String name, String pingUrl) throws RollerException { + return new PingTargetData(null, name, pingUrl, null); + } + + + public PingTargetData createCustomPingTarget(String name, String pingUrl, WebsiteData website) throws RollerException { + if (website == null) throw new RollerException(new IllegalArgumentException("website == null")); + return new PingTargetData(null, name, pingUrl, website); + } + + + public void storePingTarget(PingTargetData pingTarget) throws RollerException { + strategy.store(pingTarget); + } + + + public PingTargetData retrievePingTarget(String id) throws RollerException { + return (PingTargetData) strategy.load(id, PingTargetData.class); } Modified: incubator/roller/branches/roller-newbackend/src/org/roller/model/PingTargetManager.java URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/model/PingTargetManager.java?rev=395340&r1=395339&r2=395340&view=diff ============================================================================== --- incubator/roller/branches/roller-newbackend/src/org/roller/model/PingTargetManager.java (original) +++ incubator/roller/branches/roller-newbackend/src/org/roller/model/PingTargetManager.java Wed Apr 19 11:25:54 2006 @@ -8,23 +8,19 @@ package org.roller.model; +import java.io.Serializable; +import java.util.List; +import org.roller.RollerException; import org.roller.pojos.PingTargetData; import org.roller.pojos.WebsiteData; -import org.roller.RollerException; -import java.io.Serializable; -import java.util.List; /** * Manages ping targets. */ -public interface PingTargetManager extends Serializable -{ - /** - * Release all resources associated with Roller session. - */ - public void release(); - +public interface PingTargetManager extends Serializable { + + /** * Create a common (shared) ping target. This method does not persist the new instance. * @@ -34,7 +30,8 @@ * @throws RollerException */ public PingTargetData createCommonPingTarget(String name, String pingUrl) throws RollerException; - + + /** * Create a custom ping target for the specified website. This method does not persist the new instance. * @@ -45,8 +42,9 @@ * @throws RollerException */ public PingTargetData createCustomPingTarget(String name, String pingUrl, - WebsiteData website) throws RollerException; - + WebsiteData website) throws RollerException; + + /** * Store a ping target. * @@ -54,24 +52,42 @@ * @throws RollerException */ public void storePingTarget(PingTargetData pingTarget) throws RollerException; - + + /** - * Retrieve a specific ping target by id. + * Remove a ping target by id. * - * @param id id of the ping target to be retrieved. - * @return the ping target whose id is specified. + * @param id id of the ping target to be removed * @throws RollerException */ - public PingTargetData retrievePingTarget(String id) throws RollerException; - + public void removePingTarget(String id) throws RollerException; + + /** - * Remove a ping target by id. + * Remove all of the custom ping targets for the given website. * - * @param id id of the ping target to be removed + * @param website the website whose custom ping targets should be removed * @throws RollerException */ - public void removePingTarget(String id) throws RollerException; - + public void removeCustomPingTargets(WebsiteData website) throws RollerException; + + + /** + * Remove all custom targets (regardless of website). + */ + public void removeAllCustomPingTargets() throws RollerException; + + + /** + * Retrieve a specific ping target by id. + * + * @param id id of the ping target to be retrieved. + * @return the ping target whose id is specified. + * @throws RollerException + */ + public PingTargetData retrievePingTarget(String id) throws RollerException; + + /** * Get a list of the common (shared) ping targets. * @@ -79,7 +95,8 @@ * @throws RollerException */ public List getCommonPingTargets() throws RollerException; - + + /** * Get a list of the custom ping targets for the given website. * @@ -89,21 +106,8 @@ * @throws RollerException */ public List getCustomPingTargets(WebsiteData website) throws RollerException; - - /** - * Remove all of the custom ping targets for the given website. - * - * @param website the website whose custom ping targets should be removed - * @throws RollerException - */ - public void removeCustomPingTargets(WebsiteData website) throws RollerException; - - /** - * Remove all custom targets (regardless of website). - */ - public void removeAllCustomPingTargets() throws RollerException; - - + + /** * Check if the ping target has a name that is unique in the appropriate set. If the ping target has no website id * (is common), then this checks if the name is unique amongst common targets, and if custom then unique amongst @@ -115,7 +119,8 @@ * @throws RollerException */ public boolean isNameUnique(PingTargetData pingTarget) throws RollerException; - + + /** * Check if the url of the ping target is well-formed. For this test, it must parse as a java.net.URL, * with protocol http and a non-empty host portion. @@ -125,7 +130,8 @@ * @throws RollerException */ public boolean isUrlWellFormed(PingTargetData pingTarget) throws RollerException; - + + /** * Check if the host portion of the url of the ping target is known, meaning it is either a well-formed IP address * or a hostname that resolves from the server. The ping target url must parse as a java.net.URL in @@ -137,5 +143,11 @@ * @throws RollerException */ public boolean isHostnameKnown(PingTargetData pingTarget) throws RollerException; - + + + /** + * Release all resources associated with Roller session. + */ + public void release(); + }