l.r.i.m.IMailingList(Interface) : interface documentation

Part of lp.registry.interfaces.mailinglist View In Hierarchy

A mailing list.
PublicPersonChoice team The team that this mailing list is associated with.
PublicPersonChoice registrant The person who registered the mailing list.
Datetime date_registered The date on which this mailing list was registered.
PublicPersonChoice reviewer The person who reviewed this mailing list registration, or None if the registration has not yet been reviewed.
Datetime date_reviewed The date on which this mailing list registration was reviewed, or None if the registration has not yet been reviewed.
Datetime date_activated The date on which this mailing list was activated, meaning that the Mailman process has successfully created it. This may be None if the mailing list has not yet been activated, or that its activation has failed.
Choice status The status of the mailing list.
Text welcome_message Any instructions or links that should be sent to new subscribers to this mailing list.
TextLine address The text representation of this team's email address.
TextLine archive_url This is the url to the archive if the mailing list has ever activated. Such a list, even if now inactive, may still have an archive. If the list has never been activated, this will be None.
Bool is_public Undocumented
Bool is_usable This doesn't necessarily mean that the list is in perfect shape; its status might be MailingListStatus.MOD_FAILED. But it should be able to handle messages.
Method startConstructing Set the status to the MailingListStatus.CONSTRUCTING state.
Method startUpdating Set the status to the MailingListStatus.UPDATING state.
Method transitionToStatus Transition the list's state after a remote action has taken place.
Method deactivate Deactivate the mailing list.
Method reactivate Reactivate the mailing list.
Method getSubscription Get a person's subscription details for the mailing list.
Method subscribe Subscribe a person to the mailing list.
Method unsubscribe Unsubscribe the person from the mailing list.
Method changeAddress Change the address a person is subscribed with.
Method getSubscribers Return the set of subscribers.
Method holdMessage Hold a message for approval on this mailing list.
Method getReviewableMessages Return the set of all held messages for this list requiring review.
Method purge Place the mailing list into the PURGED state, if safe to do so.
team =
The team that this mailing list is associated with.
registrant =
The person who registered the mailing list.
date_registered =
The date on which this mailing list was registered.
reviewer =
The person who reviewed this mailing list registration, or None if the registration has not yet been reviewed.
date_reviewed =
The date on which this mailing list registration was reviewed, or None if the registration has not yet been reviewed.
date_activated =
The date on which this mailing list was activated, meaning that the Mailman process has successfully created it. This may be None if the mailing list has not yet been activated, or that its activation has failed.
status =
The status of the mailing list.
welcome_message =
Any instructions or links that should be sent to new subscribers to this mailing list.
address =
The text representation of this team's email address.
archive_url =
This is the url to the archive if the mailing list has ever activated. Such a list, even if now inactive, may still have an archive. If the list has never been activated, this will be None.
is_public =
Undocumented
is_usable =
This doesn't necessarily mean that the list is in perfect shape; its status might be MailingListStatus.MOD_FAILED. But it should be able to handle messages.
def startConstructing():
Set the status to the MailingListStatus.CONSTRUCTING state.

This state change happens when Mailman pulls the list approved mailing lists and begins constructing them.

RaisesAssertionErrorWhen prior to constructing, the status of the mailing list is not MailingListStatus.APPROVED.
def startUpdating():
Set the status to the MailingListStatus.UPDATING state.

This state change happens when Mailman pulls the list of modified mailing lists and begins updating them.

RaisesAssertionErrorWhen prior to updating, the status if the mailing list is not MailingListStatus.MODIFIED.
def transitionToStatus(target_state):
Transition the list's state after a remote action has taken place.

This sets the status of the mailing list to reflect the results of action by Mailman. It handles various state changes, updating other attributes such as the activate date as necessary.

Parameterstarget_stateThe new state.
RaisesAssertionErrorWhen an invalid state transition is made.
def deactivate():
Deactivate the mailing list.

This sets the status to MailingListStatus.INACTIVE.

RaisesAssertionErrorWhen prior to deactivation, the status of the mailing list is not MailingListStatus.ACTIVE.
def reactivate():
Reactivate the mailing list.

This sets the status to MailingListStatus.APPROVED.

RaisesAssertionErrorWhen prior to reactivation, the status of the mailing list is not MailingListStatus.INACTIVE.
def getSubscription(person):
Get a person's subscription details for the mailing list.
ParameterspersonThe person whose subscription details to get.
ReturnsIf the person is subscribed to this mailing list, an IMailingListSubscription. Otherwise, None.
def subscribe(person, address=None):
Subscribe a person to the mailing list.
ParameterspersonThe person to subscribe to the mailing list. The person must be a member (either direct or indirect) of the team linked to this mailing list.
addressThe IEmailAddress to use for the subscription. The address must be owned by person. If None (the default), then the person's preferred email address is used. If the person's preferred address changes, their subscription address will change as well.
RaisesCannotSubscribeRaised when the person is not allowed to subscribe to the mailing list with the given address. For example, this is raised when the person is not a member of the team linked to this mailing list, when person is a team, or when person does not own the given email address.
def unsubscribe(person):
Unsubscribe the person from the mailing list.
ParameterspersonA member of the mailing list.
RaisesCannotUnsubscribeRaised when the person is not a member of the mailing list.
def changeAddress(person, address):
Change the address a person is subscribed with.
ParameterspersonThe mailing list subscriber.
addressThe new IEmailAddress to use for the subscription. The address must be owned by person. If None, the person's preferred email address is used. If the person's preferred address changes, their subscription address will change as well.
RaisesCannotChangeSubscriptionRaised when the person is not a allowed to change their subscription address. For example, this is raised when the person is not a member of the team linked to this mailing list, when person is a team, or when person does not own the given email address.
def getSubscribers():
Return the set of subscribers.

:return: a result set of the subscribers sorted by full name.  These
are the people who will receive messages posted to the mailing list.
def holdMessage(message):
Hold a message for approval on this mailing list.
ParametersmessageThe IMessage to hold.
ReturnsThe IMessageApproval representing the held message.
def getReviewableMessages(message_id_filter=None):
Return the set of all held messages for this list requiring review.
Parametersmessage_id_filterIf supplied only messages with message ids in the filter are returned.
ReturnsA sequence of IMessageApproval`s for this mailing list, where the status is `PostedMessageStatus.NEW. The returned set is ordered first by the date the message was posted, then by Message-ID.
def purge():
Place the mailing list into the PURGED state, if safe to do so.
RaisesUnsafeToPurge when the mailing list is not safe to place into the purged state. This exception is raised almost exclusively when the mailing list is in a state indicating it is active and usable on the Mailman side.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.