1.1 --- a/src/org/sonews/storage/impl/DrupalDatabase.java Sun Oct 09 01:17:19 2011 +0200
1.2 +++ b/src/org/sonews/storage/impl/DrupalDatabase.java Sun Oct 09 01:22:18 2011 +0200
1.3 @@ -35,7 +35,7 @@
1.4 * @author František Kučera (frantovo.cz)
1.5 */
1.6 public class DrupalDatabase implements Storage {
1.7 -
1.8 +
1.9 private static final Logger log = Logger.getLogger(DrupalDatabase.class.getName());
1.10
1.11 /**
1.12 @@ -46,35 +46,24 @@
1.13 }
1.14
1.15 @Override
1.16 - public void addArticle(Article art) throws StorageBackendException {
1.17 - log.log(Level.SEVERE, "TODO: addArticle {0}", new Object[]{art});
1.18 + public List<Group> getGroups() throws StorageBackendException {
1.19 + log.log(Level.SEVERE, "TODO: getGroups");
1.20 + /** TODO: */
1.21 + return Collections.emptyList();
1.22 }
1.23
1.24 @Override
1.25 - public void addEvent(long timestamp, int type, long groupID) throws StorageBackendException {
1.26 - log.log(Level.SEVERE, "TODO: addEvent {0} / {1} / {2}", new Object[]{timestamp, type, groupID});
1.27 + public Group getGroup(String name) throws StorageBackendException {
1.28 + log.log(Level.SEVERE, "TODO: getGroup {0}", new Object[]{name});
1.29 + /** TODO: */
1.30 + return null;
1.31 }
1.32
1.33 @Override
1.34 - public void addGroup(String groupname, int flags) throws StorageBackendException {
1.35 - log.log(Level.SEVERE, "TODO: addGroup {0} / {1}", new Object[]{groupname, flags});
1.36 - }
1.37 -
1.38 - @Override
1.39 - public int countArticles() throws StorageBackendException {
1.40 - log.log(Level.SEVERE, "TODO: countArticles");
1.41 - return 0;
1.42 - }
1.43 -
1.44 - @Override
1.45 - public int countGroups() throws StorageBackendException {
1.46 - log.log(Level.SEVERE, "TODO: countGroups");
1.47 - return 0;
1.48 - }
1.49 -
1.50 - @Override
1.51 - public void delete(String messageID) throws StorageBackendException {
1.52 - log.log(Level.SEVERE, "TODO: delete {0}", new Object[]{messageID});
1.53 + public boolean isGroupExisting(String groupname) throws StorageBackendException {
1.54 + log.log(Level.SEVERE, "TODO: isGroupExisting {0}", new Object[]{groupname});
1.55 + /** TODO: */
1.56 + return false;
1.57 }
1.58
1.59 @Override
1.60 @@ -120,6 +109,62 @@
1.61 }
1.62
1.63 @Override
1.64 + public int getFirstArticleNumber(Group group) throws StorageBackendException {
1.65 + log.log(Level.SEVERE, "TODO: getFirstArticleNumber {0}", new Object[]{group});
1.66 + /** TODO: */
1.67 + return 0;
1.68 + }
1.69 +
1.70 + @Override
1.71 + public int getLastArticleNumber(Group group) throws StorageBackendException {
1.72 + log.log(Level.SEVERE, "TODO: getLastArticleNumber {0}", new Object[]{group});
1.73 + /** TODO: */
1.74 + return 0;
1.75 + }
1.76 +
1.77 + @Override
1.78 + public boolean isArticleExisting(String messageID) throws StorageBackendException {
1.79 + log.log(Level.SEVERE, "TODO: isArticleExisting {0}", new Object[]{messageID});
1.80 + /** TODO: */
1.81 + return false;
1.82 + }
1.83 +
1.84 + //
1.85 + // --- zatím neimplementovat ---
1.86 + //
1.87 + @Override
1.88 + public void addArticle(Article art) throws StorageBackendException {
1.89 + log.log(Level.SEVERE, "TODO: addArticle {0}", new Object[]{art});
1.90 + }
1.91 +
1.92 + @Override
1.93 + public void addEvent(long timestamp, int type, long groupID) throws StorageBackendException {
1.94 + log.log(Level.SEVERE, "TODO: addEvent {0} / {1} / {2}", new Object[]{timestamp, type, groupID});
1.95 + }
1.96 +
1.97 + @Override
1.98 + public void addGroup(String groupname, int flags) throws StorageBackendException {
1.99 + log.log(Level.SEVERE, "TODO: addGroup {0} / {1}", new Object[]{groupname, flags});
1.100 + }
1.101 +
1.102 + @Override
1.103 + public int countArticles() throws StorageBackendException {
1.104 + log.log(Level.SEVERE, "TODO: countArticles");
1.105 + return 0;
1.106 + }
1.107 +
1.108 + @Override
1.109 + public int countGroups() throws StorageBackendException {
1.110 + log.log(Level.SEVERE, "TODO: countGroups");
1.111 + return 0;
1.112 + }
1.113 +
1.114 + @Override
1.115 + public void delete(String messageID) throws StorageBackendException {
1.116 + log.log(Level.SEVERE, "TODO: delete {0}", new Object[]{messageID});
1.117 + }
1.118 +
1.119 + @Override
1.120 public String getConfigValue(String key) throws StorageBackendException {
1.121 log.log(Level.SEVERE, "TODO: getConfigValue {0}", new Object[]{key});
1.122 return null;
1.123 @@ -138,40 +183,12 @@
1.124 }
1.125
1.126 @Override
1.127 - public int getFirstArticleNumber(Group group) throws StorageBackendException {
1.128 - log.log(Level.SEVERE, "TODO: getFirstArticleNumber {0}", new Object[]{group});
1.129 - /** TODO: */
1.130 - return 0;
1.131 - }
1.132 -
1.133 - @Override
1.134 - public Group getGroup(String name) throws StorageBackendException {
1.135 - log.log(Level.SEVERE, "TODO: getGroup {0}", new Object[]{name});
1.136 - /** TODO: */
1.137 - return null;
1.138 - }
1.139 -
1.140 - @Override
1.141 - public List<Group> getGroups() throws StorageBackendException {
1.142 - log.log(Level.SEVERE, "TODO: getGroups");
1.143 - /** TODO: */
1.144 - return Collections.emptyList();
1.145 - }
1.146 -
1.147 - @Override
1.148 public List<String> getGroupsForList(String listAddress) throws StorageBackendException {
1.149 log.log(Level.SEVERE, "TODO: getGroupsForList {0}", new Object[]{listAddress});
1.150 return Collections.emptyList();
1.151 }
1.152
1.153 @Override
1.154 - public int getLastArticleNumber(Group group) throws StorageBackendException {
1.155 - log.log(Level.SEVERE, "TODO: getLastArticleNumber {0}", new Object[]{group});
1.156 - /** TODO: */
1.157 - return 0;
1.158 - }
1.159 -
1.160 - @Override
1.161 public List<String> getListsForGroup(String groupname) throws StorageBackendException {
1.162 log.log(Level.SEVERE, "TODO: getListsForGroup {0}", new Object[]{groupname});
1.163 return Collections.emptyList();
1.164 @@ -196,20 +213,6 @@
1.165 }
1.166
1.167 @Override
1.168 - public boolean isArticleExisting(String messageID) throws StorageBackendException {
1.169 - log.log(Level.SEVERE, "TODO: isArticleExisting {0}", new Object[]{messageID});
1.170 - /** TODO: */
1.171 - return false;
1.172 - }
1.173 -
1.174 - @Override
1.175 - public boolean isGroupExisting(String groupname) throws StorageBackendException {
1.176 - log.log(Level.SEVERE, "TODO: isGroupExisting {0}", new Object[]{groupname});
1.177 - /** TODO: */
1.178 - return false;
1.179 - }
1.180 -
1.181 - @Override
1.182 public void purgeGroup(Group group) throws StorageBackendException {
1.183 log.log(Level.SEVERE, "TODO: purgeGroup {0}", new Object[]{group});
1.184 }