Package org.sonews.storage
Klasse Group
java.lang.Object
org.sonews.storage.Group
Represents a logical Group within this newsserver.
- Seit:
- sonews/0.5.0
- Autor:
- Christian Lins
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final intIf this flag is set the Group is marked as deleted and must not occur in any output.private intprivate longstatic final intIf this flag is set the Group is local to this server, i.e., the news are not peered.private static final org.slf4j.Loggerstatic final intIf this flag is set the Group is no real newsgroup but a mailing list mirror.private Stringstatic final intIf this flag is set the Group is considered private and only visible to clients of the private clients access list.static final intIf this flag is set the Group is marked as readonly and the posting is prohibited. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanstatic GroupgetAll()Reads and parses the groups.conf file if not done yet and returns a list of loaded Group objects.getArticle(long idx) getArticleHeads(long first, long last) longintgetFlags()longgetIndexOf(Article art) longlonggetName()longinthashCode()booleanbooleanbooleanprivate static GroupparseGroup(String str) voidsetFlag(int flag) Performs this.flags |= flag to set a specified flag and updates the data in the JDBCDatabase.voidsetInternalID(int id) voidvoidunsetFlag(int flag)
-
Felddetails
-
MAILINGLIST
public static final int MAILINGLISTIf 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.- Siehe auch:
-
READONLY
public static final int READONLYIf 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.- Siehe auch:
-
PRIVATE
public static final int PRIVATEIf this flag is set the Group is considered private and only visible to clients of the private clients access list.- Siehe auch:
-
LOCALE
public static final int LOCALEIf this flag is set the Group is local to this server, i.e., the news are not peered.- Siehe auch:
-
DELETED
public static final int DELETEDIf 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.- Siehe auch:
-
allGroups
-
allGroupNames
-
log
private static final org.slf4j.Logger log -
id
private long id -
flags
private int flags -
name
-
-
Konstruktordetails
-
Group
Constructor.- Parameter:
name-id-flags-
-
-
Methodendetails
-
parseGroup
-
getAll
Reads and parses the groups.conf file if not done yet and returns a list of loaded Group objects. If groups.conf cannot be read an empty list is returned, never null.- Gibt zurück:
- List of all groups this server handles.
-
get
-
equals
-
hashCode
public int hashCode() -
getArticle
- Parameter:
idx-- Gibt zurück:
- Löst aus:
StorageBackendException
-
getArticleHeads
public List<Pair<Long,Article>> getArticleHeads(long first, long last) throws StorageBackendException - Löst aus:
StorageBackendException
-
getArticleNumbers
- Löst aus:
StorageBackendException
-
getFirstArticleNumber
- Löst aus:
StorageBackendException
-
getFlags
public int getFlags() -
getIndexOf
- Löst aus:
StorageBackendException
-
getDescription
-
getInternalID
public long getInternalID()- Gibt zurück:
- Internal group id used for referencing in the backend
-
setInternalID
public void setInternalID(int id) -
isDeleted
public boolean isDeleted() -
isMailingList
public boolean isMailingList() -
isWriteable
public boolean isWriteable() -
getLastArticleNumber
- Löst aus:
StorageBackendException
-
getName
-
setFlag
public void setFlag(int flag) Performs this.flags |= flag to set a specified flag and updates the data in the JDBCDatabase.- Parameter:
flag-
-
unsetFlag
public void unsetFlag(int flag) -
setName
-
getPostingsCount
- Gibt zurück:
- Number of posted articles in this group.
- Löst aus:
StorageBackendException
-