ó ÿgdSc@s dZdefd„ƒYZdS(sØ sphinx.websupport.storage ~~~~~~~~~~~~~~~~~~~~~~~~~ Storage for the websupport package. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. tStorageBackendcBskeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( cCsdS(s†Called immediately before the build process begins. Use this to prepare the StorageBackend for the addition of nodes. N((tself((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pyt pre_build scCs tƒ‚dS(sPCheck to see if a node exists. :param id: the id to check for. N(tNotImplementedError(Rtid((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pythas_nodescCs tƒ‚dS(sÐAdd a node to the StorageBackend. :param id: a unique id for the comment. :param document: the name of the document the node belongs to. :param source: the source files name. N(R(RRtdocumenttsource((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pytadd_nodescCsdS(sjCalled after a build has completed. Use this to finalize the addition of nodes if needed. N((R((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pyt post_build#sc Cs tƒ‚dS(sCCalled when a comment is being added. :param text: the text of the comment :param displayed: whether the comment should be displayed :param username: the name of the user adding the comment :param time: a date object with the time the comment was added :param proposal: the text of the proposal the user made :param node_id: the id of the node that the comment is being added to :param parent_id: the id of the comment's parent comment. :param moderator: whether the user adding the comment is a moderator N(R( Rttextt displayedtusernamettimetproposaltnode_idt parent_idt moderator((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pyt add_comment)s cCs tƒ‚dS(s‹Delete a comment. Raises :class:`~sphinx.websupport.errors.UserNotAuthorizedError` if moderator is False and `username` doesn't match the username on the comment. :param comment_id: The id of the comment being deleted. :param username: The username of the user requesting the deletion. :param moderator: Whether the user is a moderator. N(R(Rt comment_idR R((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pytdelete_comment8s cCs tƒ‚dS(sÿGet metadata for a document. This is currently just a dict of node_id's with associated comment counts. :param docname: the name of the document to get metadata for. :param moderator: whether the requester is a moderator. N(R(RtdocnameR((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pyt get_metadataEscCs tƒ‚dS(s¹Called to retrieve all data for a node. This should return a dict with two keys, *source* and *comments* as described by :class:`~sphinx.websupport.WebSupport`'s :meth:`~sphinx.websupport.WebSupport.get_data` method. :param node_id: The id of the node to get data for. :param username: The name of the user requesting the data. :param moderator: Whether the requestor is a moderator. N(R(RRR R((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pytget_dataNs cCs tƒ‚dS(sProcess a vote that is being cast. `value` will be either -1, 0, or 1. :param comment_id: The id of the comment being voted on. :param username: The username of the user casting the vote. :param value: The value of the vote being cast. N(R(RRR tvalue((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pyt process_voteZscCs tƒ‚dS(sIf a user is allowed to change their username this method should be called so that there is not stagnate data in the storage system. :param old_username: The username being changed. :param new_username: What the username is being changed to. N(R(Rt old_usernamet new_username((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pytupdate_usernamedscCs tƒ‚dS(sÆCalled when a moderator accepts a comment. After the method is called the comment should be displayed to all users. :param comment_id: The id of the comment being accepted. N(R(RR((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pytaccept_commentms( t__name__t __module__RRRR RRRRRRR(((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pyR s     N(t__doc__tobjectR(((sL/usr/local/lib/python2.7/site-packages/sphinx/websupport/storage/__init__.pyt s