l.r.b.p.ContactViaWebNotificationRecipientSet : class documentation

Part of lp.registry.browser.person View In Hierarchy

A set of notification recipients and rationales from ContactViaWeb.
Method __init__ Initialize the state based on the context and the user.
Method getEmails See INotificationRecipientSet.
Method getRecipients See INotificationRecipientSet.
Method getRecipientPersons See INotificationRecipientSet.
Method __iter__ See INotificationRecipientSet.
Method __contains__ See INotificationRecipientSet.
Method __len__ The number of recipients in the set.
Method __nonzero__ See INotificationRecipientSet.
Method getReason See INotificationRecipientSet.
Method add See INotificationRecipientSet.
Method update See INotificationRecipientSet.
Method _reset_state Reset the cache because the recipients changed.
Method _getPrimaryReason Return the primary reason enumeration.
Method _getReasonAndHeader Return the reason and header why the email was received.
Method _getDescription Return the description of the recipients being contacted.
Method _all_recipients Set the cache of all recipients.
def __init__(self, user, person_or_team):
Initialize the state based on the context and the user.

The recipients are determined by the relationship between the user and the context that they are contacting: another user, themselves, their team, another team.

ParametersuserThe person doing the contacting. (type: an IPerson.)
person_or_teamThe party that is the context of the email. (type: IPerson.)
def _reset_state(self):
Reset the cache because the recipients changed.
def _getPrimaryReason(self, person_or_team):
Return the primary reason enumeration.
Parametersperson_or_teamThe party that is the context of the email. (type: IPerson.)
def _getReasonAndHeader(self, person_or_team):
Return the reason and header why the email was received.
Parametersperson_or_teamThe party that is the context of the email. (type: IPerson.)
def _getDescription(self, person_or_team):
Return the description of the recipients being contacted.
Parametersperson_or_teamThe party that is the context of the email. (type: IPerson.)
@cachedproperty
def _all_recipients(self):
Set the cache of all recipients.
def getEmails(self):
See INotificationRecipientSet.
def getRecipients(self):
See INotificationRecipientSet.
def getRecipientPersons(self):
See INotificationRecipientSet.
def __iter__(self):
See INotificationRecipientSet.
def __contains__(self, person_or_email):
See INotificationRecipientSet.
def __len__(self):
The number of recipients in the set.
def __nonzero__(self):
See INotificationRecipientSet.
def getReason(self, person_or_email):
See INotificationRecipientSet.
def add(self, person, reason, header):
See INotificationRecipientSet.

This method sets the primary recipient of the email. If the primary recipient is a team without a contact address, all the members will be recipients. Calling this method more than once resets the recipients.

def update(self, recipient_set):
See INotificationRecipientSet.

This method is is not relevant to this implementation because the set is generated based on the primary recipient. use the add() to set the primary recipient.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.