Drupal: bez dědičnosti, implementujeme rovnou rozhraní (nelze dědit).
3 * see AUTHORS for the list of contributors
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package org.sonews.storage.impl;
20 import java.sql.SQLException;
21 import java.util.List;
22 import org.sonews.feed.Subscription;
23 import org.sonews.storage.Article;
24 import org.sonews.storage.ArticleHead;
25 import org.sonews.storage.Group;
26 import org.sonews.storage.Storage;
27 import org.sonews.storage.StorageBackendException;
28 import org.sonews.util.Pair;
32 * @author František Kučera (frantovo.cz)
34 public class DrupalDatabase implements Storage {
37 * Rises the database: reconnect and recreate all prepared statements.
38 * @throws java.lang.SQLException
40 protected void arise() throws SQLException {
44 public void addArticle(Article art) throws StorageBackendException {
45 throw new StorageBackendException("Not supported yet.");
49 public void addEvent(long timestamp, int type, long groupID) throws StorageBackendException {
50 throw new StorageBackendException("Not supported yet.");
54 public void addGroup(String groupname, int flags) throws StorageBackendException {
55 throw new StorageBackendException("Not supported yet.");
59 public int countArticles() throws StorageBackendException {
60 throw new StorageBackendException("Not supported yet.");
64 public int countGroups() throws StorageBackendException {
65 throw new StorageBackendException("Not supported yet.");
69 public void delete(String messageID) throws StorageBackendException {
70 throw new StorageBackendException("Not supported yet.");
74 public Article getArticle(String messageID) throws StorageBackendException {
75 throw new StorageBackendException("Not supported yet.");
79 public Article getArticle(long articleIndex, long groupID) throws StorageBackendException {
80 throw new StorageBackendException("Not supported yet.");
84 public List<Pair<Long, ArticleHead>> getArticleHeads(Group group, long first, long last) throws StorageBackendException {
85 throw new StorageBackendException("Not supported yet.");
89 public List<Pair<Long, String>> getArticleHeaders(Group group, long start, long end, String header, String pattern) throws StorageBackendException {
90 throw new StorageBackendException("Not supported yet.");
94 public long getArticleIndex(Article art, Group group) throws StorageBackendException {
95 throw new StorageBackendException("Not supported yet.");
99 public List<Long> getArticleNumbers(long groupID) throws StorageBackendException {
100 throw new StorageBackendException("Not supported yet.");
104 public String getConfigValue(String key) throws StorageBackendException {
105 throw new StorageBackendException("Not supported yet.");
109 public int getEventsCount(int eventType, long startTimestamp, long endTimestamp, Group group) throws StorageBackendException {
110 throw new StorageBackendException("Not supported yet.");
114 public double getEventsPerHour(int key, long gid) throws StorageBackendException {
115 throw new StorageBackendException("Not supported yet.");
119 public int getFirstArticleNumber(Group group) throws StorageBackendException {
120 throw new StorageBackendException("Not supported yet.");
124 public Group getGroup(String name) throws StorageBackendException {
125 throw new StorageBackendException("Not supported yet.");
129 public List<Group> getGroups() throws StorageBackendException {
130 throw new StorageBackendException("Not supported yet.");
134 public List<String> getGroupsForList(String listAddress) throws StorageBackendException {
135 throw new StorageBackendException("Not supported yet.");
139 public int getLastArticleNumber(Group group) throws StorageBackendException {
140 throw new StorageBackendException("Not supported yet.");
144 public List<String> getListsForGroup(String groupname) throws StorageBackendException {
145 throw new StorageBackendException("Not supported yet.");
149 public String getOldestArticle() throws StorageBackendException {
150 throw new StorageBackendException("Not supported yet.");
154 public int getPostingsCount(String groupname) throws StorageBackendException {
155 throw new StorageBackendException("Not supported yet.");
159 public List<Subscription> getSubscriptions(int type) throws StorageBackendException {
160 throw new StorageBackendException("Not supported yet.");
164 public boolean isArticleExisting(String messageID) throws StorageBackendException {
165 throw new StorageBackendException("Not supported yet.");
169 public boolean isGroupExisting(String groupname) throws StorageBackendException {
170 throw new StorageBackendException("Not supported yet.");
174 public void purgeGroup(Group group) throws StorageBackendException {
175 throw new StorageBackendException("Not supported yet.");
179 public void setConfigValue(String key, String value) throws StorageBackendException {
180 throw new StorageBackendException("Not supported yet.");
184 public boolean update(Article article) throws StorageBackendException {
185 throw new StorageBackendException("Not supported yet.");
189 public boolean update(Group group) throws StorageBackendException {
190 throw new StorageBackendException("Not supported yet.");