~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/interfaces/bugtracker.py

[r=sinzui][bug=617695] For Bryce: Implements UI for displaying
 components registered at a remote bug tracker.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
# pylint: disable-msg=E0211,E0213
33
33
    export_read_operation,
34
34
    export_write_operation,
35
35
    exported,
 
36
    operation_for_version,
36
37
    operation_parameters,
37
38
    operation_returns_collection_of,
38
39
    operation_returns_entry,
390
391
 
391
392
    @operation_parameters(
392
393
        component_group_name=TextLine(
393
 
            title=u"The name of the remote component group", required=True))
 
394
            title=u"The name of the remote component group",
 
395
            required=True))
394
396
    @operation_returns_entry(Interface)
395
397
    @export_read_operation()
396
398
    def getRemoteComponentGroup(component_group_name):
399
401
        :param component_group_name: Name of the component group to retrieve.
400
402
        """
401
403
 
 
404
    @operation_parameters(
 
405
        distribution=TextLine(
 
406
            title=u"The distribution for the source package",
 
407
            required=True),
 
408
        sourcepackagename=TextLine(
 
409
            title=u"The source package name",
 
410
            required=True))
 
411
    @operation_returns_entry(Interface)
 
412
    @export_read_operation()
 
413
    @operation_for_version('devel')
 
414
    def getRemoteComponentForDistroSourcePackageName(
 
415
        distribution, sourcepackagename):
 
416
        """Returns the component linked to this source package, if any.
 
417
 
 
418
        If no components have been linked, returns value of None.
 
419
        """
 
420
 
402
421
 
403
422
class IBugTrackerSet(Interface):
404
423
    """A set of IBugTracker's.
538
557
            title=_('Name'),
539
558
            description=_("The name of a software component "
540
559
                          "as shown in Launchpad.")))
 
560
    sourcepackagename = Choice(
 
561
        title=_("Package"), required=False, vocabulary='SourcePackageName')
 
562
    distribution = Choice(
 
563
        title=_("Distribution"), required=False, vocabulary='Distribution')
541
564
 
542
565
    distro_source_package = exported(
543
566
        Reference(