~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/interfaces/archive.py

[r=benji][bug=848097] add another filter to
        IArchive.getPublishedSources;
        make it possible to filter by component name

Show diffs side-by-side

added added

removed removed

Lines of Context:
949
949
            title=_("Created Since Date"),
950
950
            description=_("Return entries whose `date_created` is greater "
951
951
                          "than or equal to this date."),
952
 
            required=False))
 
952
            required=False),
 
953
        component_name=TextLine(title=_("Component name"), required=False),
 
954
        )
 
955
 
953
956
    # Really returns ISourcePackagePublishingHistory, see below for
954
957
    # patch to avoid circular import.
955
958
    @call_with(eager_load=True)
958
961
    def getPublishedSources(name=None, version=None, status=None,
959
962
                            distroseries=None, pocket=None,
960
963
                            exact_match=False, created_since_date=None,
961
 
                            eager_load=False):
 
964
                            eager_load=False, component_name=None):
962
965
        """All `ISourcePackagePublishingHistory` target to this archive.
963
966
 
964
967
        :param name: source name filter (exact match or SQL LIKE controlled
973
976
                             matching.
974
977
        :param created_since_date: Only return results whose `date_created`
975
978
            is greater than or equal to this date.
 
979
        :param component_name: component filter. Only return source packages
 
980
            that are in this component.
976
981
 
977
982
        :return: SelectResults containing `ISourcePackagePublishingHistory`,
978
983
            ordered by name. If there are multiple results for the same