org.apache.james.nntpserver.repository
Interface NNTPRepository

All Known Implementing Classes:
NNTPRepositoryImpl

public interface NNTPRepository

Abstraction of entire NNTP Repository.

Author:
Harmeet Bedi

Method Summary
 void createArticle(NNTPLineReader reader)
          Creates an article in the repository from the data in the reader.
 NNTPArticle getArticleFromID(String id)
          Gets the article with the specified id from within the repository.
 Iterator getArticlesSince(Date dt)
          Gets all articles posted since the specified date
 NNTPGroup getGroup(String groupName)
          Gets the group with the specified name from within the repository.
 Iterator getGroupsSince(Date dt)
          Gets all groups added since the specified date
 Iterator getMatchedGroups(String wildmat)
          Gets all groups that match the wildmat string
 String[] getOverviewFormat()
          Returns the ordered array of header names (including the trailing colon on each) returned in overview format for articles stored in this repository.
 boolean isReadOnly()
          Returns whether this repository is read only.
 

Method Detail

getGroup

public NNTPGroup getGroup(String groupName)
Gets the group with the specified name from within the repository.

Parameters:
groupName - the name of the group to retrieve
Returns:
the group

getArticleFromID

public NNTPArticle getArticleFromID(String id)
Gets the article with the specified id from within the repository.

Parameters:
id - the id of the article to retrieve
Returns:
the article

createArticle

public void createArticle(NNTPLineReader reader)
Creates an article in the repository from the data in the reader.

Parameters:
reader - the reader that serves as a source for the article data

getMatchedGroups

public Iterator getMatchedGroups(String wildmat)
Gets all groups that match the wildmat string

Parameters:
wildmat - the wildmat parameter
Returns:
an iterator containing the groups retrieved

getGroupsSince

public Iterator getGroupsSince(Date dt)
Gets all groups added since the specified date

Parameters:
dt - the Date that serves as a lower bound
Returns:
an iterator containing the groups retrieved

getArticlesSince

public Iterator getArticlesSince(Date dt)
Gets all articles posted since the specified date

Parameters:
dt - the Date that serves as a lower bound
Returns:
an iterator containing the articles retrieved

isReadOnly

public boolean isReadOnly()
Returns whether this repository is read only.

Returns:
whether this repository is read only

getOverviewFormat

public String[] getOverviewFormat()
Returns the ordered array of header names (including the trailing colon on each) returned in overview format for articles stored in this repository.



"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."