File Source: AutoPingManager.java
/*
P/P * Method: org.apache.roller.weblogger.business.pings.AutoPingManager__static_init
*/
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. The ASF licenses this file to You
4 * under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. For additional information regarding
15 * copyright in this work, please see the NOTICE file in the top level
16 * directory of this distribution.
17 */
18
19 package org.apache.roller.weblogger.business.pings;
20
21 import java.util.Collection;
22 import java.util.List;
23 import org.apache.roller.weblogger.WebloggerException;
24 import org.apache.roller.weblogger.pojos.AutoPing;
25 import org.apache.roller.weblogger.pojos.PingTarget;
26 import org.apache.roller.weblogger.pojos.WeblogEntry;
27 import org.apache.roller.weblogger.pojos.Weblog;
28
29
30 /**
31 * Manages autoping storage/retrieval, queries and queue.
32 */
33 public interface AutoPingManager {
34
35
36 /**
37 * Store an auto ping configuration.
38 *
39 * @param autoPing the auto ping configuration
40 * @throws WebloggerException
41 */
42 public void saveAutoPing(AutoPing autoPing) throws WebloggerException;
43
44
45 /**
46 * Remove the auto ping configuration with given id.
47 *
48 * @param autoPing the auto ping configuration to remove
49 * @throws WebloggerException
50 */
51 public void removeAutoPing(AutoPing autoPing) throws WebloggerException;
52
53
54 /**
55 * Remove the auto ping configuration for the given ping target and website, if one exists. Returns silently if it
56 * doesn't exist.
57 *
58 * @param pingTarget the ping target
59 * @param website the website
60 * @throws WebloggerException
61 */
62 public void removeAutoPing(PingTarget pingTarget, Weblog website) throws WebloggerException;
63
64
65 /**
66 * Remove a collection of auto ping configurations.
67 *
68 * @param autopings a <code>Collection</code> of <code>AAutoPing/code> objects
69 * @throws WebloggerException
70 */
71 public void removeAutoPings(Collection autopings) throws WebloggerException;
72
73
74 /**
75 * Remove all auto ping configurations for all websites.
76 *
77 * @throws WebloggerException
78 */
79 public void removeAllAutoPings() throws WebloggerException;
80
81
82 /**
83 * Retrieve an auto ping configuration by id.
84 *
85 * @param id the id of the auto ping configuration to retrieve.
86 * @return the auto ping configuration with specified id or null if not found
87 * @throws WebloggerException
88 */
89 public AutoPing getAutoPing(String id) throws WebloggerException;
90
91
92 /**
93 * Get all of the auto ping configurations for the given website.
94 *
95 * @param website
96 * @return a list of auto ping configurations for the given website as <code>AuAutoPingcode> objects.
97 */
98 public List getAutoPingsByWebsite(Weblog website) throws WebloggerException;
99
100
101 /**
102 * Get all of the auto ping configurations for a given target (across all websites).
103 *
104 * @param pingTarget
105 * @return a list of auto ping configurations for the given target as <code>AuAutoPingcode> objects.
106 */
107 public List getAutoPingsByTarget(PingTarget pingTarget) throws WebloggerException;
108
109
110 /**
111 * Get the auto ping configurations that should be pinged upon creation/change of the given weblog entry.
112 *
113 * @param changedWeblogEntry the entry that has been created or changed
114 * @return a list of the ping configurations that should be applied due to this change
115 */
116 public List getApplicableAutoPings(WeblogEntry changedWeblogEntry) throws WebloggerException;
117
118
119 /**
120 * Queue the auto ping configurations that should be pinged upon change to the given weblog entry. This calls the
121 * {@link PingQueueManager} to queue ping requests for each ping configuration that should be applied on change to
122 * the given weblog entry. If ping processing is suspended, this returns without doing anything.
123 *
124 * @param changedWeblogEntry the entry that has been created or changed
125 */
126 public void queueApplicableAutoPings(WeblogEntry changedWeblogEntry) throws WebloggerException;
127
128
129 /**
130 * Get the category restrictions on the given auto ping configuration.
131 *
132 * @param autoPing
133 * @return the category restrictions as a collection of <code>WeblogCategoryData</code> objects. This collection
134 * will be empty if there are no restrictions (meaning that the auto ping configuration applies to changes
135 * in any category of the website).
136 */
137 public List getCategoryRestrictions(AutoPing autoPing) throws WebloggerException;
138
139
140 /**
141 * Set the category restrictions on the given ping configuration to the specified ones. If the new collection is
142 * empty, all category restrictions are removed.
143 *
144 * @param autoPing auto ping configuration to change
145 * @param newCategories a collection of <code>WeblogCategoryData</code> objects for the new category restrictions
146 */
147 public void setCategoryRestrictions(AutoPing autoPing,
148 Collection newCategories);
149
150
151 /**
152 * Release all resources associated with Roller session.
153 */
154 public void release();
155
156 }
SofCheck Inspector Build Version : 2.18479
| AutoPingManager.java |
2009-Jan-02 14:25:26 |
| AutoPingManager.class |
2009-Sep-04 03:12:30 |