~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/interfaces/seriessourcepackagebranch.py

  • Committer: Curtis Hovey
  • Date: 2011-05-27 21:53:34 UTC
  • mto: This revision was merged to the branch mainline in revision 13136.
  • Revision ID: curtis.hovey@canonical.com-20110527215334-jqlkmt52nnl4bpeh
Moved launchpad.event into registry interfaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
__all__ = [
10
10
    'IFindOfficialBranchLinks',
11
11
    'ISeriesSourcePackageBranch',
 
12
    'IMakeOfficialBranchLinks',
12
13
    ]
13
14
 
14
15
 
32
33
    id = Int()
33
34
 
34
35
    distroseries = Choice(
35
 
        title=_("Series"), required=True, readonly=True,
36
 
        vocabulary='DistroSeries')
 
36
        title=_("Series"), required=True, vocabulary='DistroSeries')
37
37
 
38
38
    pocket = Choice(
39
 
        title=_("Pocket"), required=True, readonly=True,
40
 
        vocabulary=PackagePublishingPocket)
 
39
        title=_("Pocket"), required=True, vocabulary=PackagePublishingPocket)
41
40
 
42
41
    sourcepackage = Attribute('The source package')
43
42
 
44
43
    suite_sourcepackage = Attribute('The suite source package')
45
44
 
46
45
    sourcepackagename = Choice(
47
 
        title=_("Package"), required=True,
48
 
        readonly=True, vocabulary='SourcePackageName')
 
46
        title=_("Package"), required=True, vocabulary='SourcePackageName')
49
47
 
50
48
    branchID = Attribute('The ID of the branch.')
51
49
    branch = Choice(
54
52
    registrant = Attribute("The person who registered this link.")
55
53
 
56
54
    date_created = Datetime(
57
 
        title=_("When the branch was linked to the distribution suite."),
58
 
        readonly=True)
 
55
        title=_("When the branch was linked to the distribution suite."))
59
56
 
60
57
 
61
58
class IFindOfficialBranchLinks(Interface):
89
86
        :param distrosourcepackage: An `IDistributionSourcePackage`.
90
87
        :return: An `IResultSet` of `ISeriesSourcePackageBranch` objects.
91
88
        """
 
89
 
 
90
 
 
91
class IMakeOfficialBranchLinks(Interface):
 
92
    """A set of links from source packages in distribution suites to branches.
 
93
 
 
94
    This doesn't really make sense as an interface, but is provided to match
 
95
    the rest of Launchpad.
 
96
    """
 
97
 
 
98
    def delete(sourcepackage, pocket):
 
99
        """Remove the SeriesSourcePackageBranch for sourcepackage and pocket.
 
100
 
 
101
        :param sourcepackage: An `ISourcePackage`.
 
102
        :param pocket: A `PackagePublishingPocket` enum item.
 
103
        """
 
104
 
 
105
    def new(distroseries, pocket, sourcepackagename, branch, registrant,
 
106
            date_created=None):
 
107
        """Link a source package in a distribution suite to a branch."""