All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class Acme.Nnrpd.NewsDb
java.lang.Object
   |
   +----Acme.Nnrpd.NewsDb
  -  public abstract class NewsDb
  
-  extends Object
  
Netnews database template.
 
 This is an abstract API representing a news database.
 Just the back-end, no user interface stuff at all.
 
 Fetch the software.
 Fetch the entire Acme package.
  
  -  
	NewsDb()
   -  Constructor.
 
  
  -  
	authorize(String, String)
   -  Attempt authorization.
  
 -  
	close()
   -  Shut down the news database.
  
 -  
	getArticle(NewsDbGroup, int)
   -  Get an article by group and number.
  
 -  
	getArticle(String)
   -  Get an article by message-id.
  
 -  
	getDbStamp()
   -  Get the database stamp.
  
 -  
	getGroup(String)
   -  Get a group by name.
  
 -  
	getGroups()
   -  Get an enumeration of all the groups.
  
 -  
	getGroups(long)
   -  Get an enumeration of all groups created after a given time.
  
 -  
	getGroups(long, String)
   -  Get an enumeration of all groups created after a given time that match
 the given distributions pattern.
  
 -  
	getHeader(String, NewsDbGroup, int)
   -  Get a specified header from an article by group and number.
  
 -  
	getHeaders(String[], NewsDbGroup, int, int)
   -  Get specified headers from a range of articles by group and number.
  
 -  
	getMessageIds(String, long)
   -  Get an enumeration of all message-ids received after a given time
 in groups matching the given pattern.
  
 -  
	getMessageIds(String, long, String)
   -  Get an enumeration of all message-ids received after a given time
 in groups matching the given pattern, that also match the
 This is similar to the NNTP "NEWNEWS" command.
  
 -  
	getPostingOk()
   -  Whether posting is allowed.
  
 -  
	post(String)
   -  Post an article.
 
  
NewsDb
 public NewsDb() throws NewsDbException
  -  Constructor.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
  
getDbStamp
 protected long getDbStamp() throws NewsDbException
  -  Get the database stamp.
 This is used internally when dealing with multiple news databases,
 to make sure that an obect returned from one is not passed to another.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
authorize
 public abstract boolean authorize(String user,
                                   String password) throws NewsDbException
  -  Attempt authorization.
 This is similar to the NNTP "AUTHINFO" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getPostingOk
 public abstract boolean getPostingOk() throws NewsDbException
  -  Whether posting is allowed.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getGroup
 public abstract NewsDbGroup getGroup(String groupName) throws NewsDbException
  -  Get a group by name.
 This is similar to the NNTP "GROUP" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getArticle
 public abstract NewsDbArticle getArticle(NewsDbGroup group,
                                          int artNum) throws NewsDbException
  -  Get an article by group and number.
 This is similar to the NNTP "ARTICLE" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getArticle
 public abstract NewsDbArticle getArticle(String messageId) throws NewsDbException
  -  Get an article by message-id.
 This is similar to the NNTP "ARTICLE" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getHeader
 public String getHeader(String name,
                         NewsDbGroup group,
                         int artNum) throws NewsDbException
  -  Get a specified header from an article by group and number.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getHeaders
 public abstract String[][] getHeaders(String names[],
                                       NewsDbGroup group,
                                       int firstArtNum,
                                       int lastArtNum) throws NewsDbException
  -  Get specified headers from a range of articles by group and number.
 Some implementations have special faster methods for getting
 headers from articles, e.g. an XOVER command to a remote server
 or a local overview database.  If no such fast method is available,
 this returns null and the caller should fall back on conventional
 means.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getGroups
 public abstract Enumeration getGroups() throws NewsDbException
  -  Get an enumeration of all the groups.
 This is similar to the NNTP "LIST active" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getGroups
 public abstract Enumeration getGroups(long since) throws NewsDbException
  -  Get an enumeration of all groups created after a given time.
 This is similar to the NNTP "NEWGROUPS" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getGroups
 public abstract Enumeration getGroups(long since,
                                       String distsPat) throws NewsDbException
  -  Get an enumeration of all groups created after a given time that match
 the given distributions pattern.
 This is similar to the NNTP "NEWGROUPS" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getMessageIds
 public abstract Enumeration getMessageIds(String groupsPat,
                                           long since) throws NewsDbException
  -  Get an enumeration of all message-ids received after a given time
 in groups matching the given pattern.
 This is similar to the NNTP "NEWNEWS" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
getMessageIds
 public abstract Enumeration getMessageIds(String groupsPat,
                                           long since,
                                           String distsPat) throws NewsDbException
  -  Get an enumeration of all message-ids received after a given time
 in groups matching the given pattern, that also match the
 This is similar to the NNTP "NEWNEWS" command.
 given distributions pattern.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
post
 public abstract void post(String artText) throws NewsDbException
  -  Post an article.
 This is similar to the NNTP "POST" command.
  
    -  Throws: NewsDbException
    
 -  if something goes wrong
  
 
 
 
close
 public abstract void close()
  -  Shut down the news database.
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index
ACME Java  ACME Labs