org.apache.james.nntpserver.repository
Interface NNTPArticle


public interface NNTPArticle

Contract exposed by a NewsGroup Article

Author:
Harmeet Bedi

Method Summary
 int getArticleNumber()
          Gets the article number for this article.
 NNTPGroup getGroup()
          Gets the group containing this article.
 String getHeader(String headerName)
          Gets the header with the specified headerName.
 String getUniqueID()
          Gets the unique message id for this article.
 void writeArticle(PrintWriter wrt)
          Writes the whole article to a writer.
 void writeBody(PrintWriter wrt)
          Writes the article body to a writer.
 void writeHead(PrintWriter wrt)
          Writes the article headers to a writer.
 void writeOverview(PrintWriter wrt)
          Writes the article overview to a writer.
 

Method Detail

getGroup

public NNTPGroup getGroup()
Gets the group containing this article.

Returns:
the group

getArticleNumber

public int getArticleNumber()
Gets the article number for this article.

Returns:
the article number

getUniqueID

public String getUniqueID()
Gets the unique message id for this article.

Returns:
the message id

writeArticle

public void writeArticle(PrintWriter wrt)
Writes the whole article to a writer.

Parameters:
wrt - the PrintWriter to which the article is written.

writeHead

public void writeHead(PrintWriter wrt)
Writes the article headers to a writer.

Parameters:
wrt - the PrintWriter to which the article is written.

writeBody

public void writeBody(PrintWriter wrt)
Writes the article body to a writer.

Parameters:
wrt - the PrintWriter to which the article is written.

writeOverview

public void writeOverview(PrintWriter wrt)
Writes the article overview to a writer.

Parameters:
wrt - the PrintWriter to which the article is written.

getHeader

public String getHeader(String headerName)
Gets the header with the specified headerName. Returns null if the header doesn't exist.

Parameters:
headerName - the name of the header being retrieved.


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