| java.lang.Object org.apache.james.nntpserver.repository.ArticleIDRepository
ArticleIDRepository | public class ArticleIDRepository (Code) | | ArticleIDRepository: contains one file for each article.
the file name is Base64 encoded article ID
The first line of the file is '#
the rest of line have =
Allows fast lookup of a message by message id.
This class allows a process to iterate and synchronize messages with other NNTP Servers.
This may be inefficient. It may be better to use an alternate, more
efficient process for synchronization and this class for sanity check.
|
ArticleIDRepository | ArticleIDRepository(File root, String articleIDDomainSuffix)(Code) | | |
addArticle | void addArticle(String articleID, Properties prop) throws IOException(Code) | | Add the article information to the repository.
Parameters: prop - contains the newsgroup name and article number. |
generateArticleID | String generateArticleID()(Code) | | Generate a new article ID for use in the repository.
|
getArticle | NNTPArticle getArticle(NNTPRepository repo, String id) throws IOException(Code) | | Get the article from the NNTP respository with the specified id.
Parameters: repo - the NNTP repository where the article is stored Parameters: id - the id of the article to retrieve the article throws: IOException - if the ID information cannot be loaded |
getFileFromID | File getFileFromID(String articleID)(Code) | | Returns the file in the repository corresponding to the specified
article ID.
Parameters: articleID - the article ID the repository file |
isExists | boolean isExists(String articleID)(Code) | | Returns whether the article ID is in the repository
Parameters: articleID - the article ID whether the article ID is in the repository |
|
|