diff -r c404a87db5b7 -r 74139325d305 src/org/sonews/storage/Channel.java --- a/src/org/sonews/storage/Channel.java Sun Aug 29 17:43:58 2010 +0200 +++ b/src/org/sonews/storage/Channel.java Sun Aug 29 18:17:37 2010 +0200 @@ -33,79 +33,75 @@ public abstract class Channel { - /** - * If this flag is set the Group is no real newsgroup but a mailing list - * mirror. In that case every posting and receiving mails must go through - * the mailing list gateway. - */ - public static final int MAILINGLIST = 0x1; + /** + * If this flag is set the Group is no real newsgroup but a mailing list + * mirror. In that case every posting and receiving mails must go through + * the mailing list gateway. + */ + public static final int MAILINGLIST = 0x1; + /** + * If this flag is set the Group is marked as readonly and the posting + * is prohibited. This can be useful for groups that are synced only in + * one direction. + */ + public static final int READONLY = 0x2; + /** + * If this flag is set the Group is marked as deleted and must not occur + * in any output. The deletion is done lazily by a low priority daemon. + */ + public static final int DELETED = 0x80; - /** - * If this flag is set the Group is marked as readonly and the posting - * is prohibited. This can be useful for groups that are synced only in - * one direction. - */ - public static final int READONLY = 0x2; + public static List getAll() + { + List all = new ArrayList(); - /** - * If this flag is set the Group is marked as deleted and must not occur - * in any output. The deletion is done lazily by a low priority daemon. - */ - public static final int DELETED = 0x80; + /*List agroups = AggregatedGroup.getAll(); + if(agroups != null) + { + all.addAll(agroups); + }*/ - public static List getAll() - { - List all = new ArrayList(); + List groups = Group.getAll(); + if (groups != null) { + all.addAll(groups); + } - /*List agroups = AggregatedGroup.getAll(); - if(agroups != null) - { - all.addAll(agroups); - }*/ + return all; + } - List groups = Group.getAll(); - if(groups != null) - { - all.addAll(groups); - } + public static Channel getByName(String name) + throws StorageBackendException + { + return StorageManager.current().getGroup(name); + } - return all; - } + public abstract Article getArticle(long idx) + throws StorageBackendException; - public static Channel getByName(String name) - throws StorageBackendException - { - return StorageManager.current().getGroup(name); - } + public abstract List> getArticleHeads( + final long first, final long last) + throws StorageBackendException; - public abstract Article getArticle(long idx) - throws StorageBackendException; + public abstract List getArticleNumbers() + throws StorageBackendException; - public abstract List> getArticleHeads( - final long first, final long last) - throws StorageBackendException; + public abstract long getFirstArticleNumber() + throws StorageBackendException; - public abstract List getArticleNumbers() - throws StorageBackendException; + public abstract long getIndexOf(Article art) + throws StorageBackendException; - public abstract long getFirstArticleNumber() - throws StorageBackendException; + public abstract long getInternalID(); - public abstract long getIndexOf(Article art) - throws StorageBackendException; + public abstract long getLastArticleNumber() + throws StorageBackendException; - public abstract long getInternalID(); + public abstract String getName(); - public abstract long getLastArticleNumber() - throws StorageBackendException; + public abstract long getPostingsCount() + throws StorageBackendException; - public abstract String getName(); - - public abstract long getPostingsCount() - throws StorageBackendException; + public abstract boolean isDeleted(); - public abstract boolean isDeleted(); - - public abstract boolean isWriteable(); - + public abstract boolean isWriteable(); }