summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/interfaces')
-rw-r--r--src/mailman/interfaces/registrar.py9
-rw-r--r--src/mailman/interfaces/workflow.py17
2 files changed, 20 insertions, 6 deletions
diff --git a/src/mailman/interfaces/registrar.py b/src/mailman/interfaces/registrar.py
index d67334775..95c8fcd88 100644
--- a/src/mailman/interfaces/registrar.py
+++ b/src/mailman/interfaces/registrar.py
@@ -75,8 +75,9 @@ class IRegistrar(Interface):
:type mlist: `IMailingList`
:param subscriber: The user or address to subscribe.
:type email: ``IUser`` or ``IAddress``
- :return: The confirmation token string.
- :rtype: str
+ :return: The confirmation token string, or None if the workflow
+ completes (i.e. the member has been subscribed).
+ :rtype: str or None
:raises MembershipIsBannedError: when the address being subscribed
appears in the global or list-centric bans.
"""
@@ -89,6 +90,10 @@ class IRegistrar(Interface):
or the moderator must approve the subscription request.
:param token: A token matching a workflow.
+ :type token: string
+ :return: A flag indicating whether the confirmation succeeded in
+ subscribing the user or not.
+ :rtype: bool
:raises LookupError: when no workflow is associated with the token.
"""
diff --git a/src/mailman/interfaces/workflow.py b/src/mailman/interfaces/workflow.py
index b60537652..f80e38547 100644
--- a/src/mailman/interfaces/workflow.py
+++ b/src/mailman/interfaces/workflow.py
@@ -63,9 +63,18 @@ class IWorkflowStateManager(Interface):
:type name: str
:param token: A unique token identifying this workflow instance.
:type token: str
- :raises LookupError: when there's no token associated with the given
- name in the workflow table.
+ :return: The saved state associated with this name/token pair, or None
+ if the pair isn't in the database.
+ :rtype: ``IWorkflowState``
"""
- def count():
- """The number of saved workflows in the database."""
+ def discard(name, token):
+ """Throw away the saved state for a workflow.
+
+ :param name: The name of the workflow.
+ :type name: str
+ :param token: A unique token identifying this workflow instance.
+ :type token: str
+ """
+
+ count = Attribute('The number of saved workflows in the database.')