~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/interfaces/distroseries.py

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    export_write_operation,
25
25
    exported,
26
26
    LAZR_WEBSERVICE_EXPORTED,
 
27
    operation_for_version,
27
28
    operation_parameters,
28
29
    operation_returns_collection_of,
29
30
    operation_returns_entry,
830
831
    def getDerivedSeries():
831
832
        """Get all `DistroSeries` derived from this one."""
832
833
 
 
834
    @operation_returns_collection_of(Interface)
 
835
    @export_read_operation()
 
836
    def getParentSeries():
 
837
        """Get all parent `DistroSeries`."""
 
838
 
 
839
    @operation_parameters(
 
840
        parent_series=Reference(
 
841
            schema=Interface, # IDistroSeries
 
842
            title=_("The parent series to consider."),
 
843
            required=False),
 
844
        difference_type=Choice(
 
845
            vocabulary=DBEnumeratedType, # DistroSeriesDifferenceType
 
846
            title=_("Only return differences of this type."), required=False),
 
847
        source_package_name_filter=TextLine(
 
848
            title=_("Only return differences for packages matching this "
 
849
                    "name."),
 
850
            required=False),
 
851
        status=Choice(
 
852
            vocabulary=DBEnumeratedType, # DistroSeriesDifferenceStatus
 
853
            title=_("Only return differences of this status."),
 
854
            required=False),
 
855
        child_version_higher=Bool(
 
856
            title=_("Only return differences for which the child's version "
 
857
                    "is higher than the parent's."),
 
858
            required=False),
 
859
        )
 
860
    @operation_returns_collection_of(Interface)
 
861
    @export_read_operation()
 
862
    @operation_for_version('devel')
 
863
    def getDifferencesTo(parent_series, difference_type,
 
864
                         source_package_name_filter, status,
 
865
                         child_version_higher):
 
866
        """Return the differences between this series and the specified
 
867
        parent_series (or all the parent series if parent_series is None).
 
868
 
 
869
        :param parent_series: The parent series for which the differences
 
870
            should be returned. All parents are considered if this is None.
 
871
        :param difference_type: The type of the differences to return.
 
872
        :param source_package_name_filter: A package name to use as a filter
 
873
            for the differences.
 
874
        :param status: The status of the differences to return.
 
875
        :param child_version_higher: Only return differences for which the
 
876
            child's version is higher than the parent's version.
 
877
        """
 
878
 
833
879
 
834
880
class IDistroSeriesEditRestricted(Interface):
835
881
    """IDistroSeries properties which require launchpad.Edit."""
942
988
        """
943
989
 
944
990
 
945
 
 
946
991
class IDistroSeries(IDistroSeriesEditRestricted, IDistroSeriesPublic,
947
992
                    IStructuralSubscriptionTarget):
948
993
    """A series of an operating system distribution."""