1.1 --- a/src/org/sonews/storage/Storage.java Wed May 04 18:34:21 2011 +0200
1.2 +++ b/src/org/sonews/storage/Storage.java Mon Jun 06 20:12:21 2011 +0200
1.3 @@ -15,7 +15,6 @@
1.4 * You should have received a copy of the GNU General Public License
1.5 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1.6 */
1.7 -
1.8 package org.sonews.storage;
1.9
1.10 import java.util.List;
1.11 @@ -27,8 +26,7 @@
1.12 * @author Christian Lins
1.13 * @since sonews/1.0
1.14 */
1.15 -public interface Storage
1.16 -{
1.17 +public interface Storage {
1.18
1.19 /**
1.20 * Stores the given Article in the storage.
1.21 @@ -36,60 +34,60 @@
1.22 * @throws StorageBackendException
1.23 */
1.24 void addArticle(Article art)
1.25 - throws StorageBackendException;
1.26 + throws StorageBackendException;
1.27
1.28 void addEvent(long timestamp, int type, long groupID)
1.29 - throws StorageBackendException;
1.30 + throws StorageBackendException;
1.31
1.32 void addGroup(String groupname, int flags)
1.33 - throws StorageBackendException;
1.34 + throws StorageBackendException;
1.35
1.36 int countArticles()
1.37 - throws StorageBackendException;
1.38 + throws StorageBackendException;
1.39
1.40 int countGroups()
1.41 - throws StorageBackendException;
1.42 + throws StorageBackendException;
1.43
1.44 void delete(String messageID)
1.45 - throws StorageBackendException;
1.46 + throws StorageBackendException;
1.47
1.48 Article getArticle(String messageID)
1.49 - throws StorageBackendException;
1.50 + throws StorageBackendException;
1.51
1.52 Article getArticle(long articleIndex, long groupID)
1.53 - throws StorageBackendException;
1.54 + throws StorageBackendException;
1.55
1.56 List<Pair<Long, ArticleHead>> getArticleHeads(Group group, long first, long last)
1.57 - throws StorageBackendException;
1.58 + throws StorageBackendException;
1.59
1.60 List<Pair<Long, String>> getArticleHeaders(Channel channel, long start, long end,
1.61 - String header, String pattern)
1.62 - throws StorageBackendException;
1.63 + String header, String pattern)
1.64 + throws StorageBackendException;
1.65
1.66 long getArticleIndex(Article art, Group group)
1.67 - throws StorageBackendException;
1.68 + throws StorageBackendException;
1.69
1.70 List<Long> getArticleNumbers(long groupID)
1.71 - throws StorageBackendException;
1.72 + throws StorageBackendException;
1.73
1.74 String getConfigValue(String key)
1.75 - throws StorageBackendException;
1.76 + throws StorageBackendException;
1.77
1.78 int getEventsCount(int eventType, long startTimestamp, long endTimestamp,
1.79 - Channel channel)
1.80 - throws StorageBackendException;
1.81 + Channel channel)
1.82 + throws StorageBackendException;
1.83
1.84 double getEventsPerHour(int key, long gid)
1.85 - throws StorageBackendException;
1.86 + throws StorageBackendException;
1.87
1.88 int getFirstArticleNumber(Group group)
1.89 - throws StorageBackendException;
1.90 + throws StorageBackendException;
1.91
1.92 Group getGroup(String name)
1.93 - throws StorageBackendException;
1.94 + throws StorageBackendException;
1.95
1.96 List<Channel> getGroups()
1.97 - throws StorageBackendException;
1.98 + throws StorageBackendException;
1.99
1.100 /**
1.101 * Retrieves the collection of groupnames that are associated with the
1.102 @@ -99,10 +97,10 @@
1.103 * @throws StorageBackendException
1.104 */
1.105 List<String> getGroupsForList(String listAddress)
1.106 - throws StorageBackendException;
1.107 + throws StorageBackendException;
1.108
1.109 int getLastArticleNumber(Group group)
1.110 - throws StorageBackendException;
1.111 + throws StorageBackendException;
1.112
1.113 /**
1.114 * Returns a list of email addresses that are related to the given
1.115 @@ -112,28 +110,28 @@
1.116 * @throws StorageBackendException
1.117 */
1.118 List<String> getListsForGroup(String groupname)
1.119 - throws StorageBackendException;
1.120 + throws StorageBackendException;
1.121
1.122 String getOldestArticle()
1.123 - throws StorageBackendException;
1.124 + throws StorageBackendException;
1.125
1.126 int getPostingsCount(String groupname)
1.127 - throws StorageBackendException;
1.128 + throws StorageBackendException;
1.129
1.130 List<Subscription> getSubscriptions(int type)
1.131 - throws StorageBackendException;
1.132 + throws StorageBackendException;
1.133
1.134 boolean isArticleExisting(String messageID)
1.135 - throws StorageBackendException;
1.136 + throws StorageBackendException;
1.137
1.138 boolean isGroupExisting(String groupname)
1.139 - throws StorageBackendException;
1.140 + throws StorageBackendException;
1.141
1.142 void purgeGroup(Group group)
1.143 - throws StorageBackendException;
1.144 + throws StorageBackendException;
1.145
1.146 void setConfigValue(String key, String value)
1.147 - throws StorageBackendException;
1.148 + throws StorageBackendException;
1.149
1.150 /**
1.151 * Updates headers and channel references of the given article.
1.152 @@ -142,8 +140,8 @@
1.153 * @throws StorageBackendException
1.154 */
1.155 boolean update(Article article)
1.156 - throws StorageBackendException;
1.157 + throws StorageBackendException;
1.158
1.159 boolean update(Group group)
1.160 - throws StorageBackendException;
1.161 + throws StorageBackendException;
1.162 }