org.apache.james.nntpserver.repository
Interface NNTPRepository

All Known Implementing Classes:
NNTPRepositoryImpl

public interface NNTPRepository

Abstraction of entire NNTP Repository.


Method Summary
 void createArticle(java.io.InputStream in)
          Creates an article in the repository from the data in the reader.
 NNTPArticle getArticleFromID(java.lang.String id)
          Gets the article with the specified id from within the repository.
 java.util.Iterator getArticlesSince(java.util.Date dt)
          Gets all articles posted since the specified date
 NNTPGroup getGroup(java.lang.String groupName)
          Gets the group with the specified name from within the repository.
 java.util.Iterator getGroupsSince(java.util.Date dt)
          Gets all groups added since the specified date
 java.util.Iterator getMatchedGroups(java.lang.String wildmat)
          Gets all groups that match the wildmat string
 java.lang.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

NNTPGroup getGroup(java.lang.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

NNTPArticle getArticleFromID(java.lang.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

void createArticle(java.io.InputStream in)
Creates an article in the repository from the data in the reader. TODO: Change this to be more OO and pass in a MimeMessage

Parameters:
in - the InputStream that serves as a source for the message data.

getMatchedGroups

java.util.Iterator getMatchedGroups(java.lang.String wildmat)
Gets all groups that match the wildmat string

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

getGroupsSince

java.util.Iterator getGroupsSince(java.util.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

java.util.Iterator getArticlesSince(java.util.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

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

Returns:
whether this repository is read only

getOverviewFormat

java.lang.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 © 2002-2007 The Apache Software Foundation. All Rights Reserved.