summaryrefslogtreecommitdiff
path: root/Mailman/interfaces/mlistrosters.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/interfaces/mlistrosters.py')
-rw-r--r--Mailman/interfaces/mlistrosters.py96
1 files changed, 96 insertions, 0 deletions
diff --git a/Mailman/interfaces/mlistrosters.py b/Mailman/interfaces/mlistrosters.py
new file mode 100644
index 000000000..1b407f472
--- /dev/null
+++ b/Mailman/interfaces/mlistrosters.py
@@ -0,0 +1,96 @@
+# Copyright (C) 2007 by the Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+
+"""Interface for mailing list rosters and roster sets."""
+
+from zope.interface import Interface, Attribute
+
+
+
+class IMailingListRosters(Interface):
+ """Mailing list rosters, roster sets, and members.
+
+ This are all the email addresses that might possibly get messages from or
+ relating to this mailing list.
+ """
+
+ owners = Attribute(
+ """The IUser owners of this mailing list.
+
+ This does not include the IUsers who are moderators but not owners of
+ the mailing list.""")
+
+ moderators = Attribute(
+ """The IUser moderators of this mailing list.
+
+ This does not include the IUsers who are owners but not moderators of
+ the mailing list.""")
+
+ administrators = Attribute(
+ """The IUser administrators of this mailing list.
+
+ This includes the IUsers who are both owners and moderators of the
+ mailing list.""")
+
+ owner_rosters = Attribute(
+ """An iterator over the IRosters containing all the owners of this
+ mailing list.""")
+
+ moderator_rosters = Attribute(
+ """An iterator over the IRosters containing all the moderators of this
+ mailing list.""")
+
+ def add_owner_roster(roster):
+ """Add an IRoster to this mailing list's set of owner rosters."""
+
+ def delete_owner_roster(roster):
+ """Remove an IRoster from this mailing list's set of owner rosters."""
+
+ def add_moderator_roster(roster):
+ """Add an IRoster to this mailing list's set of moderator rosters."""
+
+ def delete_moderator_roster(roster):
+ """Remove an IRoster from this mailing list's set of moderator
+ rosters."""
+
+ members = Attribute(
+ """An iterator over all the members of the mailing list, regardless of
+ whether they are to receive regular messages or digests, or whether
+ they have their delivery disabled or not.""")
+
+ regular_members = Attribute(
+ """An iterator over all the IMembers who are to receive regular
+ postings (i.e. non-digests) from the mailing list, regardless of
+ whether they have their delivery disabled or not.""")
+
+ digest_members = Attribute(
+ """An iterator over all the IMembers who are to receive digests of
+ postings to this mailing list, regardless of whether they have their
+ deliver disabled or not, or of the type of digest they are to
+ receive.""")
+
+ member_rosters = Attribute(
+ """An iterator over the IRosters containing all the members of this
+ mailing list.""")
+
+ def add_member_roster(roster):
+ """Add the given IRoster to the list of rosters for the members of this
+ mailing list."""
+
+ def remove_member_roster(roster):
+ """Remove the given IRoster to the list of rosters for the members of
+ this mailing list."""