186
190
"""A particular series of a distribution."""
188
192
ICanPublishPackages, IDistroSeries, IHasBugHeat, IHasBuildRecords,
193
IHasQueueItems, IServiceUsage)
191
195
_table = 'DistroSeries'
192
196
_defaultOrder = ['distribution', 'version']
264
268
clauseTables=["ComponentSelection"])
271
def answers_usage(self):
272
"""See `IServiceUsage.`"""
273
return self.distribution.answers_usage
276
def blueprints_usage(self):
277
"""See `IServiceUsage.`"""
278
return self.distribution.blueprints_usage
281
def translations_usage(self):
282
"""See `IServiceUsage.`"""
283
# If translations_usage is set for the Distribution, respect it.
284
usage = self.distribution.translations_usage
285
if usage != ServiceUsage.UNKNOWN:
288
# If not, usage is based on the presence of current translation
289
# templates for the series.
290
if self.getCurrentTranslationTemplates().count() > 0:
291
return ServiceUsage.LAUNCHPAD
293
return ServiceUsage.UNKNOWN
296
def codehosting_usage(self):
297
"""See `IServiceUsage.`"""
298
return self.distribution.codehosting_usage
301
def bug_tracking_usage(self):
302
"""See `IServiceUsage.`"""
303
return self.distribution.bug_tracking_usage
306
def uses_launchpad(self):
307
""" See `IServiceUsage.`"""
309
service_uses_launchpad(self.blueprints_usage) or
310
service_uses_launchpad(self.translations_usage) or
311
service_uses_launchpad(self.answers_usage) or
312
service_uses_launchpad(self.codehosting_usage) or
313
service_uses_launchpad(self.bug_tracking_usage))
266
315
# DistroArchSeries lookup properties/methods.
267
316
architectures = SQLMultipleJoin(
268
317
'DistroArchSeries', joinColumn='distroseries',
694
743
"""Customize `search_params` for this distribution series."""
695
744
search_params.setDistroSeries(self)
746
def _getOfficialTagClause(self):
747
return self.distribution._getOfficialTagClause()
698
750
def official_bug_tags(self):
699
751
"""See `IHasBugs`."""