diff options
| author | Barry Warsaw | 2010-02-23 16:37:48 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2010-02-23 16:37:48 -0500 |
| commit | 34d4c62d414acbd7300efdb536070db3ac849979 (patch) | |
| tree | 0d592aacacdd88452b48abc2afe8c2a12956a27e /src/mailman/interfaces/listmanager.py | |
| parent | 0fa9260a3d23b7ba17de727e66bcc27a0aeacc29 (diff) | |
| download | mailman-34d4c62d414acbd7300efdb536070db3ac849979.tar.gz mailman-34d4c62d414acbd7300efdb536070db3ac849979.tar.zst mailman-34d4c62d414acbd7300efdb536070db3ac849979.zip | |
Diffstat (limited to 'src/mailman/interfaces/listmanager.py')
| -rw-r--r-- | src/mailman/interfaces/listmanager.py | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/src/mailman/interfaces/listmanager.py b/src/mailman/interfaces/listmanager.py index f47fe658e..f83791079 100644 --- a/src/mailman/interfaces/listmanager.py +++ b/src/mailman/interfaces/listmanager.py @@ -73,6 +73,25 @@ class IListManager(Interface): :raise `ListAlreadyExistsError` if the named list already exists. """ + + def new(fqdn_listname): + """Add a new mailing list. + + The mailing may not exist yet, but the domain specified in + `fqdn_listname` must exist. This is a higher level interface than + create() and should generally be used instead of that method. + + :param fqdn_listname: The fully qualified name for the new + mailing list. + :type fqdn_listname: string + :return: The new mailing list + :rtype: `IMailingList` + :raises `BadDomainSpecificationError`: when the hostname part of + `fqdn_listname` does not exist. + :raises `ListAlreadyExistsError`: when the mailing list already + exists. + """ + def get(fqdn_listname): """Return the mailing list with the given name, if it exists. @@ -93,6 +112,12 @@ class IListManager(Interface): """An iterator over all the mailing list objects managed by this list manager.""") + def __iter__(): + """An iterator over all the mailing lists. + + :return: iterator over `IMailingList`. + """ + names = Attribute( """An iterator over the fully qualified list names of all mailing lists managed by this list manager.""") @@ -103,20 +128,3 @@ class IListManager(Interface): :return: The list of all known mailing lists. :rtype: list of `IMailingList` """ - - def new(fqdn_listname): - """Add a new maling list. - - The mailing may not exist yet, but the domain specified in - `fqdn_listname` must exist. - - :param fqdn_listname: The fully qualified name for the new - mailing list. - :type fqdn_listname: string - :return: The new mailing list - :rtype: `IMailingList` - :raises `BadDomainSpecificationError`: when the hostname part of - `fqdn_listname` does not exist. - :raises `ListAlreadyExistsError`: when the mailing list already - exists. - """ |
