l.r.i.s.IStructuralSubscriptionTarget(Interface) : interface documentation

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

Known subclasses: lp.registry.interfaces.distribution.IDistribution, lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage, lp.registry.interfaces.distroseries.IDistroSeries, lp.registry.interfaces.milestone.IMilestone, lp.registry.interfaces.product.IProduct, lp.registry.interfaces.productseries.IProductSeries, lp.registry.interfaces.projectgroup.IProjectGroup

A Launchpad Structure allowing users to subscribe to it.
Method getSubscriptions Return all the subscriptions with the specified levels.
Attribute parent_subscription_target The target's parent, or None if one doesn't exist.
Method userCanAlterSubscription Check if a user can change a subscription for a person.
Method addSubscription Add a subscription for this structure.
Method userCanAlterBugSubscription Check if a user can change a bug subscription for a person.
Method addBugSubscription Add a bug subscription for this structure.
Method removeBugSubscription Remove a subscription to bugs from this structure.
Method getSubscription Return the subscription for person, if it exists.
Method getBugNotificationsRecipients Return the set of bug subscribers to this target.
Attribute target_type_display The type of the target, for display.
Method userHasBugSubscriptions Is user subscribed, directly or via a team, to bug mail?
@call_with(BugNotificationLevel.COMMENTS, BlueprintNotificationLevel.NOTHING)
@operation_returns_collection_of(IStructuralSubscription)
@export_read_operation()
def getSubscriptions(min_bug_notification_level, min_blueprint_notification_level):
Return all the subscriptions with the specified levels.
ReturnsA sequence of IStructuralSubscription.
Unknown Field: min_bug_notification_levelThe lowest bug notification level for which subscriptions should be returned.
Unknown Field: min_blueprint_notification_levelThe lowest bleuprint notification level for which subscriptions should be returned.
parent_subscription_target =
The target's parent, or None if one doesn't exist.
def userCanAlterSubscription(subscriber, subscribed_by):
Check if a user can change a subscription for a person.
def addSubscription(subscriber, subscribed_by):
Add a subscription for this structure.

This method is used to create a new IStructuralSubscription for the target, with no levels set.

ReturnsThe new subscription.
Unknown Field: subscriberThe IPerson who will be subscribed. If omitted, subscribed_by will be used.
Unknown Field: subscribed_byThe IPerson creating the subscription.
def userCanAlterBugSubscription(subscriber, subscribed_by):
Check if a user can change a bug subscription for a person.
@operation_parameters(Reference(IPerson, _('Person to subscribe. If omitted, the requesting user will be subscribed.'), False))
@call_with(REQUEST_USER)
@export_factory_operation(IStructuralSubscription, )
def addBugSubscription(subscriber, subscribed_by):
Add a bug subscription for this structure.

This method is used to create a new IStructuralSubscription for the target with the bug notification level set to COMMENTS, the only level currently in use.

ReturnsThe new bug subscription.
Unknown Field: subscriberThe IPerson who will be subscribed. If omitted, subscribed_by will be used.
Unknown Field: subscribed_byThe IPerson creating the subscription.
@operation_parameters(Reference(IPerson, _('Person to unsubscribe. If omitted, the requesting user will be unsubscribed.'), False))
@call_with(REQUEST_USER)
@export_write_operation()
def removeBugSubscription(subscriber, unsubscribed_by):
Remove a subscription to bugs from this structure.

If subscription levels for other applications are set, set the subscription's bug_notification_level to NOTHING, otherwise, destroy the subscription.

Unknown Field: subscriberThe IPerson who will be unsubscribed. If omitted, unsubscribed_by will be used.
Unknown Field: unsubscribed_byThe IPerson removing the subscription.
@operation_parameters(Reference(IPerson))
@operation_returns_entry(IStructuralSubscription)
@export_read_operation()
def getSubscription(person):
Return the subscription for person, if it exists.
def getBugNotificationsRecipients(recipients=None, level=None):
Return the set of bug subscribers to this target.

:param recipients: If recipients is not None, a rationale
    is added for each subscriber.
:type recipients: `INotificationRecipientSet`
'param level: If level is not None, only strucutral
    subscribers with a subscrition level greater or equal
    to the given value are returned.
:type level: `BugNotificationLevel`
:return: An `INotificationRecipientSet` instance containing
    the bug subscribers.
target_type_display =
The type of the target, for display.
def userHasBugSubscriptions(user):
Is user subscribed, directly or via a team, to bug mail?
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.