l.s.f.ContentNameField(UniqueField) : class documentation

Part of lp.services.fields View In Hierarchy

Known subclasses: lp.blueprints.interfaces.specification.SpecNameField, lp.blueprints.interfaces.sprint.SprintNameField, lp.bugs.interfaces.bug.BugNameField, lp.bugs.interfaces.bugtracker.BugTrackerNameField, lp.registry.interfaces.distributionmirror.DistributionMirrorNameField, lp.registry.interfaces.distroseries.DistroSeriesNameField, lp.registry.interfaces.milestone.MilestoneNameField, lp.registry.interfaces.poll.PollNameField, lp.registry.interfaces.poll.PollOptionNameField, lp.registry.interfaces.productrelease.ProductReleaseVersionField, lp.registry.interfaces.productseries.ProductSeriesNameField, lp.services.fields.BlacklistableContentNameField, lp.snappy.interfaces.snapbase.SnapBaseNameField, lp.snappy.interfaces.snappyseries.SnappySeriesNameField

Base class for fields that are used by unique 'name' attributes.
Method _getByAttribute Return the content object with the given attribute.
Method _getByName Return the content object with the given name.
Method _validate Check that the given name is valid (and by delegation, unique).

Inherited from UniqueField:

Method unchanged Return True if the attribute on the object is unchanged.
Method _content_iface Return the content interface.
Method _isValueTaken Returns true if and only if the specified value is already taken.
def _getByAttribute(self, input):
Return the content object with the given attribute.
def _getByName(self, input):
Return the content object with the given name.

Override this in subclasses.

def _validate(self, name):
Check that the given name is valid (and by delegation, unique).
API Documentation for Launchpad, generated by pydoctor at 2019-05-19 00:00:05.