summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/mailinglist.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/interfaces/mailinglist.py')
-rw-r--r--src/mailman/interfaces/mailinglist.py36
1 files changed, 36 insertions, 0 deletions
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.
+ """