l.r.i.e.IEntitlementSet(Interface) : interface documentation

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

Known implementations: lp.registry.model.entitlement.EntitlementSet

Interface representing a set of Entitlements.
Method __getitem__ Return the entitlement with the given id.
Method __iter__ Return an iterator that will go through all entitlements.
Method count Return the number of entitlements in the database.
Method get Return the entitlement with the given id.
Method getForPerson Return the entitlements for the person or team.
Method getValidForPerson Return a list of valid entitlements for the person or team.
Method getDirty Return the entitlements that have the dirty bit set.
Method new Create a new entitlement.
def __getitem__(entitlement_id):
Return the entitlement with the given id.

Raise NotFoundError if there is no such entitlement.

def __iter__():
Return an iterator that will go through all entitlements.
def count():
Return the number of entitlements in the database.
def get(entitlement_id, default=None):
Return the entitlement with the given id.

Return the default value if there is no such entitlement.

def getForPerson(person):
Return the entitlements for the person or team.

Get all entitlements for a person.

def getValidForPerson(person):
Return a list of valid entitlements for the person or team.

Get all valid entitlements for a person. None is returned if no valid entitlements are found.

def getDirty():
Return the entitlements that have the dirty bit set.

Get all entitlements that are marked as dirty.

def new(person, quota, entitlement_type, state, is_dirty=True, date_created=None, date_expires=None, date_starts=None, amount_used=None, registrant=None, approved_by=None):
Create a new entitlement.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.