roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
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 GMT
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 <code>java.net.URL</code>,
      * with protocol <code>http</code> and a non-empty <code>host</code>
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
<code>java.net.URL</code> in
@@ -137,5 +143,11 @@
      * @throws RollerException
      */
     public boolean isHostnameKnown(PingTargetData pingTarget) throws RollerException;
-
+    
+    
+    /**
+     * Release all resources associated with Roller session.
+     */
+    public void release();
+    
 }



Mime
View raw message