Author: snoopdave
Date: Wed Sep 12 07:49:53 2007
New Revision: 574980
URL: http://svn.apache.org/viewvc?rev=574980&view=rev
Log:
Formatting changes only
Modified:
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl.java
Modified:
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl.java
URL:
http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl.java?rev=574980&r1=574979&r2=574980&view=diff
==============================================================================
---
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl.java
(original)
+++
roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/jpa/JPAAutoPingManagerImpl.java
Wed Sep 12 07:49:53 2007
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. The ASF licenses this file to You
@@ -28,7 +27,6 @@
import org.apache.roller.weblogger.pojos.PingTarget;
import org.apache.roller.weblogger.pojos.WeblogEntry;
import org.apache.roller.weblogger.pojos.Weblog;
-
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
@@ -48,14 +46,10 @@
private final Weblogger roller;
private final JPAPersistenceStrategy strategy;
-
-
/**
* The logger instance for this class.
*/
- private static Log logger =
- LogFactory.getFactory().getInstance(JPAAutoPingManagerImpl.class);
-
+ private static Log logger =
LogFactory.getFactory().getInstance(JPAAutoPingManagerImpl.class);
/**
* Creates a new instance of JPAAutoPingManagerImpl
@@ -65,10 +59,9 @@
this.roller = roller;
this.strategy = strategy;
}
-
public AutoPing getAutoPing(String id) throws WebloggerException {
- return (AutoPing)strategy.load(AutoPing.class, id);
+ return (AutoPing) strategy.load(AutoPing.class, id);
}
public void saveAutoPing(AutoPing autoPing) throws WebloggerException {
@@ -79,74 +72,64 @@
strategy.remove(autoPing);
}
- public void removeAutoPing(PingTarget pingTarget, Weblog website)
- throws WebloggerException {
+ public void removeAutoPing(PingTarget pingTarget, Weblog website) throws
WebloggerException {
Query q =
strategy.getNamedUpdate("AutoPing.removeByPingTarget&Website");
q.setParameter(1, pingTarget);
q.setParameter(2, website);
q.executeUpdate();
}
- public void removeAutoPings(Collection autopings)
- throws WebloggerException {
+ public void removeAutoPings(Collection autopings) throws
WebloggerException {
strategy.removeAll(autopings);
}
- public void removeAllAutoPings()
- throws WebloggerException {
+ public void removeAllAutoPings() throws WebloggerException {
Query q = strategy.getNamedUpdate("AutoPing.getAll");
removeAutoPings(q.getResultList());
}
- public void queueApplicableAutoPings(WeblogEntry changedWeblogEntry)
- throws WebloggerException {
+ public void queueApplicableAutoPings(WeblogEntry changedWeblogEntry)
throws WebloggerException {
if (PingConfig.getSuspendPingProcessing()) {
- if (logger.isDebugEnabled())
- logger.debug("Ping processing is suspended." +
- " No auto pings will be queued.");
+ if (logger.isDebugEnabled()) {
+ logger.debug("Ping processing is suspended." + " No auto pings
will be queued.");
+ }
return;
}
- PingQueueManager pingQueueMgr = roller.
- getPingQueueManager();
+ PingQueueManager pingQueueMgr = roller.getPingQueueManager();
List applicableAutopings = getApplicableAutoPings(changedWeblogEntry);
- for (Iterator i = applicableAutopings.iterator(); i.hasNext(); ) {
+ for (Iterator i = applicableAutopings.iterator(); i.hasNext();) {
AutoPing autoPing = (AutoPing) i.next();
pingQueueMgr.addQueueEntry(autoPing);
}
}
- public List getAutoPingsByWebsite(Weblog website)
- throws WebloggerException {
+ public List getAutoPingsByWebsite(Weblog website) throws
WebloggerException {
Query q = strategy.getNamedQuery("AutoPing.getByWebsite");
q.setParameter(1, website);
return q.getResultList();
}
- public List getAutoPingsByTarget(PingTarget pingTarget)
- throws WebloggerException {
+ public List getAutoPingsByTarget(PingTarget pingTarget) throws
WebloggerException {
Query q = strategy.getNamedQuery("AutoPing.getByPingTarget");
q.setParameter(1, pingTarget);
return q.getResultList();
}
- public List getApplicableAutoPings(WeblogEntry changedWeblogEntry)
- throws WebloggerException {
+ public List getApplicableAutoPings(WeblogEntry changedWeblogEntry) throws
WebloggerException {
return getAutoPingsByWebsite(changedWeblogEntry.getWebsite());
// return (List)strategy.newQuery(AutoPing.class,
"AutoPing.getByWebsite")
// .execute(changedWeblogEntry.getWebsite());
}
- public List getCategoryRestrictions(AutoPing autoPing)
- throws WebloggerException {
+ public List getCategoryRestrictions(AutoPing autoPing) throws
WebloggerException {
return Collections.EMPTY_LIST;
}
- public void setCategoryRestrictions
- (AutoPing autoPing, Collection newCategories) {
+ public void setCategoryRestrictions(AutoPing autoPing, Collection
newCategories) {
// NOT YET IMPLEMENTED
}
- public void release() {}
-
-}
+ public void release() {
+ }
+}
\ No newline at end of file