t.n.d.PickleStorage(_ModerationMixin) : class documentation

Part of twisted.news.database View Source View In Hierarchy

Implements interfaces: twisted.news.database.INewsStorage

A trivial NewsStorage implementation using pickles

Contains numerous flaws and is generally unsuitable for any real applications. Consider yourself warned!

Method __init__
Method getModerators Undocumented
Method listRequest Returns a list of 4-tuples: (name, max index, min index, flags)
Method subscriptionRequest Returns a deferred whose callback will be passed the list of recommended subscription groups for new server users
Method postRequest Returns a deferred whose callback will be invoked if 'message' is successfully posted to one or more specified groups and whose errback will be invoked otherwise.
Method overviewRequest Returns a deferred whose callback will be passed the a list of headers describing this server's overview format.
Method xoverRequest No summary
Method xhdrRequest No summary
Method listGroupRequest Returns a deferred whose callback will be passed a two-tuple of (group name, [article indices])
Method groupRequest Returns a deferred whose callback will be passed a five-tuple of (group name, article count, highest index, lowest index, group flags)
Method articleExistsRequest Returns a deferred whose callback will be passed with a true value if a message with the specified Message-ID exists in the database and with a false value otherwise.
Method articleRequest No summary
Method headRequest No summary
Method bodyRequest No summary
Method flush Undocumented
Method load Undocumented

Inherited from _ModerationMixin:

Method notifyModerators Send an article to a list of group moderators to be moderated.
def __init__(self, filename, groups=None, moderators=(), mailhost=None, sender=None): (source)
ParametersmailhostA str giving the mail exchange host which will accept moderation emails from this server. Must accept emails destined for any address specified as a moderator.
senderA str giving the address which will be used as the sender of any moderation email generated by this server.
def getModerators(self, groups): (source)
Undocumented
def listRequest(self): (source)
Returns a list of 4-tuples: (name, max index, min index, flags)
def subscriptionRequest(self): (source)
Returns a deferred whose callback will be passed the list of recommended subscription groups for new server users
def postRequest(self, message): (source)
Returns a deferred whose callback will be invoked if 'message' is successfully posted to one or more specified groups and whose errback will be invoked otherwise.
def overviewRequest(self): (source)
Returns a deferred whose callback will be passed the a list of headers describing this server's overview format.
def xoverRequest(self, group, low, high): (source)
Returns a deferred whose callback will be passed a list of xover headers for the given group over the given range. If low is None, the range starts at the first article. If high is None, the range ends at the last article.
def xhdrRequest(self, group, low, high, header): (source)
Returns a deferred whose callback will be passed a list of XHDR data for the given group over the given range. If low is None, the range starts at the first article. If high is None, the range ends at the last article.
def listGroupRequest(self, group): (source)
Returns a deferred whose callback will be passed a two-tuple of (group name, [article indices])
def groupRequest(self, group): (source)
Returns a deferred whose callback will be passed a five-tuple of (group name, article count, highest index, lowest index, group flags)
def articleExistsRequest(self, id): (source)
Returns a deferred whose callback will be passed with a true value if a message with the specified Message-ID exists in the database and with a false value otherwise.
def articleRequest(self, group, index, id=None): (source)
Returns a deferred whose callback will be passed a file-like object containing the full article text (headers and body) for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist. If id is not None, index is ignored and the article with the given Message-ID will be returned instead, along with its index in the specified group.
def headRequest(self, group, index): (source)
Returns a deferred whose callback will be passed the header for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist.
def bodyRequest(self, group, index): (source)
Returns a deferred whose callback will be passed the body for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist.
def flush(self): (source)
Undocumented
def load(self, filename, groups=None, moderators=()): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2012-09-01 11:44:56.