src/org/sonews/storage/Storage.java
changeset 37 74139325d305
parent 35 ed84c8bdd87b
child 42 7f84f4de2893
     1.1 --- a/src/org/sonews/storage/Storage.java	Sun Aug 29 17:43:58 2010 +0200
     1.2 +++ b/src/org/sonews/storage/Storage.java	Sun Aug 29 18:17:37 2010 +0200
     1.3 @@ -30,121 +30,120 @@
     1.4  public interface Storage
     1.5  {
     1.6  
     1.7 -  /**
     1.8 -   * Stores the given Article in the storage.
     1.9 -   * @param art
    1.10 -   * @throws StorageBackendException
    1.11 -   */
    1.12 -  void addArticle(Article art)
    1.13 -    throws StorageBackendException;
    1.14 +	/**
    1.15 +	 * Stores the given Article in the storage.
    1.16 +	 * @param art
    1.17 +	 * @throws StorageBackendException
    1.18 +	 */
    1.19 +	void addArticle(Article art)
    1.20 +		throws StorageBackendException;
    1.21  
    1.22 -  void addEvent(long timestamp, int type, long groupID)
    1.23 -    throws StorageBackendException;
    1.24 +	void addEvent(long timestamp, int type, long groupID)
    1.25 +		throws StorageBackendException;
    1.26  
    1.27 -  void addGroup(String groupname, int flags)
    1.28 -    throws StorageBackendException;
    1.29 +	void addGroup(String groupname, int flags)
    1.30 +		throws StorageBackendException;
    1.31  
    1.32 -  int countArticles()
    1.33 -    throws StorageBackendException;
    1.34 +	int countArticles()
    1.35 +		throws StorageBackendException;
    1.36  
    1.37 -  int countGroups()
    1.38 -    throws StorageBackendException;
    1.39 +	int countGroups()
    1.40 +		throws StorageBackendException;
    1.41  
    1.42 -  void delete(String messageID)
    1.43 -    throws StorageBackendException;
    1.44 +	void delete(String messageID)
    1.45 +		throws StorageBackendException;
    1.46  
    1.47 -  Article getArticle(String messageID)
    1.48 -    throws StorageBackendException;
    1.49 +	Article getArticle(String messageID)
    1.50 +		throws StorageBackendException;
    1.51  
    1.52 -  Article getArticle(long articleIndex, long groupID)
    1.53 -    throws StorageBackendException;
    1.54 +	Article getArticle(long articleIndex, long groupID)
    1.55 +		throws StorageBackendException;
    1.56  
    1.57 -  List<Pair<Long, ArticleHead>> getArticleHeads(Group group, long first, long last)
    1.58 -    throws StorageBackendException;
    1.59 +	List<Pair<Long, ArticleHead>> getArticleHeads(Group group, long first, long last)
    1.60 +		throws StorageBackendException;
    1.61  
    1.62 -  List<Pair<Long, String>> getArticleHeaders(Channel channel, long start, long end,
    1.63 -    String header, String pattern)
    1.64 -    throws StorageBackendException;
    1.65 +	List<Pair<Long, String>> getArticleHeaders(Channel channel, long start, long end,
    1.66 +		String header, String pattern)
    1.67 +		throws StorageBackendException;
    1.68  
    1.69 -  long getArticleIndex(Article art, Group group)
    1.70 -    throws StorageBackendException;
    1.71 +	long getArticleIndex(Article art, Group group)
    1.72 +		throws StorageBackendException;
    1.73  
    1.74 -  List<Long> getArticleNumbers(long groupID)
    1.75 -    throws StorageBackendException;
    1.76 +	List<Long> getArticleNumbers(long groupID)
    1.77 +		throws StorageBackendException;
    1.78  
    1.79 -  String getConfigValue(String key)
    1.80 -    throws StorageBackendException;
    1.81 +	String getConfigValue(String key)
    1.82 +		throws StorageBackendException;
    1.83  
    1.84 -  int getEventsCount(int eventType, long startTimestamp, long endTimestamp,
    1.85 -    Channel channel)
    1.86 -    throws StorageBackendException;
    1.87 +	int getEventsCount(int eventType, long startTimestamp, long endTimestamp,
    1.88 +		Channel channel)
    1.89 +		throws StorageBackendException;
    1.90  
    1.91 -  double getEventsPerHour(int key, long gid)
    1.92 -    throws StorageBackendException;
    1.93 +	double getEventsPerHour(int key, long gid)
    1.94 +		throws StorageBackendException;
    1.95  
    1.96 -  int getFirstArticleNumber(Group group)
    1.97 -    throws StorageBackendException;
    1.98 +	int getFirstArticleNumber(Group group)
    1.99 +		throws StorageBackendException;
   1.100  
   1.101 -  Group getGroup(String name)
   1.102 -    throws StorageBackendException;
   1.103 +	Group getGroup(String name)
   1.104 +		throws StorageBackendException;
   1.105  
   1.106 -  List<Channel> getGroups()
   1.107 -    throws StorageBackendException;
   1.108 +	List<Channel> getGroups()
   1.109 +		throws StorageBackendException;
   1.110  
   1.111 -  /**
   1.112 -   * Retrieves the collection of groupnames that are associated with the
   1.113 -   * given list address.
   1.114 -   * @param inetaddress
   1.115 -   * @return
   1.116 -   * @throws StorageBackendException
   1.117 -   */
   1.118 -  List<String> getGroupsForList(String listAddress)
   1.119 -    throws StorageBackendException;
   1.120 +	/**
   1.121 +	 * Retrieves the collection of groupnames that are associated with the
   1.122 +	 * given list address.
   1.123 +	 * @param inetaddress
   1.124 +	 * @return
   1.125 +	 * @throws StorageBackendException
   1.126 +	 */
   1.127 +	List<String> getGroupsForList(String listAddress)
   1.128 +		throws StorageBackendException;
   1.129  
   1.130 -  int getLastArticleNumber(Group group)
   1.131 -    throws StorageBackendException;
   1.132 +	int getLastArticleNumber(Group group)
   1.133 +		throws StorageBackendException;
   1.134  
   1.135 -  /**
   1.136 -   * Returns a list of email addresses that are related to the given
   1.137 -   * groupname. In most cases the list may contain only one entry.
   1.138 -   * @param groupname
   1.139 -   * @return
   1.140 -   * @throws StorageBackendException
   1.141 -   */
   1.142 -  List<String> getListsForGroup(String groupname)
   1.143 -    throws StorageBackendException;
   1.144 +	/**
   1.145 +	 * Returns a list of email addresses that are related to the given
   1.146 +	 * groupname. In most cases the list may contain only one entry.
   1.147 +	 * @param groupname
   1.148 +	 * @return
   1.149 +	 * @throws StorageBackendException
   1.150 +	 */
   1.151 +	List<String> getListsForGroup(String groupname)
   1.152 +		throws StorageBackendException;
   1.153  
   1.154 -  String getOldestArticle()
   1.155 -    throws StorageBackendException;
   1.156 +	String getOldestArticle()
   1.157 +		throws StorageBackendException;
   1.158  
   1.159 -  int getPostingsCount(String groupname)
   1.160 -    throws StorageBackendException;
   1.161 +	int getPostingsCount(String groupname)
   1.162 +		throws StorageBackendException;
   1.163  
   1.164 -  List<Subscription> getSubscriptions(int type)
   1.165 -    throws StorageBackendException;
   1.166 +	List<Subscription> getSubscriptions(int type)
   1.167 +		throws StorageBackendException;
   1.168  
   1.169 -  boolean isArticleExisting(String messageID)
   1.170 -    throws StorageBackendException;
   1.171 +	boolean isArticleExisting(String messageID)
   1.172 +		throws StorageBackendException;
   1.173  
   1.174 -  boolean isGroupExisting(String groupname)
   1.175 -    throws StorageBackendException;
   1.176 +	boolean isGroupExisting(String groupname)
   1.177 +		throws StorageBackendException;
   1.178  
   1.179 -  void purgeGroup(Group group)
   1.180 -    throws StorageBackendException;
   1.181 +	void purgeGroup(Group group)
   1.182 +		throws StorageBackendException;
   1.183  
   1.184 -  void setConfigValue(String key, String value)
   1.185 -    throws StorageBackendException;
   1.186 +	void setConfigValue(String key, String value)
   1.187 +		throws StorageBackendException;
   1.188  
   1.189 -  /**
   1.190 -   * Updates headers and channel references of the given article.
   1.191 -   * @param article
   1.192 -   * @return
   1.193 -   * @throws StorageBackendException
   1.194 -   */
   1.195 -  boolean update(Article article)
   1.196 -    throws StorageBackendException;
   1.197 +	/**
   1.198 +	 * Updates headers and channel references of the given article.
   1.199 +	 * @param article
   1.200 +	 * @return
   1.201 +	 * @throws StorageBackendException
   1.202 +	 */
   1.203 +	boolean update(Article article)
   1.204 +		throws StorageBackendException;
   1.205  
   1.206 -  boolean update(Group group)
   1.207 -    throws StorageBackendException;
   1.208 -
   1.209 +	boolean update(Group group)
   1.210 +		throws StorageBackendException;
   1.211  }