l.r.i.w.IProductSet(Interface) : interface documentation

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

No interface docstring
Attribute title The set of Products registered in the Launchpad
Attribute people The PersonSet, placed here so we can easily render the list of latest teams to register on the /projects/ page.
Method get_users_private_products Get users non-public products.
Method get_all_active Get all active products.
Method __iter__ Return an iterator over all the active products.
Method __getitem__ Get a product by its name.
Method get Get a product by its id.
Method getByName Return the product with the given name, ignoring inactive products
Method getProductsWithBranches Return an iterator over all active products that have branches.
Method createProduct Create and return a brand new Product.
Method forReview Return an iterator over products that need to be reviewed.
Method search Search through the Registry database for products that match the
Method latest Return the latest projects registered in Launchpad.
Method getTranslatables Return an iterator over products that have translatable resources.
Method count_all Return a count of the total number of products registered in
Method count_translatable Return a count of the number of products that have
Method count_buggy Return the number of products that have bugs associated with them
Method count_featureful Return the number of products that have specs associated with
Method count_reviewed Return a count of the number of products in the Launchpad that
Method count_answered Return the number of projects that have questions and answers
Method count_codified Return the number of projects that have branches associated with
Method getProductsWithNoneRemoteProduct Get all the IProducts having a remote_product of None
Method getSFLinkedProductsWithNoneRemoteProduct Get IProducts with a sourceforge project and no remote_product.
Method _request_user_search Wrapper for search to use request user in default content.
title =
The set of Products registered in the Launchpad
people =
The PersonSet, placed here so we can easily render the list of latest teams to register on the /projects/ page.
def get_users_private_products(user):
Get users non-public products.
ParametersuserWhich user are we searching products for.
ReturnsAn iterable of IProduct
def get_all_active(eager_load=True):
Get all active products.
Parameterseager_loadIf False do not load related objects such as the owner.
ReturnsAn iterable of IProduct.
def __iter__():
Return an iterator over all the active products.
def __getitem__(name):
Get a product by its name.
def get(productid):
Get a product by its id.

If the product can't be found a NotFoundError will be raised.

def getByName(name, ignore_inactive=False):
Return the product with the given name, ignoring inactive products if ignore_inactive is True.

Return None if there is no such product.

def getProductsWithBranches(num_products=None):
Return an iterator over all active products that have branches.

If num_products is not None, then the first num_products are returned.

@call_with(REQUEST_USER)
@rename_parameters_as('project_group', 'home_page_url', 'screenshots_url', 'freshmeat_project', 'wiki_url', 'download_url', 'sourceforge_project', 'programming_lang')
@export_factory_operation(IProduct, 'name''display_name''title''summary''description''projectgroup''homepageurl''screenshotsurl''downloadurl''freshmeatproject''wikiurl''sourceforgeproject''programminglang''project_reviewed''licenses''license_info''registrant''bug_supervisor''driver')
@export_operation_as('new_project')
def createProduct(owner, name, display_name, title, summary, description=None, projectgroup=None, homepageurl=None, screenshotsurl=None, wikiurl=None, downloadurl=None, freshmeatproject=None, sourceforgeproject=None, programminglang=None, project_reviewed=False, mugshot=None, logo=None, icon=None, licenses=None, license_info=None, registrant=None, bug_supervisor=None, driver=None):
Create and return a brand new Product.

See IProduct for a description of the parameters.

@operation_parameters(TextLine(_('Search text')), Bool(_('Is the project active')), Bool(_('Is the project licence reviewed')), Set(_('Licenses'), Choice(License)), Date(_('Created after date')), Date(_('Created before date')), Bool(_('Has a commercial subscription')), Date(_('Subscription expires after')), Date(_('Subscription expired before')), Date(_('Subscription modified after')), Date(_('Subscription modified before')))
@operation_returns_collection_of(IProduct)
@export_read_operation()
@export_operation_as('licensing_search')
@call_with(REQUEST_USER)
def forReview(user, search_text=None, active=None, project_reviewed=None, licenses=None, created_after=None, created_before=None, has_subscription=None, subscription_expires_after=None, subscription_expires_before=None, subscription_modified_after=None, subscription_modified_before=None):
Return an iterator over products that need to be reviewed.
@collection_default_content()
def _request_user_search():
Wrapper for search to use request user in default content.
@call_with(REQUEST_USER)
@operation_parameters(TextLine(_('Search text')))
@operation_returns_collection_of(IProduct)
@export_read_operation()
def search(user, text=None):
Search through the Registry database for products that match the query terms. text is a piece of text in the title / summary / description fields of product.

This call eager loads data appropriate for web API; caution may be needed for other callers.

@operation_returns_collection_of(IProduct)
@call_with(REQUEST_USER, None)
@export_read_operation()
def latest(user, quantity=5):
Return the latest projects registered in Launchpad.

The supplied user determines which objects are visible.

If the quantity is not specified or is a value that is not 'None' then the set of projects returned is limited to that value (the default quantity is 5). If quantity is 'None' then all projects are returned. For the web service it is not possible to specify the quantity, so all projects are returned, latest first.

def getTranslatables():
Return an iterator over products that have translatable resources.

Skips products that are not configured to be translated in Launchpad, as well as non-active ones.

def count_all():
Return a count of the total number of products registered in Launchpad.
def count_translatable():
Return a count of the number of products that have upstream-oriented translations configured in Rosetta.
def count_buggy():
Return the number of products that have bugs associated with them in Launchpad.
def count_featureful():
Return the number of products that have specs associated with them in Blueprint.
def count_reviewed():
Return a count of the number of products in the Launchpad that are both active and reviewed.
def count_answered():
Return the number of projects that have questions and answers associated with them.
def count_codified():
Return the number of projects that have branches associated with them.
def getProductsWithNoneRemoteProduct(bugtracker_type=None):
Get all the IProducts having a remote_product of None

The result can be filtered to only return Products associated with a given bugtracker type.

def getSFLinkedProductsWithNoneRemoteProduct():
Get IProducts with a sourceforge project and no remote_product.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.