summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/interfaces')
-rw-r--r--src/mailman/interfaces/archiver.py2
-rw-r--r--src/mailman/interfaces/listmanager.py8
-rw-r--r--src/mailman/interfaces/mailinglist.py36
3 files changed, 42 insertions, 4 deletions
diff --git a/src/mailman/interfaces/archiver.py b/src/mailman/interfaces/archiver.py
index 5f074503e..aac372865 100644
--- a/src/mailman/interfaces/archiver.py
+++ b/src/mailman/interfaces/archiver.py
@@ -50,6 +50,8 @@ class IArchiver(Interface):
"""An interface to the archiver."""
name = Attribute('The name of this archiver')
+ is_enabled = Attribute(
+ 'A flag indicating whether this archiver is enabled site-wide.')
def list_url(mlist):
"""Return the url to the top of the list's archive.
diff --git a/src/mailman/interfaces/listmanager.py b/src/mailman/interfaces/listmanager.py
index 45b12af53..837abf310 100644
--- a/src/mailman/interfaces/listmanager.py
+++ b/src/mailman/interfaces/listmanager.py
@@ -97,9 +97,9 @@ class IListManager(Interface):
def create(fqdn_listname):
"""Create a mailing list with the given name.
- :type fqdn_listname: Unicode
:param fqdn_listname: The fully qualified name of the mailing list,
e.g. `mylist@example.com`.
+ :type fqdn_listname: Unicode
:return: The newly created `IMailingList`.
:raise `ListAlreadyExistsError` if the named list already exists.
"""
@@ -107,8 +107,8 @@ class IListManager(Interface):
def get(fqdn_listname):
"""Return the mailing list with the given name, if it exists.
- :type fqdn_listname: Unicode.
:param fqdn_listname: The fully qualified name of the mailing list.
+ :type fqdn_listname: Unicode.
:return: the matching `IMailingList` or None if the named list does
not exist.
"""
@@ -116,8 +116,8 @@ class IListManager(Interface):
def get_by_list_id(list_id):
"""Return the mailing list with the given list id, if it exists.
- :type fqdn_listname: Unicode.
:param fqdn_listname: The fully qualified name of the mailing list.
+ :type fqdn_listname: Unicode.
:return: the matching `IMailingList` or None if the named list does
not exist.
"""
@@ -125,8 +125,8 @@ class IListManager(Interface):
def delete(mlist):
"""Remove the mailing list from the database.
- :type mlist: `IMailingList`
:param mlist: The mailing list to delete.
+ :type mlist: `IMailingList`
"""
mailing_lists = Attribute(
diff --git a/src/mailman/interfaces/mailinglist.py b/src/mailman/interfaces/mailinglist.py
index 7beaf9c46..b12d84ec9 100644
--- a/src/mailman/interfaces/mailinglist.py
+++ b/src/mailman/interfaces/mailinglist.py
@@ -23,6 +23,8 @@ __metaclass__ = type
__all__ = [
'IAcceptableAlias',
'IAcceptableAliasSet',
+ 'IListArchiver',
+ 'IListArchiverSet',
'IMailingList',
'Personalization',
'ReplyToMunging',
@@ -791,3 +793,37 @@ class IAcceptableAliasSet(Interface):
aliases = Attribute(
"""An iterator over all the acceptable aliases.""")
+
+
+
+class IListArchiver(Interface):
+ """An archiver for a mailing list.
+
+ The named archiver must be enabled site-wide in order for a mailing list
+ to be able to enable it.
+ """
+
+ mailing_list = Attribute('The associated mailing list.')
+
+ name = Attribute('The name of the archiver.')
+
+ is_enabled = Attribute('Is this archiver enabled for this mailing list?')
+
+ system_archiver = Attribute(
+ 'The associated system-wide IArchiver instance.')
+
+
+class IListArchiverSet(Interface):
+ """The set of archivers (enabled or disabled) for a mailing list."""
+
+ archivers = Attribute(
+ """An iterator over all the archivers for this mailing list.""")
+
+ def get(archiver_name):
+ """Return the `IListArchiver` with the given name, if it exists.
+
+ :param archiver_name: The name of the archiver.
+ :type archiver_name: unicode.
+ :return: the matching `IListArchiver` or None if the named archiver
+ does not exist.
+ """