src/org/sonews/storage/impl/DrupalDatabase.java
author František Kučera <franta-hg@frantovo.cz>
Sun Oct 09 00:00:25 2011 +0200 (2011-10-09)
changeset 64 72950b29569e
parent 63 d883d4ab7b9d
child 65 b58cab5be0f4
permissions -rw-r--r--
Drupal: bez dědičnosti, implementujeme rovnou rozhraní (nelze dědit).
     1 /*
     2  *   SONEWS News Server
     3  *   see AUTHORS for the list of contributors
     4  *
     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.
     9  *
    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.
    14  *
    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/>.
    17  */
    18 package org.sonews.storage.impl;
    19 
    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;
    29 
    30 /**
    31  *
    32  * @author František Kučera (frantovo.cz)
    33  */
    34 public class DrupalDatabase implements Storage {
    35 
    36 	/**
    37 	 * Rises the database: reconnect and recreate all prepared statements.
    38 	 * @throws java.lang.SQLException
    39 	 */
    40 	protected void arise() throws SQLException {
    41 	}
    42 
    43 	@Override
    44 	public void addArticle(Article art) throws StorageBackendException {
    45 		throw new StorageBackendException("Not supported yet.");
    46 	}
    47 
    48 	@Override
    49 	public void addEvent(long timestamp, int type, long groupID) throws StorageBackendException {
    50 		throw new StorageBackendException("Not supported yet.");
    51 	}
    52 
    53 	@Override
    54 	public void addGroup(String groupname, int flags) throws StorageBackendException {
    55 		throw new StorageBackendException("Not supported yet.");
    56 	}
    57 
    58 	@Override
    59 	public int countArticles() throws StorageBackendException {
    60 		throw new StorageBackendException("Not supported yet.");
    61 	}
    62 
    63 	@Override
    64 	public int countGroups() throws StorageBackendException {
    65 		throw new StorageBackendException("Not supported yet.");
    66 	}
    67 
    68 	@Override
    69 	public void delete(String messageID) throws StorageBackendException {
    70 		throw new StorageBackendException("Not supported yet.");
    71 	}
    72 
    73 	@Override
    74 	public Article getArticle(String messageID) throws StorageBackendException {
    75 		throw new StorageBackendException("Not supported yet.");
    76 	}
    77 
    78 	@Override
    79 	public Article getArticle(long articleIndex, long groupID) throws StorageBackendException {
    80 		throw new StorageBackendException("Not supported yet.");
    81 	}
    82 
    83 	@Override
    84 	public List<Pair<Long, ArticleHead>> getArticleHeads(Group group, long first, long last) throws StorageBackendException {
    85 		throw new StorageBackendException("Not supported yet.");
    86 	}
    87 
    88 	@Override
    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.");
    91 	}
    92 
    93 	@Override
    94 	public long getArticleIndex(Article art, Group group) throws StorageBackendException {
    95 		throw new StorageBackendException("Not supported yet.");
    96 	}
    97 
    98 	@Override
    99 	public List<Long> getArticleNumbers(long groupID) throws StorageBackendException {
   100 		throw new StorageBackendException("Not supported yet.");
   101 	}
   102 
   103 	@Override
   104 	public String getConfigValue(String key) throws StorageBackendException {
   105 		throw new StorageBackendException("Not supported yet.");
   106 	}
   107 
   108 	@Override
   109 	public int getEventsCount(int eventType, long startTimestamp, long endTimestamp, Group group) throws StorageBackendException {
   110 		throw new StorageBackendException("Not supported yet.");
   111 	}
   112 
   113 	@Override
   114 	public double getEventsPerHour(int key, long gid) throws StorageBackendException {
   115 		throw new StorageBackendException("Not supported yet.");
   116 	}
   117 
   118 	@Override
   119 	public int getFirstArticleNumber(Group group) throws StorageBackendException {
   120 		throw new StorageBackendException("Not supported yet.");
   121 	}
   122 
   123 	@Override
   124 	public Group getGroup(String name) throws StorageBackendException {
   125 		throw new StorageBackendException("Not supported yet.");
   126 	}
   127 
   128 	@Override
   129 	public List<Group> getGroups() throws StorageBackendException {
   130 		throw new StorageBackendException("Not supported yet.");
   131 	}
   132 
   133 	@Override
   134 	public List<String> getGroupsForList(String listAddress) throws StorageBackendException {
   135 		throw new StorageBackendException("Not supported yet.");
   136 	}
   137 
   138 	@Override
   139 	public int getLastArticleNumber(Group group) throws StorageBackendException {
   140 		throw new StorageBackendException("Not supported yet.");
   141 	}
   142 
   143 	@Override
   144 	public List<String> getListsForGroup(String groupname) throws StorageBackendException {
   145 		throw new StorageBackendException("Not supported yet.");
   146 	}
   147 
   148 	@Override
   149 	public String getOldestArticle() throws StorageBackendException {
   150 		throw new StorageBackendException("Not supported yet.");
   151 	}
   152 
   153 	@Override
   154 	public int getPostingsCount(String groupname) throws StorageBackendException {
   155 		throw new StorageBackendException("Not supported yet.");
   156 	}
   157 
   158 	@Override
   159 	public List<Subscription> getSubscriptions(int type) throws StorageBackendException {
   160 		throw new StorageBackendException("Not supported yet.");
   161 	}
   162 
   163 	@Override
   164 	public boolean isArticleExisting(String messageID) throws StorageBackendException {
   165 		throw new StorageBackendException("Not supported yet.");
   166 	}
   167 
   168 	@Override
   169 	public boolean isGroupExisting(String groupname) throws StorageBackendException {
   170 		throw new StorageBackendException("Not supported yet.");
   171 	}
   172 
   173 	@Override
   174 	public void purgeGroup(Group group) throws StorageBackendException {
   175 		throw new StorageBackendException("Not supported yet.");
   176 	}
   177 
   178 	@Override
   179 	public void setConfigValue(String key, String value) throws StorageBackendException {
   180 		throw new StorageBackendException("Not supported yet.");
   181 	}
   182 
   183 	@Override
   184 	public boolean update(Article article) throws StorageBackendException {
   185 		throw new StorageBackendException("Not supported yet.");
   186 	}
   187 
   188 	@Override
   189 	public boolean update(Group group) throws StorageBackendException {
   190 		throw new StorageBackendException("Not supported yet.");
   191 	}
   192 }