diff -r 7f84f4de2893 -r e118b4d60029 src/org/sonews/storage/Group.java --- a/src/org/sonews/storage/Group.java Mon Jun 06 20:12:21 2011 +0200 +++ b/src/org/sonews/storage/Group.java Sun Sep 11 14:19:19 2011 +0200 @@ -27,9 +27,28 @@ * @author Christian Lins * @since sonews/0.5.0 */ -// TODO: This class should not be public! public class Group extends 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 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; + private long id = 0; private int flags = -1; private String name = null; @@ -47,8 +66,10 @@ } /** + * Constructor. * @param name * @param id + * @param flags */ public Group(final String name, final long id, final int flags) { this.id = id; @@ -99,7 +120,6 @@ */ public long getInternalID() { assert id > 0; - return id; } @@ -133,6 +153,10 @@ this.flags |= flag; } + public void unsetFlag(final int flag) { + this.flags &= ~flag; + } + public void setName(final String name) { this.name = name; }